summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac31
-rw-r--r--infrastructure/m4/ax_config_scripts.m416
2 files changed, 32 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index ef0cfeb6..9a464f86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,21 +209,22 @@ AC_SUBST([bindir_expanded])
### Output files
-AC_CONFIG_FILES([bin/bbackupd/bbackupd-config
- bin/bbackupquery/makedocumentation.pl
- bin/bbstored/bbstored-certs
- bin/bbstored/bbstored-config
- infrastructure/BoxPlatform.pm
- infrastructure/makebuildenv.pl
- infrastructure/makeparcels.pl
- lib/common/makeexception.pl
- lib/raidfile/raidfile-config
- lib/server/makeprotocol.pl
- runtest.pl
- test/backupstorefix/testfiles/testbackupstorefix.pl
- test/bbackupd/testfiles/extcheck1.pl
- test/bbackupd/testfiles/extcheck2.pl
- test/bbackupd/testfiles/notifyscript.pl])
+AC_CONFIG_FILES([infrastructure/BoxPlatform.pm])
+AX_CONFIG_SCRIPTS([bin/bbackupd/bbackupd-config
+ bin/bbackupquery/makedocumentation.pl
+ bin/bbstored/bbstored-certs
+ bin/bbstored/bbstored-config
+ infrastructure/makebuildenv.pl
+ infrastructure/makeparcels.pl
+ lib/common/makeexception.pl
+ lib/raidfile/raidfile-config
+ lib/server/makeprotocol.pl
+ runtest.pl
+ test/backupstorefix/testfiles/testbackupstorefix.pl
+ test/bbackupd/testfiles/extcheck1.pl
+ test/bbackupd/testfiles/extcheck2.pl
+ test/bbackupd/testfiles/notifyscript.pl])
+# TODO: Need to do contrib/cygwin/install-cygwin-service.pl but location varies
AC_OUTPUT
# Configure the Box build system
diff --git a/infrastructure/m4/ax_config_scripts.m4 b/infrastructure/m4/ax_config_scripts.m4
new file mode 100644
index 00000000..8f5436ae
--- /dev/null
+++ b/infrastructure/m4/ax_config_scripts.m4
@@ -0,0 +1,16 @@
+dnl @synopsis AX_CONFIG_SCRIPTS(SCRIPT_FILE, ...)
+dnl
+dnl Run AC_CONFIG_FILES on a list of scripts while preserving execute
+dnl permission.
+dnl
+dnl @category Automake
+dnl @author Martin Ebourne <martin@zepler.org>
+dnl @script
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CONFIG_SCRIPTS],[
+ AC_REQUIRE([AC_CONFIG_FILES])dnl
+ m4_foreach([SCRIPT_FILE],
+ m4_quote(m4_split(m4_normalize([$1]))),
+ [AC_CONFIG_FILES(SCRIPT_FILE, m4_quote(chmod +x SCRIPT_FILE))])dnl
+])