diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2019-01-29 19:33:59 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-01-29 19:55:37 +0300 |
commit | c86b2f549bd099fdb56834d28a8103e8b9814e32 (patch) | |
tree | f40ab4b40047724d3812168831a1d7d78f40db00 /winsup/cygwin/Makefile.in | |
parent | e148aa62a79619b102c394029d170d22198542ea (diff) |
Cygwin: Makefile.in: Improve dependency for version info
The version info only depends on the object files. This results
in the version info not being rebuild immediately if a source
file is changed. Rather, the version info is only rebuilt on the
next make run.
Fix that by making the version info build rule dependent on the
source files.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/Makefile.in')
-rw-r--r-- | winsup/cygwin/Makefile.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index ecdabb003..4dc849b4a 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -761,7 +761,12 @@ libssp.a: ${LIB_NAME} $(newlib_build)/libc/ssp/lib.a ${EXTRALIBS}: lib%.a: %.o $(AR) cru $@ $? -winver.o: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES) +# Every time we touch a source file, the version info has to be rebuilt +# to maintain a correct build date, especially in uname release output +find_src_files = $(wildcard $(dir)/*.[chS]) $(wildcard $(dir)/*.cc) +src_files := $(foreach dir,$(VPATH),$(find_src_files)) + +winver.o: mkvers.sh include/cygwin/version.h winver.rc $(src_files) @echo "Making version.cc and winver.o";\ /bin/sh ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) ${CFLAGS} $(addprefix -I,${CCWRAP_SYSTEM_HEADERS} ${CCWRAP_DIRAFTER_HEADERS}) |