build: Fix "make dist"
[riece] / Makefile.am
1 SUBDIRS = lisp doc
2 AUTOMAKE_OPTIONS = no-dependencies
3
4 if XEMACS
5 install-package package:
6         list='$(SUBDIRS)'; for subdir in $$list; do \
7           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \
8         done
9 endif
10
11 changelog_etc =                                 \
12         ChangeLog-2014                          \
13         lisp/ChangeLog-2014                     \
14         lisp/ChangeLog.Liece
15
16 ja_docs =                                       \
17         doc/ja/NEWS                             \
18         doc/ja/README                           \
19         doc/ja/README-hacking
20
21 EXTRA_DIST =                                    \
22         $(ja_docs)                              \
23         $(changelog_etc)                        \
24         bootstrap                               \
25         bootstrap.conf
26
27 # Arrange so that .tarball-version appears only in the distribution
28 # tarball, and never in a checked-out repository.
29 # The perl substitution is to change some key uses of "rm" to "/bin/rm".
30 # See the rm_subst comment for details.
31 dist-hook: gen-ChangeLog
32         $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
33         $(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
34
35 gen_start_date = 2014-04-12
36 .PHONY: gen-ChangeLog
37 gen-ChangeLog:
38         $(AM_V_GEN)if test -d .git; then                                \
39           $(top_srcdir)/build-aux/gitlog-to-changelog                   \
40             --amend=$(srcdir)/build-aux/git-log-fix                     \
41             --since=$(gen_start_date) > $(distdir)/cl-t;                \
42           rm -f $(distdir)/ChangeLog;                                   \
43           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
44         fi