X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2FMakefile.lib;h=2ce2e2194f26634a5bb476ea0f5a74e10e080721;hb=5bb0571bfddcdcd3fbf42a58fcce4d0b743fe62f;hp=aeea84a2483638e8fd30379ca7c2c695dd1aff6a;hpb=f01ef569cddb1a8627b1c6b3a134998ad1cf4b22;p=pandora-kernel.git diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index aeea84a24836..2ce2e2194f26 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -93,9 +93,9 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) # already # $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will # end up in (or would, if it gets compiled in) -# Note: It's possible that one object gets potentially linked into more -# than one module. In that case KBUILD_MODNAME will be set to foo_bar, -# where foo and bar are the name of the modules. +# Note: Files that end up in two or more modules are compiled without the +# KBUILD_MODNAME definition. The reason is that any made-up name would +# differ in different configs. name-fix = $(subst $(comma),_,$(subst -,_,$1)) basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" modname_flags = $(if $(filter 1,$(words $(modname))),\ @@ -167,6 +167,7 @@ ifdef REGENERATE_PARSERS quiet_cmd_gperf = GPERF $@ cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $< +.PRECIOUS: $(src)/%.hash.c_shipped $(src)/%.hash.c_shipped: $(src)/%.gperf $(call cmd,gperf) @@ -177,6 +178,7 @@ LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy) quiet_cmd_flex = LEX $@ cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $< +.PRECIOUS: $(src)/%.lex.c_shipped $(src)/%.lex.c_shipped: $(src)/%.l $(call cmd,flex) @@ -187,12 +189,14 @@ YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy) quiet_cmd_bison = YACC $@ cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $< +.PRECIOUS: $(src)/%.tab.c_shipped $(src)/%.tab.c_shipped: $(src)/%.y $(call cmd,bison) quiet_cmd_bison_h = YACC $@ cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $< +.PRECIOUS: $(src)/%.tab.h_shipped $(src)/%.tab.h_shipped: $(src)/%.y $(call cmd,bison_h)