summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-07-13 20:57:43 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-07-18 10:05:06 -0400
commite7e157032bb5a9cb2d951fc6b28394d66cb513ad (patch)
treea52a40063d7b64da19008e846a0b5c7ccefaa49e /configure
parent02263eb75ef2f2b6e46d36232c0470f297225e83 (diff)
downloadsystemd-e7e157032bb5a9cb2d951fc6b28394d66cb513ad.tar.gz
build-sys: add basic support for ./configure && make && make install
This adds the basic make support required by https://github.com/cgwalters/build-api. CFLAGS, CXXFLAGS, DESTDIR variables are supported: ./configure CFLAGS=... CXXFLAGS=... && make && make install DESTDIR=
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 0000000000..a9db8a1cff
--- /dev/null
+++ b/configure
@@ -0,0 +1,21 @@
+#!/bin/bash -e
+
+cflags=CFLAGS="$CFLAGS"
+cxxflags=CXXFLAGS="$CXXFLAGS"
+declare -a args
+j=0
+for i in "$@"; do
+ case "$i" in
+ CFLAGS=*)
+ cflags="$i";;
+ CXXFLAGS=*)
+ cxxflags="$i";;
+ *)
+ args[$j]="$i"
+ j=$((j+1))
+ esac
+done
+
+export "$cflags" "$cxxflags"
+set -x
+exec meson build "${args[@]}"