From 10ddaca6b12cda2766269e9fc59f7612ad0da01a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 13 Aug 2017 14:11:06 +0200 Subject: [PATCH] Make: Fix configure generated for dist-client Commit 1ec9b94 broke regeneration of configure for dist-client: it uses .tarball-version, which exists only in the tarball, not in the source tree. Generating the client's autoconf stuff into the source tree is a questionable idea anyway, as it won't run there. Generate it while building the tarball instead. Bonus: doesn't distribute a useless .dirty-stamp. Signed-off-by: Markus Armbruster --- .gitignore | 4 ---- Make.mk | 28 ++++++---------------------- src/scripts/gen-client-configure | 13 +++++++++++++ 3 files changed, 19 insertions(+), 26 deletions(-) create mode 100755 src/scripts/gen-client-configure diff --git a/.gitignore b/.gitignore index 6fab5a3c5..2e447e59c 100644 --- a/.gitignore +++ b/.gitignore @@ -55,10 +55,6 @@ /configure /stamp-h.in /sources.mk -# $(cli_distgen) -/src/client/aclocal.m4 -/src/client/config.h.in -/src/client/configure # Generic junk *.orig diff --git a/Make.mk b/Make.mk index 3787a3a5b..421c82dbb 100644 --- a/Make.mk +++ b/Make.mk @@ -114,8 +114,6 @@ ac += $(basename $(filter %.in, $(src))) ac += $(srcdir)/autom4te.cache $(srcdir)/src/client/autom4te.cache # distributed by dist-source from $(srcdir): acdist := aclocal.m4 config.h.in configure stamp-h.in -# distributed by dist-client from $(srcdir): -acdistcli := $(addprefix src/client/, aclocal.m4 config.h.in configure) # Object files: obj := $(csrc:.c=.o) $(filter %.o, $(ac:.c=.o)) # Dependencies: @@ -166,9 +164,6 @@ distclean += $(addprefix $(srcdir)/, $(mk)) endif # Distributed by dist-source from $(srcdir): src_distgen := $(acdist) $(mk) -# Distributed by dist-client from $(srcdir)/src/client; removed by distclean: -cli_distgen := $(acdistcli) -distclean += $(addprefix $(srcdir)/, $(cli_distgen)) # Compiler flags CPPFLAGS += -I$(srcdir)/include -I. @@ -395,18 +390,20 @@ $(srcdir)/sources.mk: endif .PHONY: dist-client -dist-client: $(addprefix $(srcdir)/, $(cli_distgen)) - $(tarball) -x $(srcdir)/src/scripts/gen-tarball-version \ +dist-client: + $(tarball) -x $(srcdir)/src/scripts/gen-client-configure \ $(TARNAME)-client $(version) \ -C $(srcdir)/src/client \ - $(notdir $(filter src/client/%, $(src)) $(cli_distgen)) \ + $(notdir $(filter src/client/%, $(src))) \ -C $(srcdir)/include fnameat.h proto.h version.h \ -C $(srcdir)/src/lib/global version.c \ -C $(srcdir)/src/lib/gen fnameat.c \ -C $(srcdir)/src/lib $(addprefix w32/, $(client/w32)) \ -C $(srcdir)/man empire.6 \ -C $(srcdir)/build-aux install-sh \ - -C $(srcdir) COPYING INSTALL + -C $(srcdir) COPYING INSTALL \ + m4/ax_lib_socket_nsl.m4 m4/my_lib_readline.m4 \ + m4/my_terminfo.m4 m4/my_windows_api.m4 .PHONY: dist-info dist-info: info html @@ -449,16 +446,3 @@ config.status: configure src/lib/global/path.c src/client/ipglob.c: %: %.in GNUmakefile Make.mk $(call quiet-command,$(subst.in) <$< >$@,GEN $@) - - -# Make files for standalone client distribution - -$(srcdir)/src/client/configure: src/client/configure.ac src/client/aclocal.m4 - cd $(dir $@) && autoconf - -$(srcdir)/src/client/config.h.in: src/client/configure.ac src/client/aclocal.m4 - cd $(dir $@) && autoheader - touch $@ - -$(srcdir)/src/client/aclocal.m4: m4/ax_lib_socket_nsl.m4 m4/my_lib_readline.m4 m4/my_terminfo.m4 m4/my_windows_api.m4 - cat $^ >$@ diff --git a/src/scripts/gen-client-configure b/src/scripts/gen-client-configure new file mode 100755 index 000000000..952b7a0d6 --- /dev/null +++ b/src/scripts/gen-client-configure @@ -0,0 +1,13 @@ +#!/bin/sh -e + +if [ $# = 0 ]; then + echo "Usage: $0 NAME VERSION (FILE | -C DIR)..." + exit 1 +fi + +cd $1-$2 +printf "%s" $2 >.tarball-version +cat m4/*.m4 >aclocal.m4 +autoconf +autoheader +rm -rf m4 autom4te.cache -- 2.43.0