From d02c2b1fb2c663f4486834f7d8f43b1db7172fa2 Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Wed, 5 Jun 2002 02:19:54 -0500 Subject: kbuild: Fix calling of scripts We source some scripts, but still pass parameters to them, e.g. . mk_version_h $@ $(KERNELRELEASE) $(VERSION) ... This does not work for all kinds of /bin/sh (it does for bash, that's why I did not notice). The fix is easy: Just mark the scripts executable and call instead of source them. Unfortunately, patch(1) doesn't understand about propagating chmod. bk does, so changing the tree isn't hard, and we introduce an explicit chmod a+x executed during the build for propagating this change into those trees which get "traditionally" patched up. --- scripts/Makefile | 16 ++++++++++------ scripts/docgen | 0 scripts/gen-all-syms | 0 scripts/kernel-doc | 0 scripts/mkcompile_h | 0 scripts/mkversion_h | 0 6 files changed, 10 insertions(+), 6 deletions(-) mode change 100644 => 100755 scripts/docgen mode change 100644 => 100755 scripts/gen-all-syms mode change 100644 => 100755 scripts/kernel-doc mode change 100644 => 100755 scripts/mkcompile_h mode change 100644 => 100755 scripts/mkversion_h (limited to 'scripts') diff --git a/scripts/Makefile b/scripts/Makefile index 0c1ef38ca7ec..c4c86002e762 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -2,7 +2,12 @@ # always needed # --------------------------------------------------------------------------- -all: mkdep split-include +# The following temporary rule will make sure that people's +# trees get updated to the right permissions, since patch(1) +# can't do it +CHMOD_FILES := docgen gen-all-syms kernel-doc mkcompile_h mkversion_h makelst + +all: mkdep split-include $(CHMOD_FILES) mkdep: mkdep.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< @@ -10,6 +15,9 @@ mkdep: mkdep.c split-include: split-include.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< +$(CHMOD_FILES): FORCE + @chmod a+x $@ + # xconfig # --------------------------------------------------------------------------- @@ -44,15 +52,11 @@ tkparse.o tkcond.o tkgen.o: %.o: %.c # DocBook stuff # --------------------------------------------------------------------------- -doc-progs: docproc docgen gen-all-syms kernel-doc +doc-progs: docproc docproc: docproc.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -docgen gen-all-syms kernel-doc: FORCE - chmod 755 $@ - - include $(TOPDIR)/Rules.make # we don't have automatic deps for host programs diff --git a/scripts/docgen b/scripts/docgen old mode 100644 new mode 100755 diff --git a/scripts/gen-all-syms b/scripts/gen-all-syms old mode 100644 new mode 100755 diff --git a/scripts/kernel-doc b/scripts/kernel-doc old mode 100644 new mode 100755 diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h old mode 100644 new mode 100755 diff --git a/scripts/mkversion_h b/scripts/mkversion_h old mode 100644 new mode 100755 -- cgit v1.2.3