1.PHONY: all lisp autoloads clean realclean distclean fullclean install test
2.PRECIOUS: %.elc
3
4DEFS = $(shell test -f ../Makefile.defs && echo ../Makefile.defs \
5	|| echo ../Makefile.defs.default)
6
7include $(DEFS)
8
9EL  = $(filter-out $(PROJECT)-autoloads.el,$(wildcard *.el))
10ELC = $(patsubst %.el,%.elc,$(EL))
11
12all: lisp
13
14lisp: autoloads $(ELC)
15
16$(PROJECT)-build.elc: ../scripts/$(PROJECT)-build.el
17	@echo $(PROJECT)-build.el is not byte-compiled
18
19autoloads: $(PROJECT)-autoloads.el
20
21$(PROJECT)-autoloads.el: $(EL)
22	@$(EMACS) -q $(SITEFLAG) -batch -l ../scripts/$(PROJECT)-build.el \
23		-f $(PROJECT)-generate-autoloads . ../contrib ../experimental
24
25%.elc: %.el
26	@$(EMACS) -q $(SITEFLAG) -batch -l ../scripts/$(PROJECT)-build.el \
27		-f batch-byte-compile $<
28
29clean distclean:
30	-rm -f *.elc *~
31
32realclean fullclean: clean
33	-rm -f $(PROJECT)-autoloads.el
34
35install: autoloads $(ELC)
36	install -d $(ELISPDIR)
37	install -m 0644 $(PROJECT)-autoloads.el $(EL) $(ELC) $(ELISPDIR)
38
39test: $(ELC)
40	$(EMACS) -q $(SITEFLAG) -batch -l ../scripts/$(PROJECT)-build.el \
41		-f $(PROJECT)-elint-files $(EL)
42
43# Dependencies
44#
45# This allows us to recompile Muse safely after an update.
46
47muse-backlink.elc: muse-mode.elc muse-publish.elc muse.elc
48
49muse-blosxom.elc: muse-html.elc muse-project.elc muse-publish.elc
50
51muse-book.elc: muse-latex.elc muse-project.elc muse-publish.elc
52muse-book.elc: muse-regexps.elc
53
54muse-colors.elc: muse-mode.elc muse-regexps.elc
55
56muse-context.elc: muse-publish.elc
57
58muse-docbook.elc: muse-publish.elc muse-regexps.elc muse-xml-common.elc
59
60muse-groff.elc: muse-publish.elc
61
62muse-html.elc: muse-publish.elc muse-regexps.elc muse-xml-common.elc
63
64muse-http.elc: muse-html.elc muse-project.elc
65
66muse-ikiwiki.elc: muse-html.elc muse-ipc.elc muse-publish.elc muse.elc
67
68muse-import-docbook.elc: muse-import-xml.elc
69
70muse-import-latex.elc: muse-regexps.elc muse.elc
71
72muse-ipc.elc: muse-publish.elc muse.elc
73
74muse-journal.elc: muse-book.elc muse-html.elc muse-latex.elc
75muse-journal.elc: muse-publish.elc
76
77muse-latex.elc: muse-publish.elc
78
79muse-latex2png.elc: muse-publish.elc
80
81muse-mode.elc: muse-regexps.elc muse-project.elc
82
83muse-poem.elc: muse-latex.elc muse-project.elc
84
85muse-project.elc: muse-publish.elc muse.elc
86
87muse-protocols.elc: muse-regexps.elc
88
89muse-publish.elc: muse-regexps.elc muse.elc
90
91muse-texinfo.elc: muse-latex.elc muse-publish.elc
92
93muse-wiki.elc: muse-colors.elc muse-regexps.elc muse-mode.elc
94
95muse-xml-common.elc: muse-publish.elc muse-regexps.elc
96
97muse-xml.elc: muse-publish.elc muse-regexps.elc muse-xml-common.elc
98
99muse.elc: muse-protocols.elc muse-regexps.elc
100