From: Roy Marples Date: Wed, 23 Apr 2014 14:09:03 +0000 (+0000) Subject: Add config-null.mk and a nasty hack to include config.mk instead if it exists. X-Git-Tag: v6.4.0~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f3d23eb267c24f2e77b99302607aec86295507e7;p=thirdparty%2Fdhcpcd.git 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. --- 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} diff --git a/config-null.mk b/config-null.mk new file mode 100644 index 00000000..6bf701d5 --- /dev/null +++ b/config-null.mk @@ -0,0 +1 @@ +# This space left intentionally blank