]> The Tcpdump Group git mirrors - tcpslice/commitdiff
Look for the VERSION file in the source directory.
authorGuy Harris <[email protected]>
Sat, 25 Nov 2023 21:45:16 +0000 (13:45 -0800)
committerGuy Harris <[email protected]>
Sat, 25 Nov 2023 21:45:16 +0000 (13:45 -0800)
This matches libpcap and tcpdump.

It used to be necessary for out-of-tree builds.  It's no longer needed
for that, but at least it means that attempts to build a release tarball
will fail with "you're not in a git clone directory" rather than "I
can't find the VERSION file".

Now that the configure script is no longer in the repository, but is
generated by autogen.sh, and given that configure.ac gets the package
version from the VERSION file, we should probably just use
PACKAGE_VERSION in Makefile.in rather than `cat $(srcdir)/VERSION`.

Makefile.in

index 62ad525c9a1fe52dac873ef46a4e2ab9ab349b0a..28c74e0c9ededa538b5160f75072d24423bb6edf 100644 (file)
@@ -139,7 +139,7 @@ lint:
            grep -v 'possible pointer alignment problem'
 
 clean:
-       rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar* \
+       rm -f $(CLEANFILES) $(PROG)-`cat $(srcdir)/VERSION`.tar* \
        config.h.in~ configure~ configure.ac~
 
 distclean: clean
@@ -182,7 +182,7 @@ TAGS: $(TAGFILES)
 # their temporary directories.
 #
 releasetar:
-       @TAG=$(PROG)-`cat VERSION` && \
+       @TAG=$(PROG)-`cat $(srcdir)/VERSION` && \
        if [ ! -d .git ]; then echo 'Not in a git clone, stop.'; exit 1; fi && \
        TMPTESTFILE=`mktemp -t tmptestfile_XXXXXXXX` && \
        rm -f "$$TMPTESTFILE" && \
@@ -208,7 +208,7 @@ releasetar:
        rm -rf "$$AUTORECONF_DIR"
 
 releasecheck: releasetar
-       @TAG=$(PROG)-`cat VERSION` && \
+       @TAG=$(PROG)-`cat $(srcdir)/VERSION` && \
        INSTALL_DIR=/tmp/install_"$$TAG"_$$$$ && \
        DIR=`pwd` && \
        cd /tmp && \