diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-05-25 21:17:27 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2019-05-29 17:05:04 +0200 |
commit | d9a3653c9a58fcbc7d07bf0f142d646deccc3c65 (patch) | |
tree | 5b01ef11ea525a88f8c37dd92f41fe56a89656c1 /src | |
parent | a67fa87f5382e40a08fdcbd4be554bb786c26b32 (diff) | |
download | gnutls-d9a3653c9a58fcbc7d07bf0f142d646deccc3c65.tar.gz |
Do not regenerate autogen files if --enable-local-libopts is giventmp-fix-libopts
This addresses issue on installed systems which have autogen but
use --enable-local-libopts. In these systems if the installed autogen
would not match the local libopts library version compilation would
fail because the auto-generated files depend on the corresponding to
autogen version libopts internals.
Resolves: #772
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 0374924c53..501bca58c1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -272,6 +272,23 @@ libcmd_systemkey_la_LIBADD += $(LTLIBREADLINE) $(INET_PTON_LIB) $(LIB_CLOCK_GETT SUFFIXES = .stamp .def .c.bak .h.bak +if NEED_LIBOPTS +# case --enable-local-libopts: We do not call AUTOGEN unless the .bak files are missing +.def.stamp: + @b=`echo $@ | sed 's/.stamp$$//'`; \ + if ! test -f $${srcdir}$${b}.c.bak;then \ + echo "No .bak files found; will call autogen"; \ + $(AM_V_GEN) $(AUTOGEN) $<; \ + else \ + echo "Re-using .bak files"; \ + srcdir=$(srcdir)/; \ + rm -f $${b}.c $${b}.h; \ + cp -p $${srcdir}$${b}.c.bak $${b}.c; \ + cp -p $${srcdir}$${b}.h.bak $${b}.h; \ + fi + touch $@ +else +# default case. We call autogen, and if that fails we resort to the bundled files. .def.stamp: $(AM_V_GEN) $(AUTOGEN) $< || { \ srcdir=''; \ @@ -281,6 +298,7 @@ SUFFIXES = .stamp .def .c.bak .h.bak cp -p $${srcdir}$${b}.h.bak $${b}.h; \ } && \ touch $@ +endif .c.c.bak: -@rm -f $@ |