summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-16 15:20:46 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-05-19 10:24:43 +0900
commit44ff8df77748124eb5c5f257eb585e9da26225d8 (patch)
tree94dca4f697449dc22ce5e669e2cd7c63109b0fad /tools
parent02fa218b24304b14a4df82974a730ca341d188fc (diff)
downloadsystemd-44ff8df77748124eb5c5f257eb585e9da26225d8.tar.gz
Drop dependency on m4
m4 was hugely popular in the past, because autotools, automake, flex, bison and many other things used it. But nowadays it much less popular, and might not even be installed in the buildroot. (m4 is small, so it doesn't make a big difference.) (FWIW, Fedora dropped make from the buildroot now, https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot. I think it's reasonable to assume that m4 will be dropped at some point too.) The main reason to drop m4 is that the syntax is not very nice, and we should minimize the number of different syntaxes that we use. We still have two (configure_file() with @FOO@ and jinja2 templates with {{foo}} and the pythonesque conditional expressions), but at least we don't need m4 (with m4_dnl and `quotes').
Diffstat (limited to 'tools')
-rwxr-xr-xtools/meson-apply-m4.sh21
1 files changed, 0 insertions, 21 deletions
diff --git a/tools/meson-apply-m4.sh b/tools/meson-apply-m4.sh
deleted file mode 100755
index 6c5726a7d5..0000000000
--- a/tools/meson-apply-m4.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-# SPDX-License-Identifier: LGPL-2.1-or-later
-set -eu
-
-CONFIG="${1:?Missing path to config.h}"
-TARGET="${2:?Missing target m4 file}"
-
-if [ ! -f "$CONFIG" ]; then
- echo "$CONFIG not found."
- exit 2
-fi
-
-if [ ! -f "$TARGET" ]; then
- echo "$TARGET not found."
- exit 3
-fi
-
-DEFINES=()
-mapfile -t DEFINES < <(awk '$1 == "#define" && $3 == "1" { printf "-D%s\n", $2 }' "$CONFIG")
-
-m4 -P "${DEFINES[@]}" "$TARGET"