summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-25 14:15:44 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-25 14:15:44 -0700
commiteedd04171ff3c6017e52830e8e07ec437e1c6663 (patch)
tree2e6be92570d53c1e134c806e3de7e0477b11c017 /Makefile.am
parent82b2f6abc7b3b5e3164675c28a27506b39eeb9a7 (diff)
downloadvyatta-cfg-quagga-eedd04171ff3c6017e52830e8e07ec437e1c6663.tar.gz
vyatta-cfg-quagga-eedd04171ff3c6017e52830e8e07ec437e1c6663.zip
Generate interface templates as part of build
Rather than 100's of copies of the same template, use the same process as the firewall module to generate the templates. For this, the are meta-templates in interface-templates directory which get processed and $IFNAME is replaced by the appropriate CLI syntax to refer back to the directory name. Changing a quagga template in most cases can be done by fixing the meta-template.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index acff766f..bd49e36d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
cfgdir = $(datadir)/vyatta-cfg/templates
curverdir = $(sysconfdir)/config-migrate/current
+gentmpdir = generated-templates
bin_SCRIPTS = scripts/vyatta-show-protocols
@@ -21,6 +22,15 @@ curver_DATA = cfg-version/quagga@1
cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \
cpio -0pd
+all-local:
+ rm -rf $(gentmpdir)
+ ./gen-interface-templates.pl $(gentmpdir)
+ rm -r $(gentmpdir)/interfaces/loopback/node.tag/disable-link-detect
+
+clean-local:
+ rm -rf $(gentmpdir)
+
install-exec-hook:
mkdir -p $(DESTDIR)$(cfgdir)
cd templates; $(cpiop) $(DESTDIR)$(cfgdir)
+ cd $(gentmpdir); $(cpiop) $(DESTDIR)$(cfgdir)