diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-09-01 16:41:32 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-09-01 16:49:13 -0500 |
commit | 07580067764f07953570e6e6dddf7b9196b1c400 (patch) | |
tree | 4608a277d4bb2262094aafbf46238576d51a0a78 | |
parent | a7b6d5a4928d3eb9f9ab83c5d604dc15973f8026 (diff) | |
download | talos-hostboot-07580067764f07953570e6e6dddf7b9196b1c400.tar.gz talos-hostboot-07580067764f07953570e6e6dddf7b9196b1c400.zip |
Reduce FAPI rebuilds to only when xml files change.
Change-Id: I67336a65c5026fa017d5cae679662820f3cfe2d5
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/292
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r-- | config.mk | 6 | ||||
-rw-r--r-- | src/usr/hwpf/makefile | 24 |
2 files changed, 16 insertions, 14 deletions
@@ -28,7 +28,7 @@ all: ifdef MODULE OBJDIR = ${ROOTPATH}/obj/modules/${MODULE} BEAMDIR = ${ROOTPATH}/obj/beam/${MODULE} -GENDIR = ${ROOTPATH}/obj/genfiles/ +GENDIR = ${ROOTPATH}/obj/genfiles IMGDIR = ${ROOTPATH}/img EXTRACOMMONFLAGS += -fPIC -Bsymbolic -Bsymbolic-functions ifdef STRICT @@ -41,7 +41,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr ${GENDIR} else OBJDIR = ${ROOTPATH}/obj/core BEAMDIR = ${ROOTPATH}/obj/beam/core -GENDIR = ${ROOTPATH}/obj/genfiles/ +GENDIR = ${ROOTPATH}/obj/genfiles IMGDIR = ${ROOTPATH}/img EXTRAINCDIR += ${GENDIR} endif @@ -231,6 +231,8 @@ gen_pass: _GENFILES = $(addprefix ${GENDIR}/, ${GENFILES}) GEN_PASS: ${_GENFILES} ${SUBDIRS:.d=.gen_pass} +GENTARGET = $(addprefix %/, $(1)) + ${BEAMDIR}/%.beam : %.C mkdir -p ${BEAMDIR} ${BEAMCMD} -I ${INCDIR} ${CXXFLAGS} ${BEAMFLAGS} $< \ diff --git a/src/usr/hwpf/makefile b/src/usr/hwpf/makefile index 499041e24..48f46c401 100644 --- a/src/usr/hwpf/makefile +++ b/src/usr/hwpf/makefile @@ -23,21 +23,21 @@ ROOTPATH = ../../.. MODULE = hwpf -GENFILES = gen_errfiles fapiAttributeIds.H +FAPI_ERROR_TARGETS = fapiHwpReturnCodes.H fapiCollectFfdc.C \ + fapiErrorInfoMemInit.C +FAPI_ATTR_TARGETS = fapiAttributeIds.H +GENFILES = ${FAPI_ERROR_TARGETS} ${FAPI_ATTR_TARGETS} SUBDIRS = fapi.d hwp.d plat.d test.d include ${ROOTPATH}/config.mk -# fapiParseErrorInfo.pl produces multiple output files. Use a dummy target to -# create a single rule to create all files so that the script is only run once -# (instead of once for each output file which could fail in a parallel build). -# The disadvantage is that the script is always run, even if there are no -# updates, but it is safe and there is no easy solution -${GENDIR}/gen_errfiles : fapi/fapiParseErrorInfo.pl hwp/fapiHwpErrorInfo.xml - $< ${GENDIR} $(filter-out $<,$^) +# fapiParseErrorInfo.pl produces multiple output files: FAPI_ERROR_TARGETS +$(call GENTARGET, $(FAPI_ERROR_TARGETS)) : \ + fapi/fapiParseErrorInfo.pl hwp/fapiHwpErrorInfo.xml + $< $(dir $@) $(filter-out $<,$^) -# fapiParseAttributeInfo.pl produces a single output file so a standard rule -# will work -${GENDIR}/fapiAttributeIds.H : fapi/fapiParseAttributeInfo.pl hwp/fapiHwpAttributeInfo.xml - $< ${GENDIR} $(filter-out $<,$^) +# fapiParseAttributeInfo.pl produces a single output file: FAPI_ATTR_TARGETS +$(call GENTARGET, $(FAPI_ATTR_TARGETS)) : \ + fapi/fapiParseAttributeInfo.pl hwp/fapiHwpAttributeInfo.xml + $< $(dir $@) $(filter-out $<,$^) |