aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/Makefile11
1 files changed, 8 insertions, 3 deletions
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}