Include autoloads file in the distribution.
[planner-el.git] / Makefile
blob39b65a62f25abd9f83c1d8dc835211c26ac23e29
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:
52 -rm -f $(MANUAL).info $(MANUAL).html debian/dirs debian/files
53 -rm -fr ../$(PROJECT)-$(VERSION)
55 dist: autoloads distclean
56 tla inventory -sB | tar -cf - --no-recursion -T- | \
57 (mkdir -p ../$(PROJECT)-$(VERSION); cd ../$(PROJECT)-$(VERSION) && \
58 tar xf -)
59 cp planner-autoloads.el ../$(PROJECT)-$(VERSION)
60 rm -fr ../$(PROJECT)-$(VERSION)/debian ../$(PROJECT)-$(VERSION)/test
62 release: dist
63 (cd .. && tar -czf $(PROJECT)-$(VERSION).tar.gz \
64 $(PROJECT)-$(VERSION) && \
65 zip -r $(PROJECT)-$(VERSION).zip $(PROJECT)-$(VERSION) && \
66 gpg --detach $(PROJECT)-$(VERSION).tar.gz && \
67 gpg --detach $(PROJECT)-$(VERSION).zip)
69 debbuild:
70 (cd ../$(DEBNAME)-$(VERSION) && \
71 dpkg-buildpackage -v$(LASTUPLOAD) $(BUILDOPTS) \
72 -us -uc -rfakeroot && \
73 echo "Running lintian ..." && \
74 lintian -i ../$(DEBNAME)_$(VERSION)*.deb || : && \
75 echo "Done running lintian." && \
76 debsign)
77 cp ../$(DEBNAME)_$(VERSION)* ../../dist
79 debrevision: dist
80 -rm -f ../../dist/$(DEBNAME)_*
81 -rm -f ../$(DEBNAME)_$(VERSION)-*
82 -rm -fr ../$(DEBNAME)-$(VERSION)
83 mv ../$(PROJECT)-$(VERSION) ../$(DEBNAME)-$(VERSION)
84 cp -r debian ../$(DEBNAME)-$(VERSION)
85 -rm -fr ../$(DEBNAME)-$(VERSION)/debian/.arch-ids
86 $(MAKE) debbuild
88 debrelease: dist
89 -rm -f ../../dist/$(DEBNAME)_*
90 -rm -f ../$(DEBNAME)_$(VERSION)*
91 -rm -fr ../$(DEBNAME)-$(VERSION)
92 mv ../$(PROJECT)-$(VERSION) ../$(DEBNAME)-$(VERSION)
93 (cd .. && tar -czf $(DEBNAME)_$(VERSION).orig.tar.gz \
94 $(DEBNAME)-$(VERSION))
95 cp -r debian ../$(DEBNAME)-$(VERSION)
96 -rm -fr ../$(DEBNAME)-$(VERSION)/debian/.arch-ids
97 $(MAKE) debbuild
99 upload: release
100 (cd .. && scp $(PROJECT)-$(VERSION).zip* \
101 $(PROJECT)-$(VERSION).tar.gz* \
102 mwolson@download.gna.org:/upload/planner-el)