summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 46c6d61..59630fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,13 @@ CLEANFILES =
@distribution@
@common@
+# With or Without openpkg (w_or_wo_openpkg) definition
+if OPENPKG
+ w_or_wo_openpkg = sed -e 's/^@OPENPKG@//;/^@WITHOUT_OPENPKG@/d'
+else
+ w_or_wo_openpkg = sed -e 's/^@WITHOUT_OPENPKG@//;/^@OPENPKG@/d'
+endif
+
distclean-local:
rm -rf $(srcdir)/autom4te*.cache
@@ -390,11 +397,7 @@ EXTRA_DIST += php/admin/templates/page.tpl.in
php/admin/templates/versions.tpl: php/admin/templates/versions.tpl.in
@$(mkinstalldirs) php/admin/templates
-if OPENPKG
- sed 's/^@OPENPKG@//' <$(srcdir)/php/admin/templates/versions.tpl.in >$@
-else
- sed '/^@OPENPKG@.*/d' <$(srcdir)/php/admin/templates/versions.tpl.in >$@
-endif
+ $(w_or_wo_openpkg) <$(srcdir)/php/admin/templates/versions.tpl.in >$@
CLEANFILES += php/admin/templates/versions.tpl
EXTRA_DIST += php/admin/templates/versions.tpl.in