summaryrefslogtreecommitdiffstats
path: root/Makefile.am
blob: 9c5dba869261c6748722b6249cb4961e93a31f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Process this file with automake to produce Makefile.in

ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib libidu src lisp doc man gnulib-tests testsuite po
EXTRA_DIST = \
  .prev-version \
  .version \
  cfg.mk \
  dist-check.mk \
  idutils.spec \
  idutils.spec.in \
  maint.mk \
  bootstrap \
  bootstrap.conf \
  build-aux/vc-list-files

gen_start_date = 2008-01-01
.PHONY: gen-ChangeLog
gen-ChangeLog:
	if test -d .git; then						\
	  $(top_srcdir)/build-aux/gitlog-to-changelog			\
	    --since=$(gen_start_date) > $(distdir)/cl-t;		\
	  rm -f $(distdir)/ChangeLog;					\
	  mv $(distdir)/cl-t $(distdir)/ChangeLog;			\
	fi

idutils.spec: idutils.spec.in .version
	sed 's/@''PACKAGE@/$(PACKAGE)/;s/@''VERSION@/$(VERSION)/' $< > $@-t
	mv $@-t $@
MAINTAINERCLEANFILES = idutils.spec

BUILT_SOURCES = .version
.version:
	echo $(VERSION) > $@-t && mv $@-t $@

# Arrange so that .tarball-version appears only in the distribution
# tarball, and never in a checked-out repository.
# The perl substitution is to change some key uses of "rm" to "/bin/rm".
# See the rm_subst comment for details.
dist-hook: gen-ChangeLog
	echo $(VERSION) > $(distdir)/.tarball-version