From c9beb7cc29899f74ebb638f38f3f23516bc2dc6f Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 23 Apr 2014 16:00:50 +0000 Subject: [PATCH] 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 --- GNUmakefile | 3 ++- Makefile | 16 ++++------------ README | 3 +++ dhcpcd-hooks/GNUmakefile | 2 ++ dhcpcd-hooks/Makefile | 2 +- test/GNUmakefile | 2 ++ test/Makefile | 3 ++- 7 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 dhcpcd-hooks/GNUmakefile create mode 100644 test/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile index 20f47993..549abe3a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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 diff --git a/Makefile b/Makefile index fa34b433..0e018f57 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,8 @@ CFLAGS?= -O2 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_SERVICESTATUS= -e 's:@SERVICESTATUS@:${SERVICESTATUS}:g' 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 diff --git a/README b/README index bce2455b..fb6eb8ac 100644 --- a/README +++ b/README @@ -83,6 +83,9 @@ In this instance, you may wish to disable some configured tests when 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 ----- diff --git a/dhcpcd-hooks/GNUmakefile b/dhcpcd-hooks/GNUmakefile new file mode 100644 index 00000000..1f97d8c4 --- /dev/null +++ b/dhcpcd-hooks/GNUmakefile @@ -0,0 +1,2 @@ +TOP?= .. +include ${TOP}/GNUmakefile diff --git a/dhcpcd-hooks/Makefile b/dhcpcd-hooks/Makefile index fab39efe..28de9da3 100644 --- a/dhcpcd-hooks/Makefile +++ b/dhcpcd-hooks/Makefile @@ -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 diff --git a/test/GNUmakefile b/test/GNUmakefile new file mode 100644 index 00000000..1f97d8c4 --- /dev/null +++ b/test/GNUmakefile @@ -0,0 +1,2 @@ +TOP?= .. +include ${TOP}/GNUmakefile diff --git a/test/Makefile b/test/Makefile index 5f3881c8..186e9c84 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,4 +1,5 @@ -include ../config.mk +TOP?= .. +include ${TOP}/iconfig.mk PROG= test SRCS= test.c -- 2.47.3