]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: fix changelog generation
authorVincent Bernat <bernat@luffy.cx>
Fri, 11 Jan 2013 00:25:32 +0000 (01:25 +0100)
committerVincent Bernat <bernat@luffy.cx>
Fri, 11 Jan 2013 00:25:32 +0000 (01:25 +0100)
We really only want to generate changelog when building the dist
tarball. We force its generation using a fake PHONY target. We don't
list it as a dist_* something since it does not exist yet. Therefore,
we don't have to clean it.

.gitignore
Makefile.am

index bf795e60a4f02cfaa0f932560e95adcc7dc087a3..77397ad2eb8d3baf20683c3d671f215f15e94624 100644 (file)
@@ -30,7 +30,7 @@
 /src/Makefile.in
 /tests/Makefile.in
 /man/Makefile.in
-
+/ar-lib
 
 # cscope
 /cscope.*
index 45a570e0107c5bfc3737a4ee2040cc3c78e17b4b..335be5b7808db5dfe34700a7de1a49b1bde6ef82 100644 (file)
@@ -7,11 +7,11 @@ EXTRA_DIST   = $(DX_CONFIG) include
 DIST_SUBDIRS = $(SUBDIRS) libevent
 
 dist_doc_DATA = README.md NEWS
-doc_DATA      = ChangeLog
 
-# Not able to add a .PHONY target
-force-changelog-generation:
-ChangeLog: force-changelog-generation
+# Build changelog from git history
+dist-hook: $(distdir)/ChangeLog
+__force-changelog-generation:
+$(distdir)/ChangeLog: __force-changelog-generation
        $(AM_V_GEN)if test -d $(top_srcdir)/.git; then \
                prev=$$(git describe --tags --always --match [0-9]* 2> /dev/null) ; \
                for tag in $$(git tag | grep -E '^[0-9]+(\.[0-9]+){1,}$$' | sort -rn); do \