Makefile 2.47 KB
Newer Older
1 2 3
###
# scripts contains sources for various helper programs used throughout
# the kernel for the build process.
4
# ---------------------------------------------------------------------------
5 6 7 8 9 10
# 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
11

12
EXTRA_TARGETS := fixdep split-include docproc conmakehash
13

14 15 16 17 18
# Yikes. We need to build this stuff here even if the user only wants
# modules.

KBUILD_BUILTIN := 1

19 20 21
# The following temporary rule will make sure that people's
# trees get updated to the right permissions, since patch(1)
# can't do it
22
# ---------------------------------------------------------------------------
23

24 25
host-progs := fixdep split-include conmakehash docproc tkparse
tkparse-objs := tkparse.o tkcond.o tkgen.o
26

27
include $(TOPDIR)/Rules.make
Linus Torvalds's avatar
Linus Torvalds committed
28

29 30 31 32
# 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
33
$(obj)/kconfig.tk: $(srctree)/arch/$(ARCH)/config.in $(obj)/tkparse FORCE
34
	@echo '  Generating $@'
35
	@(                                                      \
36
	if [ -f /usr/local/bin/wish ];        then              \
37
		echo '#!'"/usr/local/bin/wish -f";              \
38
	else                                                    \
39
		echo '#!'"/usr/bin/wish -f";                    \
40 41 42 43 44 45
	fi;                                                     \
	cat $(src)/header.tk;                                   \
	$(obj)/tkparse < $<;                                    \
	echo "set defaults \"arch/${ARCH}/defconfig\"";         \
	echo "set ARCH \"${ARCH}\"";                            \
	cat $(src)/tail.tk;                                     \
46
	) > $@
47
	@chmod 755 $@
Linus Torvalds's avatar
Linus Torvalds committed
48

49

50 51
# ---------------------------------------------------------------------------
# Targets hardcoded and wellknow in top-level makefile
52 53
.PHONY: lxdialog
lxdialog:
54
	$(call descend,lxdialog,)
55 56

# fixdep is needed to compile other host programs
57 58
$(obj)/split-include $(obj)/docproc $(addprefix $(obj)/,$(tkparse-objs)) \
$(obj)/conmakehash lxdialog: $(obj)/fixdep
59

60 61 62 63 64
mrproper:
	@echo 'Making mrproper (scripts)'
	@rm -f $(tkparse-objs) $(obj)/kconfig.tk
	@rm -f core $(host-progs)
	@$(MAKE) -C lxdialog mrproper
65