From ead1d4e1cda81ca5bf53788fb0bd892d720fc7ee Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Fri, 16 Aug 2002 01:08:11 +0200 Subject: [PATCH] kbuild: Moved conmakehash to scripts - Suggested by David Miller to avoid a race with make -j Furthermore cleaned up a little in scripts/Makefile - Use $(obj) - Added a few comments --- scripts/Makefile | 67 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) (limited to 'scripts/Makefile') diff --git a/scripts/Makefile b/scripts/Makefile index 1efc9dc8ba49..a18193a4e838 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -1,58 +1,57 @@ - -# always needed +### +# scripts contains sources for various helper programs used throughout +# the kernel for the build process. # --------------------------------------------------------------------------- +# fix-dep: Used to generate dependency information during build process +# split-include: Divide all config symbols up in a number of files in +# include/config/... +# docproc: Preprocess .tmpl file in order to generate .sgml documentation +# conmakehash: Create arrays for initializing the kernel console tables +# tkparse: Used by xconfig # 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 := kernel-doc mkcompile_h makelst -all: fixdep split-include docproc $(CHMOD_FILES) +all: fixdep split-include docproc conmakehash $(CHMOD_FILES) -$(CHMOD_FILES): FORCE - @chmod a+x $@ +host-progs := fixdep split-include conmakehash docproc tkparse +tkparse-objs := tkparse.o tkcond.o tkgen.o -# xconfig -# --------------------------------------------------------------------------- +include $(TOPDIR)/Rules.make -HEADER=header.tk -TAIL=tail.tk -# Previous versions always remade kconfig.tk because they always depended -# on soundscript. This runs fairly fast, and I can't find all the -# Config.in files to depend on anyways. So I'll force it to remake. +$(CHMOD_FILES): FORCE + @chmod a+x $@ -kconfig.tk: $(TOPDIR)/arch/$(ARCH)/config.in tkparse $(HEADER) $(TAIL) FORCE +# In reality kconfig.tk should depend on all Config.in files, +# but it is not worth the effort to generate the dependencies. +# The alternative solution to always generate it is fairly fast. +# FORCE it to remake +$(obj)/kconfig.tk: $(srctree)/arch/$(ARCH)/config.in tkparse FORCE @echo ' Generating $@' @( \ - if [ -f /usr/local/bin/wish ]; then \ + if [ -f /usr/local/bin/wish ]; then \ echo '#!'"/usr/local/bin/wish -f"; \ - else \ + else \ echo '#!'"/usr/bin/wish -f"; \ - fi; \ - cat $(HEADER); \ - ./tkparse < $<; \ - echo "set defaults \"arch/${ARCH}/defconfig\""; \ - echo "set ARCH \"${ARCH}\""; \ - cat $(TAIL) \ + fi; \ + cat $(src)/header.tk; \ + $(obj)/tkparse < $<; \ + echo "set defaults \"arch/${ARCH}/defconfig\""; \ + echo "set ARCH \"${ARCH}\""; \ + cat $(src)/tail.tk; \ ) > $@ - chmod 755 $@ + @chmod 755 $@ -# --------------------------------------------------------------------------- +# --------------------------------------------------------------------------- +# Targets hardcoded and wellknow in top-level makefile .PHONY: lxdialog - lxdialog: $(MAKE) -C lxdialog all -# --------------------------------------------------------------------------- - -host-progs := fixdep split-include docproc tkparse - -tkparse-objs := tkparse.o tkcond.o tkgen.o - # fixdep is needed to compile other host programs +$(obj)/split-include $(obj)/docproc $(addprefix $(obj)/,$(tkparse-objs)) \ +$(obj)/conmakehash lxdialog: $(obj)/fixdep -split-include docproc $(tkparse-objs) lxdialog: fixdep - - -include $(TOPDIR)/Rules.make -- cgit v1.2.3 From 917b8a01a996780ef31d8c1467636f7b4923c99b Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Fri, 16 Aug 2002 01:20:52 +0200 Subject: [PATCH] mrproper: Moved knowledge of files in scripts to scripts/Makefile No reason to keep this knowledge in a central place when it can be avoided --- Makefile | 6 ++---- scripts/Makefile | 6 ++++++ scripts/lxdialog/Makefile | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'scripts/Makefile') diff --git a/Makefile b/Makefile index 2c593f5af979..b66aecf9c1ba 100644 --- a/Makefile +++ b/Makefile @@ -631,12 +631,9 @@ MRPROPER_FILES += \ sound/oss/pndspini.c \ drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \ .version .config* config.in config.old \ - scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \ - scripts/lxdialog/*.o scripts/lxdialog/lxdialog \ .menuconfig.log \ include/asm \ - .hdepend scripts/split-include scripts/docproc \ - scripts/fixdep $(TOPDIR)/include/linux/modversions.h \ + .hdepend $(TOPDIR)/include/linux/modversions.h \ tags TAGS kernel.spec \ .tmpversion @@ -666,6 +663,7 @@ mrproper: clean archmrproper -type f -print | xargs rm -f @rm -f $(MRPROPER_FILES) @rm -rf $(MRPROPER_DIRS) + @$(MAKE) -C scripts mrproper @$(MAKE) -f Documentation/DocBook/Makefile mrproper distclean: mrproper diff --git a/scripts/Makefile b/scripts/Makefile index a18193a4e838..7134cf683b24 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -55,3 +55,9 @@ lxdialog: $(obj)/split-include $(obj)/docproc $(addprefix $(obj)/,$(tkparse-objs)) \ $(obj)/conmakehash lxdialog: $(obj)/fixdep +mrproper: + @echo 'Making mrproper (scripts)' + @rm -f $(tkparse-objs) $(obj)/kconfig.tk + @rm -f core $(host-progs) + @$(MAKE) -C lxdialog mrproper + diff --git a/scripts/lxdialog/Makefile b/scripts/lxdialog/Makefile index 1ab9518b1656..153c8b99ffdd 100644 --- a/scripts/lxdialog/Makefile +++ b/scripts/lxdialog/Makefile @@ -39,5 +39,5 @@ ncurses: exit 1 ;\ fi -clean: - rm -f core *.o *~ lxdialog +mrproper: + @rm -f core $(host-progs) $(lxdialog-objs) ncurses -- cgit v1.2.3