Skip to content

Commit 6df2c7c

Browse files
committed
Merge 'dev' ~ build (Makefile.win) improvements
2 parents f34003a + 7e54703 commit 6df2c7c

File tree

3 files changed

+200
-182
lines changed

3 files changed

+200
-182
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Makefile (pass-through)
2+
# Cross-platform (bash/sh + CMD/PowerShell)
3+
# GNU make (gmake) compatible; ref: <https://www.gnu.org/software/make/manual>
4+
5+
# ref: https://stackoverflow.com/a/14061796/43774
6+
7+
OSID := $(or $(and $(filter .exe,$(patsubst %.exe,.exe,$(subst $() $(),_,${SHELL}))),$(filter win,${OS:Windows_NT=win})),nix)## OSID == [nix,win]
8+
9+
# gather all goals/targets as arguments; creating an empty rule for each word (which avoids multiple calls to sub-make)
10+
ARGS := $(wordlist 1,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
11+
$(eval $(ARGS):_undefined_;@:)
12+
13+
_default: .DEFAULT
14+
.DEFAULT:
15+
$(if $(filter win,${OSID}),${MAKE} -f Makefile.win ${ARGS}, ./configure && ${MAKE} ${ARGS})

0 commit comments

Comments
 (0)