kbuild: More cleaning work...
[linux-flexiantxendom0-3.2.10.git] / scripts / Makefile
1 ###
2 # scripts contains sources for various helper programs used throughout
3 # the kernel for the build process.
4 # ---------------------------------------------------------------------------
5 # fix-dep:       Used to generate dependency information during build process
6 # split-include: Divide all config symbols up in a number of files in
7 #                include/config/...
8 # docproc:       Preprocess .tmpl file in order to generate .sgml documentation
9 # conmakehash:   Create arrays for initializing the kernel console tables
10 # tkparse:       Used by xconfig
11
12 EXTRA_TARGETS := fixdep split-include docproc conmakehash
13
14 subdir- := lxdialog
15
16 # Yikes. We need to build this stuff here even if the user only wants
17 # modules.
18
19 KBUILD_BUILTIN := 1
20
21 # The following temporary rule will make sure that people's
22 # trees get updated to the right permissions, since patch(1)
23 # can't do it
24 # ---------------------------------------------------------------------------
25
26 host-progs := fixdep split-include conmakehash docproc tkparse
27 tkparse-objs := tkparse.o tkcond.o tkgen.o
28
29 clean-files := kconfig.tk
30
31 include $(TOPDIR)/Rules.make
32
33 # In reality kconfig.tk should depend on all Config.in files,
34 # but it is not worth the effort to generate the dependencies.
35 # The alternative solution to always generate it is fairly fast.
36 # FORCE it to remake
37 $(obj)/kconfig.tk: $(srctree)/arch/$(ARCH)/config.in $(obj)/tkparse FORCE
38         @echo '  Generating $@'
39         @(                                                      \
40         if [ -f /usr/local/bin/wish ];        then              \
41                 echo '#!'"/usr/local/bin/wish -f";              \
42         else                                                    \
43                 echo '#!'"/usr/bin/wish -f";                    \
44         fi;                                                     \
45         cat $(src)/header.tk;                                   \
46         $(obj)/tkparse < $<;                                    \
47         echo "set defaults \"arch/${ARCH}/defconfig\"";         \
48         echo "set ARCH \"${ARCH}\"";                            \
49         cat $(src)/tail.tk;                                     \
50         ) > $@
51         @chmod 755 $@
52
53
54 # ---------------------------------------------------------------------------
55 # Targets hardcoded and wellknow in top-level makefile
56 .PHONY: lxdialog
57 lxdialog:
58         $(call descend,scripts/lxdialog,)
59
60 # fixdep is needed to compile other host programs
61 $(obj)/split-include $(obj)/docproc $(addprefix $(obj)/,$(tkparse-objs)) \
62 $(obj)/conmakehash lxdialog: $(obj)/fixdep