git.iko.soy/typeable/pandoc
on master help sign in
* 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

commit86e8b9635a18c3c85f933b97d0da15a1638fe408 authorroktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 20 Oct 2006, 17:27 (20 years ago) parent7efc3d1
1 file changed+20−8
Makefile+20−8
Makefile+20−8
@@ -56,7 +56,7 @@ $(SRCDIR)/templates:
5656.PHONY: prep
5757prep:
5858 # Darcs cannot preserve file permissions.
59− -for p in configure debian/rules; do chmod +x $$p; done
59+ -for f in configure debian/rules; do chmod +x $$f; done
6060
6161.PHONY: configure
6262cleanup_files+=$(BUILDDIR) $(BUILDCONF) $(CABAL:%.cabal=%).buildinfo
@@ -88,19 +88,22 @@ $(EXECUTABLES): build
8888bin_all:=$(EXECUTABLES) html2markdown markdown2html latex2markdown markdown2latex markdown2pdf
8989install-exec: $(bin_all)
9090 $(INSTALL) -d $(BINPATH); \
91− for p in $(bin_all); do $(INSTALL_PROGRAM) $$p $(BINPATH)/; done
91+ for f in $(bin_all); do $(INSTALL_PROGRAM) $$f $(BINPATH)/; done
9292uninstall-exec:
93− -for p in $(bin_all); do rm -f $(BINPATH)/$$p; done
93+ -for f in $(bin_all); do rm -f $(BINPATH)/$$f; done
9494
9595.PHONY: install-doc uninstall-doc
9696doc_all:=README.html README BUGS TODO
97+man_all:=$(patsubst $(MANDIR)/%,%,$(wildcard $(MANDIR)/man?/*.1))
9798cleanup_files+=README.html
9899install-doc: $(doc_all)
99− $(INSTALL) -d $(DOCPATH) && $(INSTALL_DATA) $(doc_all) $(DOCPATH)/; \
100− $(INSTALL) -d $(MANPATH) && cp -a $(MANDIR)/* $(MANPATH)/
100+ $(INSTALL) -d $(DOCPATH) && $(INSTALL_DATA) $(doc_all) $(DOCPATH)/
101+ $(INSTALL) -d $(MANPATH); \
102+ for f in $(man_all); do $(INSTALL_DATA) -D $(MANDIR)/$$f $(MANPATH)/$$f; done
101103uninstall-doc:
102− -for d in $(doc_all); do rm -f $(DOCPATH)/$$d; done
103− -cd $(MANDIR) && find . -type f -exec rm -f "$(MANPATH)/{}" \;
104+ -for f in $(doc_all); do rm -f $(DOCPATH)/$$f; done
105+ -for f in $(man_all); do rm -f $(MANPATH)/$$f; done
106+ -rmdir --ignore-fail-on-non-empty $(DOCPATH)
104107
105108# Handle program installation manually (due to the deficiencies in Cabal).
106109.PHONY: install uninstall
@@ -130,11 +133,20 @@ tags: $(src_all)
130133 LC_ALL=C sort tags >tags.sorted; mv tags.sorted tags
131134
132135deb: debian prep
136+ [ -x /usr/bin/fakeroot ] || { \
137+ echo "*** Please install fakeroot package. ***"; \
138+ exit 1; \
139+ }
140+ [ -x /usr/bin/dpkg-buildpackage ] || { \
141+ echo "*** Please install dpkg-dev package. ***"; \
142+ exit 1; \
143+ }
133144 if [ -x /usr/bin/debuild ]; then \
134145 debuild -uc -us -i.svn -I.svn -i_darcs -I_darcs --lintian-opts -i; \
135146 else \
136147 echo "*** Please install devscripts package. ***"; \
137− dpkg-buildpackage -uc -us -i.svn -I.svn -i_darcs -I_darcs; \
148+ echo "*** Using dpkg-buildpackage for package building. ***"; \
149+ dpkg-buildpackage -rfakeroot -uc -us -i.svn -I.svn -i_darcs -I_darcs; \
138150 fi
139151
140152.PHONY: distclean clean