aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/genksyms/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /scripts/genksyms/Makefile
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'scripts/genksyms/Makefile')
-rw-r--r--scripts/genksyms/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
new file mode 100644
index 000000000000..5875f29a8602
--- /dev/null
+++ b/scripts/genksyms/Makefile
@@ -0,0 +1,49 @@
1
2hostprogs-y := genksyms
3always := $(hostprogs-y)
4
5genksyms-objs := genksyms.o parse.o lex.o
6
7# -I needed for generated C source (shipped source)
8HOSTCFLAGS_parse.o := -Wno-uninitialized -I$(src)
9
10# dependencies on generated files need to be listed explicitly
11$(obj)/lex.o: $(obj)/parse.h $(obj)/keywords.c
12
13# -I needed for generated C source (shipped source)
14HOSTCFLAGS_lex.o := -I$(src)
15
16ifdef GENERATE_PARSER
17
18# gperf
19
20quiet_cmd_keywords.c = GPERF $@
21 cmd_keywords.c = gperf -L ANSI-C -a -C -E -g -H is_reserved_hash \
22 -k 1,3,$$ -N is_reserved_word -p -t $< > $@
23
24$(obj)/keywords.c: $(obj)/keywords.gperf FORCE
25 $(call if_changed,keywords.c)
26
27# flex
28
29quiet_cmd_lex.c = FLEX $@
30 cmd_lex.c = flex -o$@ -d $(filter-out FORCE,$^)
31
32$(obj)/lex.c: $(obj)/lex.l $(obj)/parse.h FORCE
33 $(call if_changed,lex.c)
34
35# bison
36
37quiet_cmd_parse.c = BISON $@
38 cmd_parse.c = bison -o$@ -dtv $(filter-out FORCE,$^)
39
40$(obj)/parse.c: $(obj)/parse.y FORCE
41 $(call if_changed,parse.c)
42
43$(obj)/parse.h: $(obj)/parse.c ;
44
45clean-files += parse.output
46
47endif
48
49targets += keywords.c lex.c parse.c parse.h