]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
gmake-4 supports != shell assignment operator, like BSD make.
authorRoy Marples <roy@marples.name>
Wed, 23 Apr 2014 16:00:50 +0000 (16:00 +0000)
committerRoy Marples <roy@marples.name>
Wed, 23 Apr 2014 16:00:50 +0000 (16:00 +0000)
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
Makefile
README
dhcpcd-hooks/GNUmakefile [new file with mode: 0644]
dhcpcd-hooks/Makefile
test/GNUmakefile [new file with mode: 0644]
test/Makefile

index 20f4799334b04a3df5cedc47cd3d92d4f7a4253a..549abe3a2a646e48eb67f8429df0116cfa57542b 100644 (file)
@@ -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
index fa34b4336a843e3b596796bc1d00b0e247ef066e..0e018f5766c7394b3d3e71450f1accfcb839b790 100644 (file)
--- 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 bce2455b060f05405d8dc999c5d0ba66d2357e92..fb6eb8acd4517f03c876a1bc73004ffec74948f6 100644 (file)
--- 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 (file)
index 0000000..1f97d8c
--- /dev/null
@@ -0,0 +1,2 @@
+TOP?=  ..
+include ${TOP}/GNUmakefile
index fab39efe09ebcc471145fe7f4edfe431165403cf..28de9da3689b68aba558b74ffe1fa4398c219c94 100644 (file)
@@ -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 (file)
index 0000000..1f97d8c
--- /dev/null
@@ -0,0 +1,2 @@
+TOP?=  ..
+include ${TOP}/GNUmakefile
index 5f3881c8cc090bf5d70f16af37dbbe7e45aa5acc..186e9c84f43c988947423b99453edd90e3319d00 100644 (file)
@@ -1,4 +1,5 @@
-include ../config.mk
+TOP?=  ..
+include ${TOP}/iconfig.mk
 
 PROG=          test
 SRCS=          test.c