summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.org>2009-12-20 15:31:55 +0059
committerWaldemar Brodkorb <wbx@openadk.org>2009-12-20 17:37:03 +0100
commitc26f83a3f04f3281bb4431a1c4ac9a6f7dc55b84 (patch)
tree3bc85104595a6b35c9472bab5fc3f890feb64900
parent89192ea453b664cabb05b0a3037269bf02c3fae2 (diff)
Fix BSD make
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
-rw-r--r--BSDmakefile6
-rw-r--r--GNUmakefile2
-rw-r--r--Makefile9
-rw-r--r--Makefile.inc4
4 files changed, 13 insertions, 8 deletions
diff --git a/BSDmakefile b/BSDmakefile
index 843c4146a..86b674100 100644
--- a/BSDmakefile
+++ b/BSDmakefile
@@ -5,6 +5,10 @@ ADKVERSION= 0.1.0
TOPDIR= ${.CURDIR}
PWD= ${.CURDIR}
+.include "${.CURDIR}/Makefile.inc"
+
+GMAKE_ENV+= ADKVERSION=${ADKVERSION:Q}
+
.if defined(package) && !empty(package)
subdir:= package/${package}
. if !make(clean)
@@ -22,7 +26,7 @@ _subdir: ${_subdir_dep}
exit 1; \
fi
cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} DEVELOPER=1 \
- gmake VERBOSE=1 ${.MFLAGS} ${_subdir}
+ ${GMAKE} VERBOSE=1 ${.MFLAGS} ${_subdir}
. include "${.CURDIR}/prereq.mk"
. include "${.CURDIR}/mk/split-cfg.mk"
diff --git a/GNUmakefile b/GNUmakefile
index 5d2279a17..83d4f4386 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -4,6 +4,8 @@
TOPDIR:= $(shell pwd)
PWD:= ${TOPDIR}
+include Makefile.inc
+
ADKVERSION= 0.1.0
export ADKVERSION
diff --git a/Makefile b/Makefile
index f1d49ed44..0c92ba021 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,6 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-CC?= gcc
-GMAKE?= $(PWD)/scripts/make
-GMAKE_FMK= ${GMAKE} -f $(PWD)/mk/build.mk
-GMAKE_INV= ${GMAKE_FMK} --no-print-directory
-
all: .prereq_done
@${GMAKE_INV} all
@@ -145,11 +140,11 @@ world: .prereq_done
prereq:
@rm -f .prereq_done
- @${MAKE} .prereq_done --no-print-directory
+ @${GMAKE} .prereq_done
prereq-noerror:
@rm -f .prereq_done
- @${MAKE} .prereq_done NO_ERROR=1
+ @${GMAKE} .prereq_done NO_ERROR=1
NO_ERROR=0
.prereq_done:
diff --git a/Makefile.inc b/Makefile.inc
new file mode 100644
index 000000000..4cc06dfad
--- /dev/null
+++ b/Makefile.inc
@@ -0,0 +1,4 @@
+CC?= gcc
+GMAKE?= env ${GMAKE_ENV} $(PWD)/scripts/make
+GMAKE_FMK= ${GMAKE} -f $(PWD)/mk/build.mk
+GMAKE_INV= ${GMAKE_FMK} --no-print-directory