From e7e157032bb5a9cb2d951fc6b28394d66cb513ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 13 Jul 2017 20:57:43 -0400 Subject: [PATCH] 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= --- Makefile | 5 +++++ configure | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Makefile create mode 100755 configure diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..09222128cd --- /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 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[@]}"