From 6ad17522994653bf59a6e9e43bdb6970a9d73c0c Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Fri, 2 Sep 2016 14:53:59 -0400 Subject: Fix directory changes to use explicit subshells We depend on the behavior of having a separate subshell for each line in our Makefiles, so force it where make (observed FreeBSD 10.3) does not create one. [ghudson@mit.edu: also changed rules in config/post.in] (back ported from commit 69571141ccc2483b54e015a5d7c77d1e926f2822) ticket: 8492 version_fixed: 1.13.7 --- src/build-tools/Makefile.in | 2 +- src/config/post.in | 8 ++++---- src/doc/Makefile.in | 4 ++-- src/include/Makefile.in | 2 +- src/kadmin/testing/scripts/Makefile.in | 4 ++-- src/lib/rpc/Makefile.in | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/build-tools/Makefile.in b/src/build-tools/Makefile.in index 271c002..e6ab8a7 100644 --- a/src/build-tools/Makefile.in +++ b/src/build-tools/Makefile.in @@ -14,7 +14,7 @@ PKGCONFIG_FILES = \ all-unix:: krb5-config $(PKGCONFIG_FILES) krb5-config $(PKGCONFIG_FILES): $(BUILDTOP)/config.status - cd $(BUILDTOP) && $(SHELL) config.status $(mydir)/$@ + (cd $(BUILDTOP) && $(SHELL) config.status $(mydir)/$@) krb5-config: $(srcdir)/krb5-config.in kadm-client.pc: $(srcdir)/kadm-client.pc.in kadm-server.pc: $(srcdir)/kadm-server.pc.in diff --git a/src/config/post.in b/src/config/post.in index 07816ed..fb34fba 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -170,9 +170,9 @@ Makefiles-prerecurse: Makefile # mydir = relative path from top to this Makefile Makefile: $(srcdir)/Makefile.in $(srcdir)/deps $(BUILDTOP)/config.status \ $(top_srcdir)/config/pre.in $(top_srcdir)/config/post.in - cd $(BUILDTOP) && $(SHELL) config.status $(mydir)/Makefile + (cd $(BUILDTOP) && $(SHELL) config.status $(mydir)/Makefile) $(BUILDTOP)/config.status: $(top_srcdir)/configure - cd $(BUILDTOP) && $(SHELL) config.status --recheck + (cd $(BUILDTOP) && $(SHELL) config.status --recheck) # autom4te.cache supposedly improves performance with multiple runs, but # it breaks across versions, and around MIT we've got plenty of version # mixing. So nuke it. @@ -181,8 +181,8 @@ $(top_srcdir)/configure: @MAINT@ \ $(top_srcdir)/patchlevel.h \ $(top_srcdir)/aclocal.m4 -$(RM) -r $(top_srcdir)/autom4te.cache - cd $(top_srcdir) && \ - $(AUTOCONF) --include=$(CONFIG_RELTOPDIR) $(AUTOCONFFLAGS) + (cd $(top_srcdir) && \ + $(AUTOCONF) --include=$(CONFIG_RELTOPDIR) $(AUTOCONFFLAGS)) -$(RM) -r $(top_srcdir)/autom4te.cache RECURSE_TARGETS=all-recurse clean-recurse distclean-recurse install-recurse \ diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in index 0963a8f..792c7bc 100644 --- a/src/doc/Makefile.in +++ b/src/doc/Makefile.in @@ -93,8 +93,8 @@ pdf: $(PDFDIR) composite: Doxyfile $(docsrc)/version.py rm -rf doxy rst_apiref rst_composite $(DOXYGEN) - cwd=`pwd`; cd $(docsrc)/tools && \ - $(PYTHON) doxy.py -i $$cwd/doxy/xml -o $$cwd/rst_apiref + (cwd=`pwd`; cd $(docsrc)/tools && \ + $(PYTHON) doxy.py -i $$cwd/doxy/xml -o $$cwd/rst_apiref) mkdir -p rst_composite do_subdirs="$(RST_SOURCES)" ; \ for i in $$do_subdirs; do \ diff --git a/src/include/Makefile.in b/src/include/Makefile.in index b160ea4..45f7469 100644 --- a/src/include/Makefile.in +++ b/src/include/Makefile.in @@ -35,7 +35,7 @@ all-unix:: @MAINT@ verify-calling-conventions-krb5 $(srcdir)/autoconf.h.in: @MAINT@ $(srcdir)/autoconf.stmp $(srcdir)/autoconf.stmp: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4 $(RM) -r $(top_srcdir)/autom4te.cache - cd $(top_srcdir) && $(AUTOHEADER) --include=$(CONFIG_RELTOPDIR) $(AUTOHEADERFLAGS) + (cd $(top_srcdir) && $(AUTOHEADER) --include=$(CONFIG_RELTOPDIR) $(AUTOHEADERFLAGS)) touch $(srcdir)/autoconf.stmp $(RM) -r $(top_srcdir)/autom4te.cache diff --git a/src/kadmin/testing/scripts/Makefile.in b/src/kadmin/testing/scripts/Makefile.in index 1e14d61..725a7ac 100644 --- a/src/kadmin/testing/scripts/Makefile.in +++ b/src/kadmin/testing/scripts/Makefile.in @@ -14,9 +14,9 @@ all:: env-setup.sh $(GEN_SCRIPTS) env-setup.sh: env-setup.stamp env-setup.stamp: $(srcdir)/env-setup.shin $(BUILDTOP)/config.status \ Makefile - cd $(BUILDTOP) && \ + (cd $(BUILDTOP) && \ CONFIG_FILES=$(mydir)/env-setup.sh:$(mydir)/env-setup.shin $(SHELL) \ - config.status + config.status) chmod +x env-setup.sh touch env-setup.stamp diff --git a/src/lib/rpc/Makefile.in b/src/lib/rpc/Makefile.in index 487dcff..e546747 100644 --- a/src/lib/rpc/Makefile.in +++ b/src/lib/rpc/Makefile.in @@ -221,7 +221,7 @@ do-dyn-lclint:: $(BUILDTOP)/include/gssrpc/types.h: types.stamp types.stamp: $(top_srcdir)/include/gssrpc/types.hin $(BUILDTOP)/config.status - cd $(BUILDTOP) && $(SHELL) config.status include/gssrpc/types.h + (cd $(BUILDTOP) && $(SHELL) config.status include/gssrpc/types.h) touch types.stamp clean-unix:: -- cgit v1.1