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.
https://github.com/epics-mdules/LabJack/blob/c32fae7e1c4b72a8ba7d317f54d45d1e6c1a507f/iocBoot/iocLabJack_T8/st.cmd#L26
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Wang, Andrew via Tech-talk
Sent: Monday, November 28, 2022 12:16 PM
To: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Using one substitution file for multiple template files
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?