]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add config-null.mk and a nasty hack to include config.mk instead if it exists.
authorRoy Marples <roy@marples.name>
Wed, 23 Apr 2014 14:09:03 +0000 (14:09 +0000)
committerRoy Marples <roy@marples.name>
Wed, 23 Apr 2014 14:09:03 +0000 (14:09 +0000)
This allows make clean to work without configure being run.

Makefile
config-null.mk [new file with mode: 0644]

index 34db686e47c117c785ff7bd923b276192c831921..fa34b4336a843e3b596796bc1d00b0e247ef066e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,13 @@ SRCS+=         dhcp-common.c
 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 @@ distclean: clean
 
 dist:
        fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
-       gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE}
+       gunzip -c ${DISTFILEGZ} |  bzip2 >${DISTFILE}
        rm ${DISTFILEGZ}
 
 import: ${SRCS}
diff --git a/config-null.mk b/config-null.mk
new file mode 100644 (file)
index 0000000..6bf701d
--- /dev/null
@@ -0,0 +1 @@
+# This space left intentionally blank