Experimental Physics and Industrial Control System
Hi Benjamin,
On 2012-07-06 Benjamin Franksen wrote:
>
> Exactly. This time the problem is in RULES.Db:
>
> $(COMMON_DIR)/%Record.h: $(COMMON_DIR)/%Record.dbd
> @$(RM) $(notdir $@)$(DEP)
> @$(DBDDEPENDS_CMD)
> echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
> @$(RM) $(notdir $@)
> $(DBTORECORDTYPEH) $(DBDFLAGS) $< $(notdir $@)
> @$(MV) $(notdir $@) $@
>
> (and five other similar rules in the same file).
There are lots of changes to the build and dependency rules in the 3.15
branch; for example the above rule is replaced by these:
%Record.h$(DEP): $(COMMON_DIR)/%Record.dbd
@$(RM) $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
$(COMMON_DIR)/%Record.h: $(COMMON_DIR)/%Record.dbd
@$(RM) $(notdir $@)
$(DBTORECORDTYPEH) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
Unfortunately with the 3.15 rules it is sometimes necessary to manually add
dependencies for the $(DEP) files to an application Makefile. These replace
the $(OBJ) dependency rule that Mark posted, so for parallel build to work
properly with the 3.15 rules his example rule
vmeRecord$(OBJ): $(COMMON_DIR)/vmeRecord.h
will have to become
vmeRecord$(DEP): $(COMMON_DIR)/vmeRecord.h
or if you build multiple record types in the same source directory you could
replace multiple copies of the above line with this pattern:
%Record$(DEP): $(COMMON_DIR)/%Record.h
These are necessary because the vmeRecord.d file can't be generated until the
vmeRecord.h file exists. vmeRecord.d tells GNUmake what files must be up to
date before vmeRecord.o can be compiled; the .d file gets generated by passing
vmeRecord.c through the C pre-processor with some special flags, and for that
to find all of the header files referenced by the vmeRecord.c file we must
have already converted the vmeRecord.dbd file into vmeRecord.h.
- Andrew
--
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte
- References:
- RE: Problems with parallel make on seq-2-1-7 Mark Rivers
- Re: Problems with parallel make on seq-2-1-7 Benjamin Franksen
- Navigate by Date:
- Prev:
Problem in SNL santosh aditya
- Next:
RE: Problem in SNL Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Problems with parallel make on seq-2-1-7 Benjamin Franksen
- Next:
sequencer release 2.1.8 Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024