From f48d512223ca6436b265017b04a9d3956afb764c Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Mon, 16 Jun 2014 22:00:42 +0200 Subject: [PATCH] Abort build if config.h needs to be updated close #179 Thanks progandy --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2f77570..0c3a9f5 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,10 @@ options: ${OBJ}: config.h config.mk -config.h: - @echo creating $@ from config.def.h - @cp config.def.h $@ +config.h: config.def.h + @if test -s $@; then echo $< is newer than $@, merge and save $@. If you haven\'t edited $@ you can just delete it && exit 1; fi + @echo creating $@ from $< + @cp $< $@ dunst: ${OBJ} @echo "${CC} ${CFLAGS} -o $@ ${OBJ} ${LDFLAGS}"