changeset 2428:4b4e14507dd6 draft

Add config-null.mk and a nasty hack to include config.mk instead if it exists. This allows make clean to work without configure being run.
author Roy Marples <roy@marples.name>
date Wed, 23 Apr 2014 14:09:03 +0000
parents 41812c7656d0
children 08730e3a664e
files Makefile config-null.mk
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Apr 23 14:07:32 2014 +0000
+++ b/Makefile	Wed Apr 23 14:09:03 2014 +0000
@@ -8,7 +8,13 @@
 CFLAGS?=	-O2
 CSTD?=		c99
 MKDIRS=
-include config.mk
+
+# 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}
+
 CFLAGS+=	-std=${CSTD}
 
 SRCS+=		${DHCPCD_SRCS}
@@ -146,7 +152,7 @@
 
 dist:
 	fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
-	gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE}
+	gunzip -c ${DISTFILEGZ} |  bzip2 >${DISTFILE}
 	rm ${DISTFILEGZ}
 
 import: ${SRCS}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config-null.mk	Wed Apr 23 14:09:03 2014 +0000
@@ -0,0 +1,1 @@
+# This space left intentionally blank