From: Todd C. Miller Date: Wed, 12 Jul 2017 11:45:46 +0000 (-0600) Subject: Remove pointless subshells in targets that simply change the directory X-Git-Tag: SUDO_1_8_21^2~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e70a953fb4157f0946ac456de5e351f4e5a33f7e;p=sudo Remove pointless subshells in targets that simply change the directory and execute a command. The command is already run in a shell so there is no need to execute a subshell in this case. --- diff --git a/Makefile.in b/Makefile.in index d85a8f40c..16349c0b4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2010-2015 Todd C. Miller +# Copyright (c) 2010-2015, 2017 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -162,7 +162,7 @@ uninstall-nls: done siglist.c signame.c: - (cd lib/util && exec $(MAKE) $@) + cd lib/util && exec $(MAKE) $@ depend: siglist.c signame.c $(top_srcdir)/mkdep.pl --builddir=`pwd` --srcdir=$(top_srcdir) \ diff --git a/doc/Makefile.in b/doc/Makefile.in index a6f2ea23f..b0e54f394 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2010-2015 Todd C. Miller +# Copyright (c) 2010-2015, 2017 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -104,7 +104,7 @@ lint: all fi Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file doc/Makefile) + cd $(top_builddir) && ./config.status --file doc/Makefile .SUFFIXES: .man @@ -155,10 +155,10 @@ $(srcdir)/visudo.man.in: $(srcdir)/visudo.mdoc.in fi $(mansrcdir)/visudo.man: $(top_builddir)/config.status $(srcdir)/visudo.man.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(mansrcdir)/visudo.mdoc: $(top_builddir)/config.status $(srcdir)/visudo.mdoc.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(srcdir)/visudo.cat: varsub $(srcdir)/visudo.mdoc.in @if [ -n "$(DEVEL)" ]; then \ @@ -178,10 +178,10 @@ $(srcdir)/sudo.conf.man.in: $(srcdir)/sudo.conf.mdoc.in fi $(mansrcdir)/sudo.conf.man: $(top_builddir)/config.status $(srcdir)/sudo.conf.man.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(mansrcdir)/sudo.conf.mdoc: $(top_builddir)/config.status $(srcdir)/sudo.conf.mdoc.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(srcdir)/sudo.conf.cat: varsub $(srcdir)/sudo.conf.mdoc.in @if [ -n "$(DEVEL)" ]; then \ @@ -230,10 +230,10 @@ $(srcdir)/sudoers.ldap.man.in: $(srcdir)/sudoers.ldap.mdoc.in fi $(mansrcdir)/sudoers.ldap.man: $(top_builddir)/config.status $(srcdir)/sudoers.ldap.man.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(mansrcdir)/sudoers.ldap.mdoc: $(top_builddir)/config.status $(srcdir)/sudoers.ldap.mdoc.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(srcdir)/sudoers.ldap.cat: varsub $(srcdir)/sudoers.ldap.mdoc.in @if [ -n "$(DEVEL)" ]; then \ @@ -253,10 +253,10 @@ $(srcdir)/sudoreplay.man.in: $(srcdir)/sudoreplay.mdoc.in fi $(mansrcdir)/sudoreplay.man: $(top_builddir)/config.status $(srcdir)/sudoreplay.man.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(mansrcdir)/sudoreplay.mdoc: $(top_builddir)/config.status $(srcdir)/sudoreplay.mdoc.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(srcdir)/sudoreplay.cat: varsub $(srcdir)/sudoreplay.mdoc.in @if [ -n "$(DEVEL)" ]; then \ @@ -276,10 +276,10 @@ $(srcdir)/sudo_plugin.man.in: $(srcdir)/sudo_plugin.mdoc.in fi $(mansrcdir)/sudo_plugin.man: $(top_builddir)/config.status $(srcdir)/sudo_plugin.man.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(mansrcdir)/sudo_plugin.mdoc: $(top_builddir)/config.status $(srcdir)/sudo_plugin.mdoc.in - (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) + cd $(top_builddir) && $(SHELL) config.status --file=doc/$@ $(srcdir)/sudo_plugin.cat: varsub $(srcdir)/sudo_plugin.mdoc.in @if [ -n "$(DEVEL)" ]; then \ diff --git a/examples/Makefile.in b/examples/Makefile.in index 784650469..a177403f2 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2014 Todd C. Miller +# Copyright (c) 2014, 2017 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -56,7 +56,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ all: $(EXAMPLES) Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file examples/Makefile) + cd $(top_builddir) && ./config.status --file examples/Makefile pre-install: diff --git a/include/Makefile.in b/include/Makefile.in index bb96fba04..835895431 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2011-2014 Todd C. Miller +# Copyright (c) 2011-2015, 2017 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -50,7 +50,7 @@ SHELL = @SHELL@ all: Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file include/Makefile) + cd $(top_builddir) && ./config.status --file include/Makefile .SUFFIXES: .h diff --git a/lib/util/Makefile.in b/lib/util/Makefile.in index dbf6a7667..1dd555763 100644 --- a/lib/util/Makefile.in +++ b/lib/util/Makefile.in @@ -139,7 +139,7 @@ VSYSLOG_TEST_OBJS = vsyslog_test.lo vsyslog.lo all: libsudo_util.la Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file lib/util/Makefile) + cd $(top_builddir) && ./config.status --file lib/util/Makefile .SUFFIXES: .c .h .lo diff --git a/lib/zlib/Makefile.in b/lib/zlib/Makefile.in index 4b7fd7406..1925634cb 100644 --- a/lib/zlib/Makefile.in +++ b/lib/zlib/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2011-2014 Todd C. Miller +# Copyright (c) 2011-2017 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -95,7 +95,7 @@ LTOBJS = adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzlib.lo \ all: libsudo_z.la Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file lib/zlib/Makefile) + cd $(top_builddir) && ./config.status --file lib/zlib/Makefile .SUFFIXES: .c .h .lo diff --git a/plugins/group_file/Makefile.in b/plugins/group_file/Makefile.in index 2dde773a3..797e1c437 100644 --- a/plugins/group_file/Makefile.in +++ b/plugins/group_file/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2010-2014 Todd C. Miller +# Copyright (c) 2010-2017 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -107,7 +107,7 @@ VERSION = @PACKAGE_VERSION@ all: group_file.la Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file plugins/group_file/Makefile) + cd $(top_builddir) && ./config.status --file plugins/group_file/Makefile .SUFFIXES: .o .c .h .lo diff --git a/plugins/sample/Makefile.in b/plugins/sample/Makefile.in index ea023699f..13c12cca5 100644 --- a/plugins/sample/Makefile.in +++ b/plugins/sample/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2011-2014 Todd C. Miller +# Copyright (c) 2011-2017 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -106,7 +106,7 @@ VERSION = @PACKAGE_VERSION@ all: sample_plugin.la Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file plugins/sample/Makefile) + cd $(top_builddir) && ./config.status --file plugins/sample/Makefile .SUFFIXES: .o .c .h .lo diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index dedc08bf6..90c3233f0 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -220,7 +220,7 @@ $(shlib_opt): $(shlib_exp) @true Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile) + cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile libparsesudoers.la: $(LIBPARSESUDOERS_OBJS) $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -o $@ $(LIBPARSESUDOERS_OBJS) -no-install @@ -316,7 +316,7 @@ $(devdir)/def_data.c $(devdir)/def_data.h: $(srcdir)/def_data.in fi sudoers: $(srcdir)/sudoers.in - (cd $(top_builddir) && $(SHELL) config.status --file=plugins/sudoers/$@) + cd $(top_builddir) && $(SHELL) config.status --file=plugins/sudoers/$@ pre-install: @if test X"$(cross_compiling)" != X"yes" -a -r $(DESTDIR)$(sudoersdir)/sudoers; then \ diff --git a/plugins/system_group/Makefile.in b/plugins/system_group/Makefile.in index b19138350..eca722d9a 100644 --- a/plugins/system_group/Makefile.in +++ b/plugins/system_group/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2011-2014 Todd C. Miller +# Copyright (c) 2011-2017 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -107,7 +107,7 @@ VERSION = @PACKAGE_VERSION@ all: system_group.la Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file plugins/system_group/Makefile) + cd $(top_builddir) && ./config.status --file plugins/system_group/Makefile .SUFFIXES: .o .c .h .lo diff --git a/src/Makefile.in b/src/Makefile.in index 22b62e1d2..adb9895a5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -132,10 +132,10 @@ VERSION = @PACKAGE_VERSION@ all: $(PROGS) Makefile: $(srcdir)/Makefile.in - (cd $(top_builddir) && ./config.status --file src/Makefile) + cd $(top_builddir) && ./config.status --file src/Makefile ./sudo_usage.h: $(srcdir)/sudo_usage.h.in - (cd $(top_builddir) && ./config.status --file src/sudo_usage.h) + cd $(top_builddir) && ./config.status --file src/sudo_usage.h .SUFFIXES: .c .h .lo .o