annotate kconfig/Makefile @ 1183:0752b2d58909 draft

Rename xmsprintf() to just xmprintf(). Partly because there's no supplied target string ala sprintf, and partly because I can never remember what order the m and s go in.
author Rob Landley <rob@landley.net>
date Thu, 16 Jan 2014 09:26:50 -0600
parents d4176f3f3835
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
1 # ===========================================================================
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
2 # Kernel configuration targets
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
3 # These targets are used from top-level makefile
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
4
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
5 KCONFIG_TOP = Config.in
110
db63b2829eda Move project name to Makefile.
Rob Landley <rob@landley.net>
parents: 109
diff changeset
6 KCONFIG_PROJECT = ToyBox
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
7 obj = ./kconfig
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
8 PHONY += clean help oldconfig menuconfig config silentoldconfig \
133
a459c6b39645 Fix makefile to defconfig properly, and leak in a bit of the new test
Rob Landley <rob@landley.net>
parents: 120
diff changeset
9 randconfig allyesconfig allnoconfig allmodconfig defconfig
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
10
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 133
diff changeset
11 menuconfig: $(obj)/mconf $(KCONFIG_TOP)
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
12 $< $(KCONFIG_TOP)
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
13
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 133
diff changeset
14 config: $(obj)/conf $(KCONFIG_TOP)
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
15 $< $(KCONFIG_TOP)
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
16
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 133
diff changeset
17 oldconfig: $(obj)/conf $(KCONFIG_TOP)
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
18 $< -o $(KCONFIG_TOP)
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
19
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 133
diff changeset
20 silentoldconfig: $(obj)/conf $(KCONFIG_TOP)
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
21 $< -s $(KCONFIG_TOP)
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
22
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 133
diff changeset
23 randconfig: $(obj)/conf $(KCONFIG_TOP)
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
24 $< -r $(KCONFIG_TOP)
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
25
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 133
diff changeset
26 allyesconfig: $(obj)/conf $(KCONFIG_TOP)
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
27 $< -y $(KCONFIG_TOP)
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
28
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 133
diff changeset
29 allnoconfig: $(obj)/conf $(KCONFIG_TOP)
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
30 $< -n $(KCONFIG_TOP)
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
31
233
d4176f3f3835 Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents: 133
diff changeset
32 defconfig: $(obj)/conf $(KCONFIG_TOP)
133
a459c6b39645 Fix makefile to defconfig properly, and leak in a bit of the new test
Rob Landley <rob@landley.net>
parents: 120
diff changeset
33 $< -D /dev/null $(KCONFIG_TOP)
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
34
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
35 # Help text used by make help
41
a43bdc6f53af Add bloat-o-meter, make bloatcheck, and scripts/showasm.
Rob Landley <rob@landley.net>
parents: 38
diff changeset
36 help::
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
37 @echo ' config - Update current config utilising a line-oriented program'
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
38 @echo ' menuconfig - Update current config utilising a menu based program'
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
39 @echo ' oldconfig - Update current config utilising a provided .config as base'
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
40 @echo ' silentoldconfig - Same as oldconfig, but quietly'
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
41 @echo ' randconfig - New config with random answer to all options'
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
42 @echo ' defconfig - New config with default answer to all options'
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
43 @echo ' allyesconfig - New config where all options are accepted with yes'
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
44 @echo ' allnoconfig - New config where all options are answered with no'
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
45
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
46 # Cheesy build
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
47
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
48 SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
49
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
50 %.c: %.c_shipped
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
51 @ln -s $(notdir $<) $@
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
52
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
53 gen_config.h: .config
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
54
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
55 kconfig/mconf: $(SHIPPED)
110
db63b2829eda Move project name to Makefile.
Rob Landley <rob@landley.net>
parents: 109
diff changeset
56 $(HOSTCC) -o $@ kconfig/mconf.c kconfig/zconf.tab.c \
db63b2829eda Move project name to Makefile.
Rob Landley <rob@landley.net>
parents: 109
diff changeset
57 kconfig/lxdialog/*.c -lcurses -DCURSES_LOC="<ncurses.h>" \
db63b2829eda Move project name to Makefile.
Rob Landley <rob@landley.net>
parents: 109
diff changeset
58 -DKBUILD_NO_NLS=1 -DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
59
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
60 kconfig/conf: $(SHIPPED)
120
4dc8017fdb0e Humor dash, which is broken.
Rob Landley <rob@landley.net>
parents: 110
diff changeset
61 $(HOSTCC) -o $@ kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
110
db63b2829eda Move project name to Makefile.
Rob Landley <rob@landley.net>
parents: 109
diff changeset
62 -DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
10
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
63
4d21d59f3206 Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff changeset
64 clean::
120
4dc8017fdb0e Humor dash, which is broken.
Rob Landley <rob@landley.net>
parents: 110
diff changeset
65 rm -f $(wildcard kconfig/*zconf*.c) kconfig/conf kconfig/mconf