Relicense to GPLv3
[muse-el.git] / Makefile
blob44696cd613349e706a6e12d53ccb65cbb85c2580
1 .PHONY: all lisp contrib autoloads examples experimental doc info-only
2 .PHONY: clean realclean distclean fullclean install-info install-bin install
3 .PHONY: test dist release debclean debprepare debbuild debinstall deb upload
4 .PHONY: elpa
6 DEFS = $(shell test -f Makefile.defs && echo Makefile.defs \
7 || echo Makefile.defs.default)
9 include $(DEFS)
11 SUBDIRS = lisp contrib examples experimental texi
13 all: autoloads lisp contrib info-only
15 lisp:
16 (cd lisp && $(MAKE))
18 contrib:
19 (cd contrib && $(MAKE))
21 autoloads:
22 (cd lisp && $(MAKE) autoloads)
24 examples:
25 (cd examples && $(MAKE))
27 experimental:
28 (cd experimental && $(MAKE))
30 info-only:
31 (cd texi && $(MAKE) info-only)
33 doc texi:
34 (cd texi && $(MAKE))
36 clean:
37 for i in $(SUBDIRS); do \
38 (cd $$i && $(MAKE) clean); done
40 realclean fullclean: clean
41 for i in $(SUBDIRS); do \
42 (cd $$i && $(MAKE) realclean); done
44 install-info:
45 (cd texi && $(MAKE) install)
47 install-bin: autoloads lisp contrib
48 (cd lisp && $(MAKE) install)
49 (cd contrib && $(MAKE) install)
50 (cd experimental && $(MAKE) install-uncompiled)
52 install: install-bin install-info
54 test:
55 (cd lisp && $(MAKE) test)
57 distclean:
58 for i in $(SUBDIRS); do \
59 (cd $$i && $(MAKE) distclean); done
60 -rm -fr ../$(PROJECT)-$(VERSION)
62 dist: autoloads distclean
63 tla inventory -sB | tar -cf - --no-recursion -T- | \
64 (mkdir -p ../$(PROJECT)-$(VERSION); cd ../$(PROJECT)-$(VERSION) && \
65 tar xf -)
66 cp lisp/$(PROJECT)-autoloads.el ../$(PROJECT)-$(VERSION)/lisp
68 release: dist
69 (cd .. && tar -czf $(PROJECT)-$(VERSION).tar.gz \
70 $(PROJECT)-$(VERSION) ; \
71 zip -r $(PROJECT)-$(VERSION).zip $(PROJECT)-$(VERSION) && \
72 gpg --detach $(PROJECT)-$(VERSION).tar.gz && \
73 gpg --detach $(PROJECT)-$(VERSION).zip)
75 debclean:
76 -rm -f ../../dist/$(DISTRIBUTOR)/$(DEBNAME)_*
77 -rm -fr ../$(DEBNAME)_$(VERSION)*
79 debprepare:
80 -rm -rf ../$(DEBNAME)-$(VERSION)
81 (cd .. && tar -xzf $(PROJECT)-$(VERSION).tar.gz)
82 mv ../$(PROJECT)-$(VERSION) ../$(DEBNAME)-$(VERSION)
83 (cd .. && tar -czf $(DEBNAME)_$(VERSION).orig.tar.gz \
84 $(DEBNAME)-$(VERSION))
85 (cd debian && tla inventory -sB | tar -cf - --no-recursion -T- | \
86 (mkdir -p ../../$(DEBNAME)-$(VERSION)/debian; \
87 cd ../../$(DEBNAME)-$(VERSION)/debian && \
88 tar xf -))
90 debbuild:
91 (cd ../$(DEBNAME)-$(VERSION) && \
92 dpkg-buildpackage -v$(LASTUPLOAD) $(BUILDOPTS) \
93 -us -uc -rfakeroot && \
94 echo "Running lintian ..." && \
95 lintian -i ../$(DEBNAME)_$(VERSION)*.deb || : && \
96 echo "Done running lintian." && \
97 echo "Running linda ..." && \
98 linda -i ../$(DEBNAME)_$(VERSION)*.deb || : && \
99 echo "Done running linda." && \
100 debsign)
102 debinstall:
103 cp ../$(DEBNAME)_$(VERSION)* ../../dist/$(DISTRIBUTOR)
105 deb: debclean debprepare debbuild debinstall
107 upload: release
108 (cd .. && \
109 scp $(PROJECT)-$(VERSION).zip* $(PROJECT)-$(VERSION).tar.gz* \
110 mwolson@download.gna.org:/upload/muse-el)
112 elpa: realclean info-only
113 rm -fR $(ELPADIR)/$(PROJECT)-$(VERSION)
114 rm -f $(ELPADIR)/$(PROJECT)-$(VERSION).tar
115 mkdir -p $(ELPADIR)/$(PROJECT)-$(VERSION)
116 cp lisp/*.el $(ELPADIR)/$(PROJECT)-$(VERSION)
117 cp contrib/*.el $(ELPADIR)/$(PROJECT)-$(VERSION)
118 echo '(define-package "$(PROJECT)" "$(VERSION)"' > \
119 $(ELPADIR)/$(PROJECT)-$(VERSION)/$(PROJECT)-pkg.el
120 echo ' "$(ELPADESC)")' >> \
121 $(ELPADIR)/$(PROJECT)-$(VERSION)/$(PROJECT)-pkg.el
122 cp texi/$(MANUAL).info $(ELPADIR)/$(PROJECT)-$(VERSION)
123 echo '* Menu:' > $(ELPADIR)/$(PROJECT)-$(VERSION)/dir
124 echo >> $(ELPADIR)/$(PROJECT)-$(VERSION)/dir
125 install-info --section "Emacs" "Emacs" \
126 --info-dir=$(ELPADIR)/$(PROJECT)-$(VERSION) \
127 $(ELPADIR)/$(PROJECT)-$(VERSION)/$(MANUAL).info
128 rm -f $(ELPADIR)/$(PROJECT)-$(VERSION)/dir.old
129 (cd $(ELPADIR) && tar cf $(PROJECT)-$(VERSION).tar \
130 $(PROJECT)-$(VERSION))