From: Zbigniew Jędrzejewski-Szmek Date: Fri, 14 Jul 2017 00:57:43 +0000 (-0400) Subject: build-sys: add basic support for ./configure && make && make install X-Git-Tag: v235~308^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7e157032bb5a9cb2d951fc6b28394d66cb513ad;p=thirdparty%2Fsystemd.git 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= --- diff --git a/Makefile b/Makefile new file mode 100644 index 00000000000..09222128cde --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +all: + ninja -C build + +install: + DESTDIR=$(DESTDIR) ninja -C build diff --git a/configure b/configure new file mode 100755 index 00000000000..a9db8a1cff5 --- /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[@]}"