Skip to content

Commit

Permalink
For Windows builds, add logging of build tools (path and version) for…
Browse files Browse the repository at this point in the history
… better CI debugging.
  • Loading branch information
marceltaeumel committed May 2, 2023
1 parent 6316198 commit cb725d2
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 6 deletions.
17 changes: 16 additions & 1 deletion building/win32x86/common/Makefile
Expand Up @@ -140,7 +140,7 @@ INCLUDES:= -I. -I$(VMSRCDIR) -I$(WIN32DIR) -I$(CROSSDIR) $(XINC)
# Common build rules
#

default: print-settings init $(VMEXE) $(CONSOLEVMEXE) $(DLLS) $(STRIPEXE) $(STRIPCONSOLEEXE) nukelibs $(APPPOST)
default: print-tools print-settings init $(VMEXE) $(CONSOLEVMEXE) $(DLLS) $(STRIPEXE) $(STRIPCONSOLEEXE) nukelibs $(APPPOST)

svnver:
echo $(RC) $(RCFLAGS)
Expand Down Expand Up @@ -212,6 +212,21 @@ print-objects:
$(info VMOBJ=$(VMOBJ))
$(info -----------------------------------------------------)

.PHONY : print-tools

print-tools:
$(info ---------------- Build tools ------------------------)
$(info CC $(shell which $(CC)) $(shell $(CC) --version 2> /dev/null | head -n 1))
$(info LD $(shell which $(LD)) $(shell $(LD) --version 2> /dev/null | head -n 1))
$(info CP $(shell which $(CP)) $(shell $(CP) --version 2> /dev/null | head -n 1))
$(info RM $(shell which $(RM)) $(shell $(RM) --version 2> /dev/null | head -n 1))
$(info AR $(shell which $(AR)) $(shell $(AR) --version 2> /dev/null | head -n 1))
$(info NM $(shell which $(NM)) $(shell $(NM) --version 2> /dev/null | head -n 1))
$(info DLLTOOL $(shell which $(DLLTOOL)) $(shell $(DLLTOOL) --version 2> /dev/null | head -n 1))
$(info DLLWRAP $(shell which $(DLLWRAP)) $(shell $(DLLWRAP) --version 2> /dev/null | head -n 1))
$(info RC $(shell which $(RC)) $(shell $(RC) --version 2> /dev/null | head -n 1))
$(info -----------------------------------------------------)

ignore := $(addsuffix .%, $(basename $(wildcard $(BUILD)/vm/*.ignore)))

mingw32ver.exe: $(WIN32UTILDIR)/mingw32ver.c
Expand Down
2 changes: 1 addition & 1 deletion building/win32x86/common/Makefile.plugin
Expand Up @@ -142,7 +142,7 @@ ifeq ($(realpath $(PREREQUISITES)),$(abspath $(PREREQUISITES)))

$(PLUGINLIB): $(VMDIR) $(OBJDIR) $(LIBOBJ)
-$(RM) $(PLUGINLIB)
$(AR) $(PLUGINLIB) $(LIBOBJ)
$(AR) $(ARFLAGS) $(PLUGINLIB) $(LIBOBJ)

$(PLUGINDLL): $(VMDIR) $(OBJDIR) $(LIBOBJ)
$(DLLTOOL) \
Expand Down
3 changes: 2 additions & 1 deletion building/win32x86/common/Makefile.tools
Expand Up @@ -79,7 +79,8 @@ STDLIBS:= -lddraw -ldinput -lopengl32 -lws2_32 -lcomdlg32 -lole32 -lwinmm \
#############################################################################
# Tools to use
#
AR:= $(TOOLPREFIX)ar rc
AR:= $(TOOLPREFIX)ar
ARFLAGS:= rc
CP:= cp
RM:= rm
SED:=sed
Expand Down
17 changes: 16 additions & 1 deletion building/win64x64/common/Makefile
Expand Up @@ -140,7 +140,7 @@ INCLUDES:= -I. -I$(VMSRCDIR) -I$(WIN32DIR) -I$(CROSSDIR) $(XINC)
# Common build rules
#

default: print-settings init $(VMEXE) $(CONSOLEVMEXE) $(DLLS) $(STRIPEXE) $(STRIPCONSOLEEXE) nukelibs $(APPPOST)
default: print-tools print-settings init $(VMEXE) $(CONSOLEVMEXE) $(DLLS) $(STRIPEXE) $(STRIPCONSOLEEXE) nukelibs $(APPPOST)

svnver:
echo $(RC) $(RCFLAGS)
Expand Down Expand Up @@ -212,6 +212,21 @@ print-objects:
$(info VMOBJ=$(VMOBJ))
$(info -----------------------------------------------------)

.PHONY : print-tools

print-tools:
$(info ---------------- Build tools ------------------------)
$(info CC $(shell which $(CC)) $(shell $(CC) --version 2> /dev/null | head -n 1))
$(info LD $(shell which $(LD)) $(shell $(LD) --version 2> /dev/null | head -n 1))
$(info CP $(shell which $(CP)) $(shell $(CP) --version 2> /dev/null | head -n 1))
$(info RM $(shell which $(RM)) $(shell $(RM) --version 2> /dev/null | head -n 1))
$(info AR $(shell which $(AR)) $(shell $(AR) --version 2> /dev/null | head -n 1))
$(info NM $(shell which $(NM)) $(shell $(NM) --version 2> /dev/null | head -n 1))
$(info DLLTOOL $(shell which $(DLLTOOL)) $(shell $(DLLTOOL) --version 2> /dev/null | head -n 1))
$(info DLLWRAP $(shell which $(DLLWRAP)) $(shell $(DLLWRAP) --version 2> /dev/null | head -n 1))
$(info RC $(shell which $(RC)) $(shell $(RC) --version 2> /dev/null | head -n 1))
$(info -----------------------------------------------------)

ignore := $(addsuffix .%, $(basename $(wildcard $(BUILD)/vm/*.ignore)))

mingw32ver.exe: $(WIN32UTILDIR)/mingw32ver.c
Expand Down
2 changes: 1 addition & 1 deletion building/win64x64/common/Makefile.plugin
Expand Up @@ -142,7 +142,7 @@ ifeq ($(realpath $(PREREQUISITES)),$(abspath $(PREREQUISITES)))

$(PLUGINLIB): $(VMDIR) $(OBJDIR) $(LIBOBJ)
-$(RM) $(PLUGINLIB)
$(AR) $(PLUGINLIB) $(LIBOBJ)
$(AR) $(ARFLAGS) $(PLUGINLIB) $(LIBOBJ)

$(PLUGINDLL): $(VMDIR) $(OBJDIR) $(LIBOBJ)
$(DLLTOOL) \
Expand Down
3 changes: 2 additions & 1 deletion building/win64x64/common/Makefile.tools
Expand Up @@ -86,7 +86,8 @@ STDLIBS:= -lddraw -ldinput -lopengl32 -lws2_32 -lcomdlg32 -lole32 -lwinmm \
#############################################################################
# Tools to use
#
AR:= $(TOOLPREFIX)ar rc
AR:= $(TOOLPREFIX)ar
ARFLAGS:= rc
CP:= cp
RM:= rm
SED:=sed
Expand Down

0 comments on commit cb725d2

Please sign in to comment.