Skip to content

Commit

Permalink
build-sys: add basic support for ./configure && make && make install
Browse files Browse the repository at this point in the history
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=
  • Loading branch information
keszybz committed Jul 18, 2017
1 parent 02263eb commit e7e1570
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
all:
ninja -C build

install:
DESTDIR=$(DESTDIR) ninja -C build
21 changes: 21 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -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[@]}"

0 comments on commit e7e1570

Please sign in to comment.