DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS)
$(DOCS):
- t=$@; IFS=-; set $$t; IFS=; $(MAKE) -C doc/$$1 $$2
+ $(MAKE) -C doc/$(subst -, ,$@)
.PHONY: $(DOCS) docs pdf ps
.PHONY: info dvi dist check html info-real info-dir check-info
## Install non .info forms of the documentation.
## TODO add etc/refcards.
$(INSTALL_DOC):
- t=$@; IFS=-; set $$t; IFS=; $(MAKE) -C doc/$$2 $$1-$$3
+ $(MAKE) -C doc/$(subst -, install-,$(subst install-,,$@))
.PHONY: $(INSTALL_DOC) install-doc
.PHONY: install-dvi install-html install-pdf install-ps
UNINSTALL_DOC = $(UNINSTALL_DVI) $(UNINSTALL_HTML) $(UNINSTALL_PDF) $(UNINSTALL_PS)
$(UNINSTALL_DOC):
- t=$@; IFS=-; set $$t; IFS=; $(MAKE) -C doc/$$2 $$1-$$3
+ $(MAKE) -C doc/$(subst -, uninstall-,$(subst uninstall-,,$@))
.PHONY: $(UNINSTALL_DOC) uninstall-doc
.PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
$(MAKE) MAKEFILE_NAME=force-Makefile force-Makefile
$(MAKE) all
-.PHONY: ChangeLog change-history change-history-commit
-.PHONY: master-branch-is-current no-ChangeLog unchanged-history-files
-
-# The newest revision that should not appear in the generated ChangeLog.
-gen_origin = 2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0
-
-# Convert git commit log to ChangeLog file. make-dist uses this.
-ChangeLog:
- $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \
- $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin)
+.PHONY: ChangeLog change-history change-history-commit change-history-nocommit
+.PHONY: master-branch-is-current unchanged-history-files
+CHANGELOG = ChangeLog
+emacslog = $(srcdir)/build-aux/gitlog-to-emacslog
# The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ...,
# ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for
# the newest (highest-numbered) ChangeLog history file.
CHANGELOG_HISTORY_INDEX_MAX = 2
CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX)
+# Convert git commit log to ChangeLog file. make-dist uses this.
+# I guess this is PHONY so it always updates?
+ChangeLog:
+ $(AM_V_GEN)srcprefix=$(srcdir)/ \
+ $(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
+
# Check that we are in a good state for changing history.
-no-ChangeLog:
- test ! -f ChangeLog
master-branch-is-current:
git branch | grep -q '^\* master$$'
unchanged-history-files:
- x=$$(git diff-files --name-only $(CHANGELOG_N) Makefile.in) && \
+ x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \
test -z "$$x"
# Copy newer commit messages to the start of the ChangeLog history file,
# and consider them to be older.
-change-history: no-ChangeLog master-branch-is-current unchanged-history-files \
- ChangeLog
- (sed '/^;; [L]ocal Variables:/,$$d' <ChangeLog && cat $(CHANGELOG_N)) \
+change-history-nocommit: master-branch-is-current unchanged-history-files
+ -rm -f ChangeLog.tmp
+ $(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp
+ (sed '/^;; [L]ocal Variables:/,$$d' <ChangeLog.tmp && cat $(CHANGELOG_N)) \
>$(CHANGELOG_N).tmp
+ rm ChangeLog.tmp
new_origin=$$(git log --pretty=format:%H HEAD^!) && \
- sed 's/^\(gen_origin *= *\).*/\1'"$$new_origin/" \
- <Makefile.in >Makefile.in.tmp
+ sed 's/^\(gen_origin=\).*/\1'"$$new_origin/" \
+ < $(emacslog) > $(emacslog).tmp
mv $(CHANGELOG_N).tmp $(CHANGELOG_N)
- mv Makefile.in.tmp Makefile.in
+ mv $(emacslog).tmp $(emacslog)
+
+change-history: change-history-nocommit
$(MAKE) $@-commit
# If 'make change-history' fails because the newest ChangeLog history
# file contains invalid text, fix the file by hand and then run
# 'make change-history-commit'.
change-history-commit:
- git commit -m'; make $@' $(CHANGELOG_N) Makefile.in
+ git commit -m'; make $@' $(CHANGELOG_N) $(emacslog)
.PHONY: check-declare