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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Using one substitution file for multiple template files |
From: | "Wang, Andrew via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Mark Rivers <rivers at cars.uchicago.edu> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Fri, 9 Dec 2022 02:04:33 +0000 |
Hi Mark,
I'll take a look at the links and let you know if I have additional questions.
Thank you,
Andy
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Monday, November 28, 2022 1:29 PM To: Wang, Andrew <wang126 at llnl.gov> Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: RE: Using one substitution file for multiple template files Hi Andrew,
I am not sure I understand what you are asking. But the following are definitely possible:
- Calling multiple different .template files from a single .substitutions file - If there are macro arguments that are common to more than one of the .template files you can omit them from the substitutions file and pass them in the dbLoadTemplate file.
Here is an example of a .substitutions file that loads 9 different .template files: https://github.com/epics-modules/LabJack/blob/master/LabJackApp/Db/LabJack_T7.substitutions
That substitutions file gets loaded from this st.cmd, which passes 4 macro arguments in the dbLoadTemplate command. These are used by many of the .template files, and are not contained in the .substitutions file.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Wang, Andrew via Tech-talk
Hi,
I was curious if there is an option to allow macros in multiple template files to be replaced using just one substitution file.
Like, suppose we have three template files named test1.template, test2.template, and test3.template. Is it possible for there to be just one substitution file so that the macros in those templates can be correctly substituted during the build process?
Thanks, Andy |