]> err.no Git - linux-2.6/commitdiff
kbuild: fix genksyms Makefile
authorSam Ravnborg <sam@ravnborg.org>
Sat, 1 Sep 2007 08:24:58 +0000 (10:24 +0200)
committerSam Ravnborg <sam@neptun.(none)>
Fri, 12 Oct 2007 19:15:31 +0000 (21:15 +0200)
When enabling GENERATE_PARSER the genksyms Makefile
failed to create _shipped version of generated files.

Modifying keywords.gperf failed to cause a rebuild
of genksyms.
Fixed by specifying keywowrds .c as explicit prerequisite
of the lexer.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/genksyms/Makefile

index 5875f29a86025a35be4f7ab18dc545adbcdd4b76..e420fe440019fd7c1ea8c0a80319f68bd6f4983b 100644 (file)
@@ -23,14 +23,16 @@ quiet_cmd_keywords.c = GPERF   $@
 
 $(obj)/keywords.c: $(obj)/keywords.gperf FORCE
        $(call if_changed,keywords.c)
+       cp $@ $@_shipped
 
 # flex
 
 quiet_cmd_lex.c = FLEX    $@
-      cmd_lex.c = flex -o$@ -d $(filter-out FORCE,$^)
+      cmd_lex.c = flex -o$@ -d $< $(obj)/parse.h
 
-$(obj)/lex.c: $(obj)/lex.l $(obj)/parse.h FORCE
+$(obj)/lex.c: $(obj)/lex.l $(obj)/parse.h $(obj)/keywords.c FORCE
        $(call if_changed,lex.c)
+       cp $@ $@_shipped
 
 # bison
 
@@ -39,6 +41,8 @@ quiet_cmd_parse.c = BISON   $@
 
 $(obj)/parse.c: $(obj)/parse.y FORCE
        $(call if_changed,parse.c)
+       cp $@ $@_shipped
+       cp $(@:.c=.h) $(@:.c=.h)_shipped
 
 $(obj)/parse.h: $(obj)/parse.c ;