From f3d23eb267c24f2e77b99302607aec86295507e7 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 23 Apr 2014 14:09:03 +0000 Subject: [PATCH] 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. --- Makefile | 10 ++++++++-- config-null.mk | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 config-null.mk 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 -- 2.47.3