EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: "Yendell, Gary (DLSLtd,RAL,LSCI)" <gary.yendell at diamond.ac.uk>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Sun, 14 Aug 2022 22:03:00 -0700
On 8/12/22 10:03, Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk wrote:
...
%Parameters.template$(DEP): $(TOP)/pvi/%.pvi.producer.yaml
      @$(RM) $@>       echo "%Parameters.template: $(TOP)/pvi/%.pvi.producer.yaml" > $@

I don't think that replicating the .template dependency is the
right way to go.  The purpose of a $(DEP) file is to capture
indirect dependencies.  eg. if your .yaml file contains
references to other files.

A look at rules for MSI might be informative.

$ git grep -iB3 MSI3 -- configure/
configure/CONFIG_DATABASE_MODULE-
configure/CONFIG_DATABASE_MODULE-# Windows can need these paths to be quoted
configure/CONFIG_DATABASE_MODULE-MAKEBPT = "$(EPICS_BASE_HOST_BIN)/makeBpt$(HOSTEXE)"
configure/CONFIG_DATABASE_MODULE:MSI3_15 = "$(EPICS_BASE_HOST_BIN)/msi$(HOSTEXE)"
--
configure/RULES.Db-
configure/RULES.Db-%.db$(DEP): %$(SUBST_SUFFIX)
configure/RULES.Db-     @$(RM) $@
configure/RULES.Db:     $(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
...
--
configure/RULES.Db-$(COMMON_DIR)/%.db: %$(SUBST_SUFFIX)
configure/RULES.Db-     $(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
configure/RULES.Db-     @$(RM) $(notdir $@)
configure/RULES.Db:     $(MSI3_15) $(DBFLAGS) -o $(notdir $@) -S$< $(TEMPLATE_FILENAME)
--
...

Where

$ git grep '^\s*COMMONDEP_TARGET'
configure/RULES.Db:COMMONDEP_TARGET = $(COMMON_DIR)/$(basename $@)


An example end result when expanding a evr-pmc-230.substitutions file:

$ cat mrfioc2/evrMrmApp/Db/O.linux-x86_64/evr-pmc-230.db.d ../O.Common/evr-pmc-230.db: ../mrmevrbase.template \
 ../../../db/evrbase.db \
 ../../../mrmShared/Db/databuftx.db \
 ../../../mrmShared/Db/databuftxCtrl.db \
 ../mrmevrbufrx.db \
 ../../../mrmShared/Db/sfp.db \
 ../../../db/evrmap.db \
 ../../../db/evrevent.db \
 ../../../db/evrscale.db \
 ../mrmevrout.db \
 ../mrmevroutint.db \
 ../../../db/evrpulser.db \
 ../../../db/evrpulsermap.db \
 ../../../db/evrin.db

Another common thing to do is to emit a dependency on
"../Makefile" to (hopefully) regenerate if the rules
are changed.  (more less guaranteed while you are
trying to get this working)

References:
Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk
Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Andrew Johnson via Tech-talk
Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk

Navigate by Date:
Prev: Re: forcing rpath Michael Davidsaver via Tech-talk
Next: How to input TIME field values in aSub record types? Amin Hosseini Nejad via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk
Next: pypva, PvObject and NTTable Kuldeep Joshi via Tech-talk
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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·