]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Makefile: files-update directive will update the auto-generated files in src/
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 9 May 2017 18:57:00 +0000 (20:57 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 10 May 2017 08:44:53 +0000 (10:44 +0200)
This simplifies the update of files generated by autogen.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Makefile.am
configure.ac

index e759583218e60b0979d064ca0132fea4f5d945b2..31288a33a6d6b5366408058f6c1568fb1eccf49e 100644 (file)
@@ -120,15 +120,28 @@ symbol-check:
 local-code-coverage-output: code-coverage-capture
        cat GnuTLS-$(VERSION)-coverage/index.html|grep headerCovTableEntryLo|head -1|sed 's/^.*>\([0-9]\+\.[0-9]\+\s*%\)<.*$$/ coverage lines: \1/' || true
 
-files-update:
+libopts-check:
+       @echo "*****************************************************************"
+       @echo "Checking whether included libopts matches the system's. If the"
+       @echo "check fails upgrade the included libopts."
+       @echo "*****************************************************************"
+       test "`autoopts-config libsrc|cut -d '-' -f 2|sed 's/.tar.gz//'`" = "`cat src/libopts/autoopts/options.h |grep OPTIONS_VERSION_STRING|cut -d '"' -f 2|sed 's/:/./g'`"
+
+files-update: libopts-check
        make -C doc/ compare-makefile || mv doc/tmp-compare-makefile doc/Makefile.am
        make -C doc/manpages compare-makefile || mv doc/manpages/tmp-compare-makefile doc/manpages/Makefile.am
        make -C . symbol-check || mv symbols.last.tmp symbols.last
        @echo "******************************************************************************************"
+       @echo "updating autogen files in src/"
+       @echo "******************************************************************************************"
+       cd $(srcdir)/src/ && for i in *-args.c *-args.h;do \
+               test -h $$i || cp $$i $$i.bak; \
+       done
+       @echo "******************************************************************************************"
        @echo "updated auto-generated files; please use git diff to verify the correctness of the changes"
        @echo "******************************************************************************************"
 
-dist-hook: symbol-check abi-check
+dist-hook: libopts-check symbol-check abi-check
        make -C doc/ compare-makefile
        make -C doc/ compare-exported
        make -C doc/manpages compare-makefile
@@ -150,11 +163,6 @@ dist-hook: symbol-check abi-check
        cd $(distdir)/src/ && for i in *-args.c *-args.h;do \
                mv $$i $$i.bak; \
        done
-       @echo "*****************************************************************"
-       @echo "Checking whether included libopts matches the system's. If the"
-       @echo "check fails upgrade the included libopts."
-       @echo "*****************************************************************"
-       test "`autoopts-config libsrc|cut -d '-' -f 2|sed 's/.tar.gz//'`" = "`cat src/libopts/autoopts/options.h |grep OPTIONS_VERSION_STRING|cut -d '"' -f 2|sed 's/:/./g'`"
        touch $(distdir)/doc/*.html $(distdir)/doc/*.pdf $(distdir)/doc/*.info
 
-.PHONY: abi-check abi-dump pic-check symbol-check local-code-coverage-output files-update
+.PHONY: abi-check abi-dump pic-check symbol-check local-code-coverage-output files-update libopts-check
index 972faf73628dce226953a007863dbd5e4fef599a..a02579afffeab5fce28783ab7da7777c963c8b07 100644 (file)
@@ -911,6 +911,7 @@ AC_SUBST([YEAR], $YEAR)
 for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
        nam=$(basename $i|sed 's/.bak//g')
        if test "$create_libopts_links" = "yes";then
+               rm -f "src/$nam.stamp"
                rm -f "src/$nam"
                AC_CONFIG_LINKS([src/$nam:$i])
        fi