Browse Source

Fix BSD make

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Thorsten Glaser 14 years ago
parent
commit
c26f83a3f0
4 changed files with 13 additions and 8 deletions
  1. 5 1
      BSDmakefile
  2. 2 0
      GNUmakefile
  3. 2 7
      Makefile
  4. 4 0
      Makefile.inc

+ 5 - 1
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"

+ 2 - 0
GNUmakefile

@@ -4,6 +4,8 @@
 TOPDIR:=	$(shell pwd)
 PWD:=		${TOPDIR}
 
+include Makefile.inc
+
 ADKVERSION=	0.1.0
 export ADKVERSION
 

+ 2 - 7
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:

+ 4 - 0
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