[Scummvm-git-logs] scummvm master -> 59752c2835beb8ddf6b60c1860149afe9da00fbc
sev-
sev at scummvm.org
Fri Apr 23 00:01:12 UTC 2021
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:
59752c2835 MAKEFILE: Auto-generate dependencies for scummvm.rc
Commit: 59752c2835beb8ddf6b60c1860149afe9da00fbc
https://github.com/scummvm/scummvm/commit/59752c2835beb8ddf6b60c1860149afe9da00fbc
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2021-04-23T02:01:09+02:00
Commit Message:
MAKEFILE: Auto-generate dependencies for scummvm.rc
Changed paths:
Makefile.common
backends/platform/sdl/win32/win32.mk
diff --git a/Makefile.common b/Makefile.common
index dff8dbbcbc..825f475fe0 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -89,7 +89,7 @@ MODULE_DIRS += $(sort $(dir $(DETECT_OBJS)))
endif
# Depdir information
-DEPDIRS = $(addsuffix $(DEPDIR),$(MODULE_DIRS))
+DEPDIRS = $(addsuffix $(DEPDIR),$(MODULE_DIRS)) dists/$(DEPDIR)
DEPFILES =
# Make base/version.o depend on all other object files. This way if anything is
@@ -203,9 +203,17 @@ endif
$(QUIET_AS)$(AS) $(ASFLAGS) $(<) -o $@
# Build rule for Windows resource files
-# TODO: Support dependency tracking
+# The regular expression is a portable form of ^(.*\s(FILE|ICON|RT_MANIFEST|DATA)|#include)\s+"([^"]*)".*$
+# This finds lines in the form '... FILE "path/file.ext" ...' (and also ICON and #include)
+# and replaces them with the $(srcdir)/path/file.ext \
+# The second sed removes winresrc.h (system include) and config.h (not in srcdir, printed
+# by the echo before sed), and strips the trailing backslash on the last line.
%.o: %.rc
$(QUIET)$(MKDIR) $(*D)
+ $(QUIET)$(MKDIR) $(*D)/$(DEPDIR)
+ $(QUIET)echo "$@: $< config.h config.mk \\" > $(*D)/$(DEPDIR)/scummvm.d
+ $(QUIET)sed -n 's:^\(.*[[:space:]]\(FILE\|ICON\|RT_MANIFEST\|DATA\)\|#include\)[[:space:]][[:space:]]*"\([^"]*\)".*$$: $(srcdir)/\3 \\:p; ' $(<) | \
+ sed '/winresrc\.h\|config\.h/d; $$ s/ \\//' >> $(*D)/$(DEPDIR)/scummvm.d
$(QUIET_WINDRES)$(WINDRES) $(WINDRESFLAGS) $(CPPFLAGS) $(<) -o $@
ifdef USE_NASM
diff --git a/backends/platform/sdl/win32/win32.mk b/backends/platform/sdl/win32/win32.mk
index 3b97ac6054..f13de82685 100644
--- a/backends/platform/sdl/win32/win32.mk
+++ b/backends/platform/sdl/win32/win32.mk
@@ -2,18 +2,6 @@
# Windows specific
#
-dists/scummvm.o: \
- config.h \
- config.mk \
- $(srcdir)/icons/scummvm.ico \
- $(srcdir)/icons/count.ico \
- $(srcdir)/base/internal_version.h \
- $(srcdir)/base/internal_plugins.h \
- $(DIST_FILES_THEMES) \
- $(DIST_FILES_NETWORKING) \
- $(DIST_FILES_ENGINEDATA) \
- $(DIST_FILES_SHADERS)
-
# Special target to create a win32 snapshot binary (for Inno Setup)
win32dist: all
mkdir -p $(WIN32PATH)
More information about the Scummvm-git-logs
mailing list