From ac6808a73ef51e78080c7eae509831b00a4d8f7b Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 16 Oct 2009 08:13:34 +0100 Subject: Regenerate version.h if necessary --- src/rc/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/rc/Makefile b/src/rc/Makefile index d9f8e11b..9d33192a 100644 --- a/src/rc/Makefile +++ b/src/rc/Makefile @@ -46,12 +46,17 @@ LDADD+= ${LIBDL} ${LIBKVM} include ${MK}/${MKPAM}.mk ${SRCS}: version.h -version.h: - echo "#define VERSION \"${VERSION}${GITVER}\"" >version.h + +.PHONY: version.h.tmp +version.h.tmp: + echo "#define VERSION \"${VERSION}${GITVER}\"" >$@ if test -n "${BRANDING}"; then \ - echo "#define BRANDING \"${BRANDING}\"" >> version.h; \ + echo "#define BRANDING \"${BRANDING}\"" >> $@; \ fi +version.h: version.h.tmp + cmp -s $@.tmp $@ && rm $@.tmp || mv $@.tmp $@ + install: all ${INSTALL} -d ${DESTDIR}${SBINDIR} ${INSTALL} -m ${BINMODE} ${PROG} ${DESTDIR}${SBINDIR} -- cgit v1.2.3