Skip to content

Commit 8dfe7ed

Browse files
Daniel LangeDaniel Lange
authored andcommitted
Improve make dist to warn on building inside a git repository
1 parent a94e766 commit 8dfe7ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,13 @@ cppcheck:
509509

510510
dist-hook: $(top_distdir)/configure
511511
@if grep 'pkg_m4_absent' '$(top_distdir)/configure'; then \
512-
echo 'configure is generated without pkg.m4. Please supply pkg.m4 and run ./autogen.sh to rebuild the configure script.'>&2; \
512+
echo 'ERROR: configure is generated without pkg.m4. Please supply pkg.m4 and run ./autogen.sh to rebuild the configure script.'>&2; \
513513
(exit 1); \
514514
else :; \
515515
fi
516+
@if grep 'PACKAGE_VERSION.*-g' '$(top_distdir)/configure'; then \
517+
echo 'WARNING: You are building a dist from a git version. Better run make dist outside of a .git repo on a tagged release.'>&2; \
518+
fi
516519

517520
.PHONY: lcov
518521

0 commit comments

Comments
 (0)