[Scummvm-git-logs] scummvm master -> 22a2a392d3234139acd02fab99da6f2959ae1893
sev-
sev at scummvm.org
Sat Nov 30 09:51:55 UTC 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
22a2a392d3 BUILD: Fix Version Define Being Added to All Code Objects
Commit: 22a2a392d3234139acd02fab99da6f2959ae1893
https://github.com/scummvm/scummvm/commit/22a2a392d3234139acd02fab99da6f2959ae1893
Author: Yauheni Kaliuta (yauheni.kaliuta at redhat.com)
Date: 2019-11-30T10:51:50+01:00
Commit Message:
BUILD: Fix Version Define Being Added to All Code Objects
Due to a quirk of target specific make variables which means they
are added to all pre-requisities, this resulted in the defines which
were meant to be applied only to the version module being applied to
most of the codebase.
This did not cause any direct issues, but was untidy and unexpected
behaviour which was reported in Pull Request 1946 by janisozaur.
Fix it by defining a special rule for version.o with own flags
instead of using template rule.
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta at redhat.com>
Changed paths:
Makefile.common
diff --git a/Makefile.common b/Makefile.common
index 95b090a..3d2739f 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -136,6 +136,10 @@ ifdef CXX_UPDATE_DEP_FLAG
$(QUIET)$(MKDIR) $(*D)/$(DEPDIR)
$(QUIET_AS)$(CXX) $(CXX_UPDATE_DEP_FLAG) $(ASFLAGS) -c $(<) -o $*.o
+base/version.o: base/version.cpp
+ $(QUIET)$(MKDIR) $(*D)/$(DEPDIR)
+ $(QUIET_CXX)$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(VERFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+
else
# Dumb compile rule, for C++ compilers that don't allow dependency tracking or
@@ -149,6 +153,9 @@ else
$(QUIET)$(MKDIR) $(*D)
$(QUIET_AS)$(CXX) $(ASFLAGS) -c $(<) -o $*.o
+base/version.o: base/version.cpp
+ $(QUIET)$(MKDIR) $(*D)
+ $(QUIET_CXX)$(CXX) $(CXXFLAGS) $(VERFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
endif
# Build rule for assembler files
@@ -192,7 +199,7 @@ VER_EXTRA = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c2-)
ifdef AMIGAOS
# Amiga needs date in specific format for the version cookie
AMIGA_DATE = $(shell gdate '+%d.%m.%Y')
-base/version.o: CXXFLAGS:=$(CXXFLAGS) -DAMIGA_DATE=\"$(AMIGA_DATE)\"
+VERFLAGS += -DAMIGA_DATE=\"$(AMIGA_DATE)\"
endif
######################################################################
@@ -214,7 +221,7 @@ endif
# Define the Subversion revision if available, either autodetected or
# specified by the user, but only for base/version.cpp.
ifneq ($(origin VER_REV), undefined)
-base/version.o: CXXFLAGS:=$(CXXFLAGS) -DSCUMMVM_REVISION=\"$(VER_REV)\"
+VERFLAGS += -DSCUMMVM_REVISION=\"$(VER_REV)\"
endif
######################################################################
More information about the Scummvm-git-logs
mailing list