Commit b1e26d51 authored by Ben Avison's avatar Ben Avison Committed by ROOL
Browse files

Always implicitly include StdTools when cross-compiling

`AAsmModule`, `CApp`, `CLibrary` and `CModule` implicitly include various
other shared makefile fragments to permit simpler master makefiles. However,
when cross-compiling, they were only included when invoked from within the
`objs` subdirectory, which in particular meant you couldn't rely on any of
the definitions from `StdTools` when extending the `clean` rule unless you
explicitly included it from the master makefile, thereby defeating the
purpose of the implicit inclusion. Change them so that `StdTools` is included
for all rules.
parent f3add28d
...@@ -127,6 +127,10 @@ endif ...@@ -127,6 +127,10 @@ endif
SOURCES_TO_SYMLINK += $(wildcard h/*) $(wildcard hdr/*) $(wildcard s/*) Resources VersionNum VersionASM SOURCES_TO_SYMLINK += $(wildcard h/*) $(wildcard hdr/*) $(wildcard s/*) Resources VersionNum VersionASM
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifneq (objs,$(notdir ${CURDIR})) ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory # Makefile invoked from same directory
...@@ -172,10 +176,6 @@ else ...@@ -172,10 +176,6 @@ else
# Makefile invoked from objs subdirectory # Makefile invoked from objs subdirectory
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
all: rom debug standalone all: rom debug standalone
# GNU make seems to treat any double-colon rule with no dependencies as # GNU make seems to treat any double-colon rule with no dependencies as
......
...@@ -111,6 +111,12 @@ ROM_OBJS_ = $(addsuffix .oz,${ROM_OBJS}) ...@@ -111,6 +111,12 @@ ROM_OBJS_ = $(addsuffix .oz,${ROM_OBJS})
SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard c++/*) $(wildcard h/*) $(wildcard s/*) VersionNum VersionASM SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard c++/*) $(wildcard h/*) $(wildcard s/*) VersionNum VersionASM
ifeq ("${INCLUDED_STDTOOLS}","")
ifeq ("${INCLUDED_HOSTTOOLS}","")
include StdTools
endif
endif
ifneq (objs,$(notdir ${CURDIR})) ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory # Makefile invoked from same directory
...@@ -151,12 +157,6 @@ else ...@@ -151,12 +157,6 @@ else
# Makefile invoked from objs subdirectory # Makefile invoked from objs subdirectory
ifeq ("${INCLUDED_STDTOOLS}","")
ifeq ("${INCLUDED_HOSTTOOLS}","")
include StdTools
endif
endif
ifeq ($(filter rom%,${MAKECMDGOALS}),) ifeq ($(filter rom%,${MAKECMDGOALS}),)
ifeq ("${INCLUDED_APPLIBS}","") ifeq ("${INCLUDED_APPLIBS}","")
include AppLibs include AppLibs
......
...@@ -109,6 +109,10 @@ endif ...@@ -109,6 +109,10 @@ endif
SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard h/*) $(wildcard s/*) SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard h/*) $(wildcard s/*)
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifneq (objs,$(notdir ${CURDIR})) ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory # Makefile invoked from same directory
...@@ -148,10 +152,6 @@ else ...@@ -148,10 +152,6 @@ else
# Makefile invoked from objs subdirectory # Makefile invoked from objs subdirectory
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifeq ("${INCLUDED_STDRULES}","") ifeq ("${INCLUDED_STDRULES}","")
include StdRules include StdRules
endif endif
......
...@@ -208,6 +208,10 @@ TOKENSOURCE := TokHelpSrc.s ...@@ -208,6 +208,10 @@ TOKENSOURCE := TokHelpSrc.s
SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard c++/*) $(wildcard cmhg/*) $(wildcard h/*) $(wildcard hdr/*) $(wildcard s/*) VersionNum VersionASM SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard c++/*) $(wildcard cmhg/*) $(wildcard h/*) $(wildcard hdr/*) $(wildcard s/*) VersionNum VersionASM
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifneq (objs,$(notdir ${CURDIR})) ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory # Makefile invoked from same directory
...@@ -254,9 +258,6 @@ ifneq ("${ASM2TXT_EXT}","") ...@@ -254,9 +258,6 @@ ifneq ("${ASM2TXT_EXT}","")
ASM2TXT_EXT := .${ASM2TXT_EXT} ASM2TXT_EXT := .${ASM2TXT_EXT}
endif endif
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifeq ("${INCLUDED_MODULELIBS}","") ifeq ("${INCLUDED_MODULELIBS}","")
include ModuleLibs include ModuleLibs
endif endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment