diff options
author | roktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-10-20 17:27:57 +0000 |
---|---|---|
committer | roktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-10-20 17:27:57 +0000 |
commit | 86e8b9635a18c3c85f933b97d0da15a1638fe408 (patch) | |
tree | b1aa4c4d7a74058c890c929bb82a9d2c9e609845 | |
parent | 7efc3d1864992ea18f0b154f5dc525de331fe36e (diff) | |
download | pandoc-86e8b9635a18c3c85f933b97d0da15a1638fe408.tar.gz |
* Fix man files installation so that we really ignore .svn directories.
* Remove $datadir/doc/pandoc on uninstall-doc. Only this directory is
removed since it's a cruft directory due to its name. I couldn't find
a reliable method to remove other directories created on installation.
* Use fakeroot when invoking dpkg-buildpackage. Improve warnings in
'deb' target.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@5 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r-- | Makefile | 28 |
1 files changed, 20 insertions, 8 deletions
@@ -56,7 +56,7 @@ $(SRCDIR)/templates: .PHONY: prep prep: # Darcs cannot preserve file permissions. - -for p in configure debian/rules; do chmod +x $$p; done + -for f in configure debian/rules; do chmod +x $$f; done .PHONY: configure cleanup_files+=$(BUILDDIR) $(BUILDCONF) $(CABAL:%.cabal=%).buildinfo @@ -88,19 +88,22 @@ $(EXECUTABLES): build bin_all:=$(EXECUTABLES) html2markdown markdown2html latex2markdown markdown2latex markdown2pdf install-exec: $(bin_all) $(INSTALL) -d $(BINPATH); \ - for p in $(bin_all); do $(INSTALL_PROGRAM) $$p $(BINPATH)/; done + for f in $(bin_all); do $(INSTALL_PROGRAM) $$f $(BINPATH)/; done uninstall-exec: - -for p in $(bin_all); do rm -f $(BINPATH)/$$p; done + -for f in $(bin_all); do rm -f $(BINPATH)/$$f; done .PHONY: install-doc uninstall-doc doc_all:=README.html README BUGS TODO +man_all:=$(patsubst $(MANDIR)/%,%,$(wildcard $(MANDIR)/man?/*.1)) cleanup_files+=README.html install-doc: $(doc_all) - $(INSTALL) -d $(DOCPATH) && $(INSTALL_DATA) $(doc_all) $(DOCPATH)/; \ - $(INSTALL) -d $(MANPATH) && cp -a $(MANDIR)/* $(MANPATH)/ + $(INSTALL) -d $(DOCPATH) && $(INSTALL_DATA) $(doc_all) $(DOCPATH)/ + $(INSTALL) -d $(MANPATH); \ + for f in $(man_all); do $(INSTALL_DATA) -D $(MANDIR)/$$f $(MANPATH)/$$f; done uninstall-doc: - -for d in $(doc_all); do rm -f $(DOCPATH)/$$d; done - -cd $(MANDIR) && find . -type f -exec rm -f "$(MANPATH)/{}" \; + -for f in $(doc_all); do rm -f $(DOCPATH)/$$f; done + -for f in $(man_all); do rm -f $(MANPATH)/$$f; done + -rmdir --ignore-fail-on-non-empty $(DOCPATH) # Handle program installation manually (due to the deficiencies in Cabal). .PHONY: install uninstall @@ -130,11 +133,20 @@ tags: $(src_all) LC_ALL=C sort tags >tags.sorted; mv tags.sorted tags deb: debian prep + [ -x /usr/bin/fakeroot ] || { \ + echo "*** Please install fakeroot package. ***"; \ + exit 1; \ + } + [ -x /usr/bin/dpkg-buildpackage ] || { \ + echo "*** Please install dpkg-dev package. ***"; \ + exit 1; \ + } if [ -x /usr/bin/debuild ]; then \ debuild -uc -us -i.svn -I.svn -i_darcs -I_darcs --lintian-opts -i; \ else \ echo "*** Please install devscripts package. ***"; \ - dpkg-buildpackage -uc -us -i.svn -I.svn -i_darcs -I_darcs; \ + echo "*** Using dpkg-buildpackage for package building. ***"; \ + dpkg-buildpackage -rfakeroot -uc -us -i.svn -I.svn -i_darcs -I_darcs; \ fi .PHONY: distclean clean |