Merged from jeho@jeho.org--2005 (patch 51-53), mwolson@gnu.org--2006 (patch 15)
[planner-el.git] / Makefile
blob05904fea55103140a819a5de5610c2184be7ed25
1 .PHONY: all autoloads lisp doc clean realclean distclean fullclean install test dist release debbuild debrevision debrelease
2 .PRECIOUS: %.elc
4 include Makefile.defs
6 EL = $(filter-out planner-autoloads.el,$(wildcard *.el))
7 ELC = $(patsubst %.el,%.elc,$(EL))
9 all: autoloads lisp $(MANUAL).info
11 lisp: $(ELC)
13 planner-build.elc: ./scripts/planner-build.el
14 @echo planner-build.el is not byte-compiled
16 autoloads: planner-autoloads.el
18 planner-autoloads.el: $(EL)
19 @$(EMACS) -q $(SITEFLAG) -batch -l ./scripts/planner-build.el \
20 -f planner-generate-autoloads . contrib
22 %.elc: %.el
23 @$(EMACS) -q $(SITEFLAG) -batch -l ./scripts/planner-build.el \
24 -f batch-byte-compile $< || :
26 %.info: %.texi
27 makeinfo $<
29 %.html: %.texi
30 makeinfo --html --no-split $<
32 doc: $(MANUAL).info $(MANUAL).html
34 clean:
35 -rm -f *.elc *~
37 realclean fullclean: clean
38 -rm -f $(MANUAL).info $(MANUAL).html planner-autoloads.el
40 install: autoloads lisp $(MANUAL).info
41 install -d $(ELISPDIR)
42 install -m 0644 planner-autoloads.el $(EL) $(wildcard *.elc) $(ELISPDIR)
43 [ -d $(INFODIR) ] || install -d $(INFODIR)
44 install -m 0644 $(MANUAL).info $(INFODIR)/$(MANUAL)
45 $(INSTALLINFO) $(INFODIR)/$(MANUAL)
47 test: $(ELC)
48 $(EMACS) -q $(SITEFLAG) -batch -l ./scripts/planner-build.el \
49 -f planner-elint-files planner-*.el
51 distclean: realclean
52 -rm -f debian/dirs debian/files
53 -rm -fr ../$(PROJECT)-$(VERSION)
55 dist: distclean
56 tla inventory -sB | tar -cf - --no-recursion -T- | \
57 (mkdir -p ../$(PROJECT)-$(VERSION); cd ../$(PROJECT)-$(VERSION) && \
58 tar xf -)
59 rm -fr ../$(PROJECT)-$(VERSION)/debian ../$(PROJECT)-$(VERSION)/test
61 release: dist
62 (cd .. && tar -czf $(PROJECT)-$(VERSION).tar.gz \
63 $(PROJECT)-$(VERSION) && \
64 zip -r $(PROJECT)-$(VERSION).zip $(PROJECT)-$(VERSION) && \
65 gpg --detach $(PROJECT)-$(VERSION).tar.gz && \
66 gpg --detach $(PROJECT)-$(VERSION).zip)
68 debbuild:
69 (cd ../$(DEBNAME)-$(VERSION) && \
70 dpkg-buildpackage -v$(LASTUPLOAD) $(BUILDOPTS) \
71 -us -uc -rfakeroot && \
72 echo "Running lintian ..." && \
73 lintian -i ../$(DEBNAME)_$(VERSION)*.deb || : && \
74 echo "Done running lintian." && \
75 debsign)
76 cp ../$(DEBNAME)_$(VERSION)* ../../dist
78 debrevision: dist
79 -rm -f ../../dist/$(DEBNAME)_*
80 -rm -f ../$(DEBNAME)_$(VERSION)-*
81 -rm -fr ../$(DEBNAME)-$(VERSION)
82 mv ../$(PROJECT)-$(VERSION) ../$(DEBNAME)-$(VERSION)
83 cp -r debian ../$(DEBNAME)-$(VERSION)
84 -rm -fr ../$(DEBNAME)-$(VERSION)/debian/.arch-ids
85 $(MAKE) debbuild
87 debrelease: dist
88 -rm -f ../../dist/$(DEBNAME)_*
89 -rm -f ../$(DEBNAME)_$(VERSION)*
90 -rm -fr ../$(DEBNAME)-$(VERSION)
91 mv ../$(PROJECT)-$(VERSION) ../$(DEBNAME)-$(VERSION)
92 (cd .. && tar -czf $(DEBNAME)_$(VERSION).orig.tar.gz \
93 $(DEBNAME)-$(VERSION))
94 cp -r debian ../$(DEBNAME)-$(VERSION)
95 -rm -fr ../$(DEBNAME)-$(VERSION)/debian/.arch-ids
96 $(MAKE) debbuild
98 upload: release
99 (cd .. && scp $(PROJECT)-$(VERSION).zip* \
100 $(PROJECT)-$(VERSION).tar.gz* \
101 mwolson@download.gna.org:/upload/planner-el)