diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2019-05-31 17:55:37 +0000 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2019-05-31 17:55:37 +0000 |
commit | e6581746f8b8679d3d6e96fd2ca8f4bd417927ce (patch) | |
tree | 4ae844ea8298c731c862f7fffe01fe8c74272434 | |
parent | 5d86d112d7c40a0c96060cb7a7b139105a8d9d0b (diff) | |
parent | d9a3653c9a58fcbc7d07bf0f142d646deccc3c65 (diff) | |
download | gnutls-e6581746f8b8679d3d6e96fd2ca8f4bd417927ce.tar.gz |
Merge branch 'tmp-fix-libopts' into 'master'
Do not regenerate autogen files if --enable-local-libopts is given
Closes #772
See merge request gnutls/gnutls!1010
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/Makefile.am | 18 |
3 files changed, 23 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fc747f5ff..ac6a8eb6ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -385,9 +385,13 @@ MinGW64: echo ':DOSWin:M::MZ::/usr/bin/wine64:' > /proc/sys/fs/binfmt_misc/register && mkdir -p build && cd build - dash ../configure --disable-gcc-warnings --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --cache-file ../cache/config.cache --with-included-libtasn1 --disable-guile --disable-nls --with-included-unistring --enable-local-libopts --disable-full-test-suite --disable-non-suiteb-curves --disable-doc + # generate the certtool autogen file to check whether later compilation will modify it + - mingw64-make -C src certtool-args.c.bak - mingw64-make -j$(nproc) - mingw64-make -C tests check -j$(nproc) - cd .. + # since we use --enable-local-libopts the generated files must equal the .bak + - cmp build/src/certtool-args.c build/src/certtool-args.c.bak || false tags: - shared - docker diff --git a/configure.ac b/configure.ac index 2112606601..e0c5c25d5b 100644 --- a/configure.ac +++ b/configure.ac @@ -735,7 +735,7 @@ if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then *** autogen not found. Will not link against system libopts. *** ]]) dnl simulate specifying option on the command line - enable_local_libopts=yes + included_libopts=yes fi LIBOPTS_CHECK([src/libopts]) if test "$NEED_LIBOPTS_DIR" = "true";then 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 $@ |