summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-04-23 14:09:03 +0000
committerRoy Marples <roy@marples.name>2014-04-23 14:09:03 +0000
commitf3d23eb267c24f2e77b99302607aec86295507e7 (patch)
treeacb1ae5591ec193c5dbfe656482f77c80fba98c7 /Makefile
parent40a9f276dd166f7610228038ad4a77baeee08b8a (diff)
downloaddhcpcd-f3d23eb267c24f2e77b99302607aec86295507e7.tar.xz
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 34db686e..fa34b433 100644
--- 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}