changeset 2429:08730e3a664e draft

gmake-4 supports != shell assignment operator, like BSD make. This breaks our hack to support both, so workaround by using GNUmakefile at the toplevel. Note that building a source release now requires BSD make or gmake-4
author Roy Marples <roy@marples.name>
date Wed, 23 Apr 2014 16:00:50 +0000
parents 4b4e14507dd6
children 7c4784bf2adb
files GNUmakefile Makefile README dhcpcd-hooks/GNUmakefile dhcpcd-hooks/Makefile test/GNUmakefile test/Makefile
diffstat 7 files changed, 16 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/GNUmakefile	Wed Apr 23 14:09:03 2014 +0000
+++ b/GNUmakefile	Wed Apr 23 16:00:50 2014 +0000
@@ -1,7 +1,8 @@
 # GNU Make does not automagically include .depend
 # Luckily it does read GNUmakefile over Makefile so we can work around it
 
-.PHONY:		.depend.depend
+# Nasty hack so that make clean works without configure being run
+CONFIG_MK?=$(shell test -e config.mk && echo config.mk || echo config-null.mk)
 
 include Makefile
 -include .depend
--- a/Makefile	Wed Apr 23 14:09:03 2014 +0000
+++ b/Makefile	Wed Apr 23 16:00:50 2014 +0000
@@ -9,11 +9,8 @@
 CSTD?=		c99
 MKDIRS=
 
-# Nasty hack so that make clean works without configure being run
-_CONFIG_MK_SH=	test -e config.mk && echo config.mk || echo config-null.mk
-_CONFIG_MK!=	${_CONFIG_MK_SH}
-CONFIG_MK=	${_CONFIG_MK}$(shell ${_CONFIG_MK_SH})
-include		${CONFIG_MK}
+TOP?=		.
+include ${TOP}/iconfig.mk
 
 CFLAGS+=	-std=${CSTD}
 
@@ -56,13 +53,8 @@
 SED_SCRIPT=		-e 's:@SCRIPT@:${SCRIPT}:g'
 SED_SYS=		-e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
 
-_DEPEND_SH=	test -e .depend && echo ".depend" || echo ""
-_DEPEND!=	${_DEPEND_SH}
-DEPEND=		${_DEPEND}$(shell ${_DEPEND_SH})
-
-_VERSION_SH=	sed -n 's/\#define VERSION[[:space:]]*"\(.*\)".*/\1/p' defs.h
-_VERSION!=	${_VERSION_SH}
-VERSION=	${_VERSION}$(shell ${_VERSION_SH})
+DEPEND!=	test -e .depend && echo ".depend" || echo ""
+VERSION!=	sed -n 's/\#define VERSION[[:space:]]*"\(.*\)".*/\1/p' defs.h
 
 FOSSILID?=	current
 
--- a/README	Wed Apr 23 14:09:03 2014 +0000
+++ b/README	Wed Apr 23 16:00:50 2014 +0000
@@ -83,6 +83,9 @@
 the binary has to run on older versions which lack support, such as getline.
 ./configure --without-getline
 
+Building for distribution (ie making a dhcpcd source tarball) now requires
+gmake-4 or any BSD make.
+
 
 Hooks
 -----
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dhcpcd-hooks/GNUmakefile	Wed Apr 23 16:00:50 2014 +0000
@@ -0,0 +1,2 @@
+TOP?=	..
+include ${TOP}/GNUmakefile
--- a/dhcpcd-hooks/Makefile	Wed Apr 23 14:09:03 2014 +0000
+++ b/dhcpcd-hooks/Makefile	Wed Apr 23 16:00:50 2014 +0000
@@ -1,6 +1,6 @@
 TOP?=	../
 include ${TOP}/Makefile.inc
-include ${TOP}/config.mk
+include ${TOP}/iconfig.mk
 
 SCRIPTSDIR=	${LIBEXECDIR}/dhcpcd-hooks
 SCRIPTS=	01-test 02-dump
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/GNUmakefile	Wed Apr 23 16:00:50 2014 +0000
@@ -0,0 +1,2 @@
+TOP?=	..
+include ${TOP}/GNUmakefile
--- a/test/Makefile	Wed Apr 23 14:09:03 2014 +0000
+++ b/test/Makefile	Wed Apr 23 16:00:50 2014 +0000
@@ -1,4 +1,5 @@
-include ../config.mk
+TOP?=	..
+include ${TOP}/iconfig.mk
 
 PROG=		test
 SRCS=		test.c