aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gen-configure.el
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-04-27 11:27:08 +0000
committerLaurent Bercot <ska@appnovation.com>2025-04-27 11:27:08 +0000
commitba7a3d22cb728a4230bb78dba3b6b46907dcefee (patch)
tree1edda83a6cef51e2f34fe8d3fbb96de92a5cc999 /tools/gen-configure.el
parent79e226cbaf64b20e85df75d2225a98bc2b3fe3dd (diff)
downloadutmps-ba7a3d22cb728a4230bb78dba3b6b46907dcefee.tar.gz
pkg-config support, prepare for 0.1.3.0, etc.
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'tools/gen-configure.el')
-rwxr-xr-xtools/gen-configure.el31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/gen-configure.el b/tools/gen-configure.el
new file mode 100755
index 0000000..2017dc2
--- /dev/null
+++ b/tools/gen-configure.el
@@ -0,0 +1,31 @@
+#!/command/execlineb -S0
+
+# For dev use only. Don't run this, it overwrites your configure.
+
+# The quoting interactions in sed and sh make it impossible to get
+# such a simple thing done. It's amazing how bad traditional Unix is.
+
+backtick -E TEMPLATE { redirfd -r 0 tools/configure.template s6-cat }
+s6-envdir -Lf package/configure-snippets
+multisubstitute
+{
+ importas -uS configure_help_install
+ importas -uS configure_help_dependencies
+ importas -uS configure_help_options
+ importas -uS configure_init_vars
+ importas -uS configure_case_lines
+ importas -uS configure_expand_dirs
+ importas -uS configure_slashpackage_other
+ importas -uS configure_generate_make
+ importas -uS configure_generate_configh
+}
+
+if
+{
+ heredoc 0 ${TEMPLATE}
+ redirfd -w 1 configure.new
+ s6-cat
+}
+
+if { s6-chmod 0755 configure.new }
+s6-rename configure.new configure