Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / scripts / Makefile
index 7134cf6..3626666 100644 (file)
@@ -2,62 +2,36 @@
 # 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
+# kallsyms:      Find all symbols in vmlinux
+# pnmttologo:    Convert pnm files to logo files
+# conmakehash:   Create chartable
 # conmakehash:  Create arrays for initializing the kernel console tables
-# tkparse:      Used by xconfig
+# docproc:       Used in Documentation/DocBook
 
-# 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
+HOST_EXTRACFLAGS += -I$(srctree)/tools/include
 
-all: fixdep split-include docproc conmakehash $(CHMOD_FILES)
+hostprogs-$(CONFIG_KALLSYMS)     += kallsyms
+hostprogs-$(CONFIG_LOGO)         += pnmtologo
+hostprogs-$(CONFIG_VT)           += conmakehash
+hostprogs-$(CONFIG_IKCONFIG)     += bin2c
+hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
 
-host-progs := fixdep split-include conmakehash docproc tkparse
-tkparse-objs := tkparse.o tkcond.o tkgen.o
+always         := $(hostprogs-y) $(hostprogs-m)
 
-include $(TOPDIR)/Rules.make
+# The following hostprogs-y programs are only build on demand
+hostprogs-y += unifdef docproc
 
-$(CHMOD_FILES): FORCE
-       @chmod a+x $@
+# These targets are used internally to avoid "is up to date" messages
+PHONY += build_unifdef
+build_unifdef: scripts/unifdef FORCE
+       @:
+build_docproc: scripts/docproc 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              \
-               echo '#!'"/usr/local/bin/wish -f";              \
-       else                                                    \
-               echo '#!'"/usr/bin/wish -f";                    \
-       fi;                                                     \
-       cat $(src)/header.tk;                                   \
-       $(obj)/tkparse < $<;                                    \
-       echo "set defaults \"arch/${ARCH}/defconfig\"";         \
-       echo "set ARCH \"${ARCH}\"";                            \
-       cat $(src)/tail.tk;                                     \
-       ) > $@
-       @chmod 755 $@
-
-
-# ---------------------------------------------------------------------------
-# Targets hardcoded and wellknow in top-level makefile
-.PHONY: lxdialog
-lxdialog:
-       $(MAKE) -C lxdialog all
-
-# fixdep is needed to compile other host programs
-$(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
+subdir-$(CONFIG_MODVERSIONS) += genksyms
+subdir-y                     += mod
+subdir-$(CONFIG_SECURITY_SELINUX) += selinux
+subdir-$(CONFIG_DTC)         += dtc
 
+# Let clean descend into subdirs
+subdir-        += basic kconfig package selinux