mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 1496746 - Remove VPATH; r=glandium
Having a full VPATH for the srcdir sometimes causes make to grab the wrong prerequisite for a rule, in particular if we have a file in the srcdir and also generate a file of the same name in the objdir. We don't really need VPATH anymore though, since most of the information comes from mozbuild, where we can explicitly list the path to the srcdir or objdir as necessary. Differential Revision: https://phabricator.services.mozilla.com/D42968 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1cb0ac3980
commit
f8f5fce637
@ -16,7 +16,7 @@ MIDL_GENERATED_FILES = \
|
|||||||
# midl targets to avoid timestamp caching issues.
|
# midl targets to avoid timestamp caching issues.
|
||||||
$(MIDL_GENERATED_FILES): done_gen ;
|
$(MIDL_GENERATED_FILES): done_gen ;
|
||||||
|
|
||||||
done_gen: IGeckoCustom.idl
|
done_gen: $(srcdir)/IGeckoCustom.idl
|
||||||
$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -Oicf $(srcdir)/IGeckoCustom.idl
|
$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -Oicf $(srcdir)/IGeckoCustom.idl
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ MIDL_GENERATED_FILES = \
|
|||||||
# midl targets to avoid timestamp caching issues.
|
# midl targets to avoid timestamp caching issues.
|
||||||
$(MIDL_GENERATED_FILES): done_gen ;
|
$(MIDL_GENERATED_FILES): done_gen ;
|
||||||
|
|
||||||
done_gen: ISimpleDOM.idl \
|
done_gen: $(srcdir)/ISimpleDOM.idl \
|
||||||
ISimpleDOMNode.idl \
|
$(srcdir)/ISimpleDOMNode.idl \
|
||||||
ISimpleDOMDocument.idl \
|
$(srcdir)/ISimpleDOMDocument.idl \
|
||||||
ISimpleDOMText.idl
|
$(srcdir)/ISimpleDOMText.idl
|
||||||
|
|
||||||
$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -robust -Oicf $(srcdir)/ISimpleDOM.idl
|
$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -robust -Oicf $(srcdir)/ISimpleDOM.idl
|
||||||
touch $@
|
touch $@
|
||||||
|
@ -21,7 +21,7 @@ export:: $(MIDL_GENERATED_FILES)
|
|||||||
# midl targets to avoid timestamp caching issues.
|
# midl targets to avoid timestamp caching issues.
|
||||||
$(MIDL_GENERATED_FILES): midl_done ;
|
$(MIDL_GENERATED_FILES): midl_done ;
|
||||||
|
|
||||||
midl_done: HandlerData.acf HandlerData.idl
|
midl_done: $(srcdir)/HandlerData.acf $(srcdir)/HandlerData.idl
|
||||||
$(MIDL) $(MIDL_FLAGS) $(DEFINES) -I $(topobjdir) -I $(DIST)/include -I $(IA2DIR) -I $(MSAADIR) -Oicf -acf $(srcdir)/HandlerData.acf $(srcdir)/HandlerData.idl
|
$(MIDL) $(MIDL_FLAGS) $(DEFINES) -I $(topobjdir) -I $(DIST)/include -I $(IA2DIR) -I $(MSAADIR) -Oicf -acf $(srcdir)/HandlerData.acf $(srcdir)/HandlerData.idl
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ MIDL_GENERATED_FILES = \
|
|||||||
# midl targets to avoid timestamp caching issues.
|
# midl targets to avoid timestamp caching issues.
|
||||||
$(MIDL_GENERATED_FILES): done_gen ;
|
$(MIDL_GENERATED_FILES): done_gen ;
|
||||||
|
|
||||||
done_gen: Accessible.idl
|
done_gen: $(srcdir)/Accessible.idl
|
||||||
$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/Accessible.idl
|
$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/Accessible.idl
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ ifeq ($(OS_ARCH),WINNT)
|
|||||||
# (this dependency should really be just for firefox.exe, not other targets)
|
# (this dependency should really be just for firefox.exe, not other targets)
|
||||||
# Note the manifest file exists in the tree, so we use the explicit filename
|
# Note the manifest file exists in the tree, so we use the explicit filename
|
||||||
# here.
|
# here.
|
||||||
EXTRA_DEPS += firefox.exe.manifest
|
EXTRA_DEPS += $(srcdir)/firefox.exe.manifest
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PROGRAMS_DEST = $(DIST)/bin
|
PROGRAMS_DEST = $(DIST)/bin
|
||||||
|
@ -43,8 +43,6 @@ endif
|
|||||||
|
|
||||||
EXEC = exec
|
EXEC = exec
|
||||||
|
|
||||||
_VPATH_SRCS = $(abspath $<)
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Testing frameworks support
|
# Testing frameworks support
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -711,31 +709,31 @@ $(OBJS) $(HOST_OBJS) $(PROGOBJS) $(HOST_PROGOBJS): $(GLOBAL_DEPS)
|
|||||||
# Rules for building native targets must come first because of the host_ prefix
|
# Rules for building native targets must come first because of the host_ prefix
|
||||||
$(HOST_COBJS):
|
$(HOST_COBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(NSPR_CFLAGS) $(_VPATH_SRCS)
|
$(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(NSPR_CFLAGS) $<
|
||||||
|
|
||||||
$(HOST_CPPOBJS):
|
$(HOST_CPPOBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(call BUILDSTATUS,OBJECT_FILE $@)
|
$(call BUILDSTATUS,OBJECT_FILE $@)
|
||||||
$(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(NSPR_CFLAGS) $(_VPATH_SRCS)
|
$(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(NSPR_CFLAGS) $<
|
||||||
|
|
||||||
$(HOST_CMOBJS):
|
$(HOST_CMOBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(HOST_CMFLAGS) $(NSPR_CFLAGS) $(_VPATH_SRCS)
|
$(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(HOST_CMFLAGS) $(NSPR_CFLAGS) $<
|
||||||
|
|
||||||
$(HOST_CMMOBJS):
|
$(HOST_CMMOBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(NSPR_CFLAGS) $(_VPATH_SRCS)
|
$(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(NSPR_CFLAGS) $<
|
||||||
|
|
||||||
$(COBJS):
|
$(COBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
|
$(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $<
|
||||||
|
|
||||||
ifdef ASFILES
|
ifdef ASFILES
|
||||||
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
|
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
|
||||||
# a '-c' flag.
|
# a '-c' flag.
|
||||||
$(ASOBJS):
|
$(ASOBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(AS) $(ASOUTOPTION)$@ $(ASFLAGS) $($(notdir $<)_FLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
|
$(AS) $(ASOUTOPTION)$@ $(ASFLAGS) $($(notdir $<)_FLAGS) $(AS_DASH_C_FLAG) $<
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define syms_template
|
define syms_template
|
||||||
@ -786,31 +784,31 @@ $(SOBJS):
|
|||||||
$(CPPOBJS):
|
$(CPPOBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(call BUILDSTATUS,OBJECT_FILE $@)
|
$(call BUILDSTATUS,OBJECT_FILE $@)
|
||||||
$(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
|
$(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $<
|
||||||
|
|
||||||
$(CMMOBJS):
|
$(CMMOBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
|
$(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $($(notdir $<)_FLAGS) $<
|
||||||
|
|
||||||
$(CMOBJS):
|
$(CMOBJS):
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
|
$(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $($(notdir $<)_FLAGS) $<
|
||||||
|
|
||||||
$(filter %.s,$(CPPSRCS:%.cpp=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
|
$(filter %.s,$(CPPSRCS:%.cpp=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
|
$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $<
|
||||||
|
|
||||||
$(filter %.s,$(CPPSRCS:%.cc=%.s)): %.s: %.cc $(call mkdir_deps,$(MDDEPDIR))
|
$(filter %.s,$(CPPSRCS:%.cc=%.s)): %.s: %.cc $(call mkdir_deps,$(MDDEPDIR))
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
|
$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $<
|
||||||
|
|
||||||
$(filter %.s,$(CPPSRCS:%.cxx=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
|
$(filter %.s,$(CPPSRCS:%.cxx=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
|
$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $<
|
||||||
|
|
||||||
$(filter %.s,$(CSRCS:%.c=%.s)): %.s: %.c $(call mkdir_deps,$(MDDEPDIR))
|
$(filter %.s,$(CSRCS:%.c=%.s)): %.s: %.c $(call mkdir_deps,$(MDDEPDIR))
|
||||||
$(REPORT_BUILD_VERBOSE)
|
$(REPORT_BUILD_VERBOSE)
|
||||||
$(CC) -S $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)
|
$(CC) -S $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $<
|
||||||
|
|
||||||
ifneq (,$(filter %.i,$(MAKECMDGOALS)))
|
ifneq (,$(filter %.i,$(MAKECMDGOALS)))
|
||||||
# Call as $(call _group_srcs,extension,$(SRCS)) - this will create a list
|
# Call as $(call _group_srcs,extension,$(SRCS)) - this will create a list
|
||||||
@ -837,7 +835,7 @@ $$(_PREPROCESSED_$1_FILES): _DEPEND_CFLAGS=
|
|||||||
$$(_PREPROCESSED_$1_FILES): %.i: %.$1
|
$$(_PREPROCESSED_$1_FILES): %.i: %.$1
|
||||||
$$(REPORT_BUILD_VERBOSE)
|
$$(REPORT_BUILD_VERBOSE)
|
||||||
$$(addprefix $$(MKDIR) -p ,$$(filter-out .,$$(@D)))
|
$$(addprefix $$(MKDIR) -p ,$$(filter-out .,$$(@D)))
|
||||||
$$($3) -C $$(PREPROCESS_OPTION)$$@ $(foreach var,$4,$$($(var))) $$($$(notdir $$<)_FLAGS) $$(_VPATH_SRCS)
|
$$($3) -C $$(PREPROCESS_OPTION)$$@ $(foreach var,$4,$$($(var))) $$($$(notdir $$<)_FLAGS) $$<
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -899,13 +897,13 @@ endif
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(RESFILE): %.res: %.rc
|
$(RESFILE): %.res: $(RCFILE)
|
||||||
$(REPORT_BUILD)
|
$(REPORT_BUILD)
|
||||||
@echo Creating Resource file: $@
|
@echo Creating Resource file: $@
|
||||||
ifdef GNU_CC
|
ifdef GNU_CC
|
||||||
$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) $(OUTOPTION)$@ $(_VPATH_SRCS)
|
$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) $(OUTOPTION)$@ $<
|
||||||
else
|
else
|
||||||
$(RC) $(RCFLAGS) -r $(DEFINES) $(INCLUDES) $(OUTOPTION)$@ $(_VPATH_SRCS)
|
$(RC) $(RCFLAGS) -r $(DEFINES) $(INCLUDES) $(OUTOPTION)$@ $<
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Cancel GNU make built-in implicit rules
|
# Cancel GNU make built-in implicit rules
|
||||||
|
@ -34,7 +34,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef RCINCLUDE
|
ifdef RCINCLUDE
|
||||||
_RC_STRING += -RCINCLUDE $(srcdir)/$(RCINCLUDE)
|
_RC_STRING += -RCINCLUDE $(RCINCLUDE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
GARBAGE += $(RESFILE) $(RCFILE)
|
GARBAGE += $(RESFILE) $(RCFILE)
|
||||||
|
@ -11,10 +11,10 @@ celt_pitch_xcorr_arm-gnu.s: celt/arm/armopts-gnu.S
|
|||||||
|
|
||||||
# armopts needs a specific rule, because arm2gnu.pl will always add the .S
|
# armopts needs a specific rule, because arm2gnu.pl will always add the .S
|
||||||
# suffix when translating the files that include it.
|
# suffix when translating the files that include it.
|
||||||
celt/arm/armopts-gnu.S: celt/arm/armopts.s $(call mkdir_deps,celt/arm) $(GLOBAL_DEPS)
|
celt/arm/armopts-gnu.S: $(srcdir)/celt/arm/armopts.s $(call mkdir_deps,celt/arm) $(GLOBAL_DEPS)
|
||||||
$(PERL) $(srcdir)/celt/arm/arm2gnu.pl < $< > $@
|
$(PERL) $(srcdir)/celt/arm/arm2gnu.pl < $< > $@
|
||||||
# For all others, we can use an implicit rule
|
# For all others, we can use an implicit rule
|
||||||
%-gnu.s: celt/arm/%.s $(GLOBAL_DEPS)
|
%-gnu.s: $(srcdir)/celt/arm/%.s $(GLOBAL_DEPS)
|
||||||
$(PERL) $(srcdir)/celt/arm/arm2gnu.pl < $< > $@
|
$(PERL) $(srcdir)/celt/arm/arm2gnu.pl < $< > $@
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -12,10 +12,10 @@ armloop-gnu.s: armopts-gnu.S
|
|||||||
|
|
||||||
# armopts needs a specific rule, because arm2gnu.pl will always add the .S
|
# armopts needs a specific rule, because arm2gnu.pl will always add the .S
|
||||||
# suffix when translating the files that include it.
|
# suffix when translating the files that include it.
|
||||||
armopts-gnu.S: lib/arm/armopts.s
|
armopts-gnu.S: $(srcdir)/lib/arm/armopts.s
|
||||||
$(PERL) $(srcdir)/lib/arm/arm2gnu.pl < $< > $@
|
$(PERL) $(srcdir)/lib/arm/arm2gnu.pl < $< > $@
|
||||||
# For all others, we can use an implicit rule
|
# For all others, we can use an implicit rule
|
||||||
%-gnu.s: lib/arm/%.s
|
%-gnu.s: $(srcdir)/lib/arm/%.s
|
||||||
$(PERL) $(srcdir)/lib/arm/arm2gnu.pl < $< > $@
|
$(PERL) $(srcdir)/lib/arm/arm2gnu.pl < $< > $@
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -16,7 +16,7 @@ ifdef GNU_AS
|
|||||||
# one directory with arm assembly currently so enumerate it manually.
|
# one directory with arm assembly currently so enumerate it manually.
|
||||||
GENERATED_DIRS += libvpx/vpx_dsp/arm
|
GENERATED_DIRS += libvpx/vpx_dsp/arm
|
||||||
|
|
||||||
%.asm.S: %.asm $(ASM_OFFSETS) $(call mkdir_deps,libvpx/vpx_dsp/arm)
|
libvpx/vpx_dsp/arm/%.asm.S: $(srcdir)/libvpx/vpx_dsp/arm/%.asm $(call mkdir_deps,libvpx/vpx_dsp/arm)
|
||||||
$(PERL) $(topsrcdir)/media/libvpx/libvpx/build/make/ads2gas.pl < $< > $@
|
$(PERL) $(topsrcdir)/media/libvpx/libvpx/build/make/ads2gas.pl < $< > $@
|
||||||
|
|
||||||
$(addsuffix .$(OBJ_SUFFIX), idct4x4_add_neon.asm idct8x8_add_neon.asm idct16x16_add_neon.asm): libvpx/vpx_dsp/arm/idct_neon.asm.S
|
$(addsuffix .$(OBJ_SUFFIX), idct4x4_add_neon.asm idct8x8_add_neon.asm idct16x16_add_neon.asm): libvpx/vpx_dsp/arm/idct_neon.asm.S
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
include $(topsrcdir)/config/config.mk
|
include $(topsrcdir)/config/config.mk
|
||||||
|
|
||||||
ifeq (WINNT,$(OS_TARGET))
|
ifeq (WINNT,$(OS_TARGET))
|
||||||
mozglue.def: mozglue.def.in $(GLOBAL_DEPS)
|
mozglue.def: $(srcdir)/mozglue.def.in $(GLOBAL_DEPS)
|
||||||
$(call py_action,preprocessor,$(if $(MOZ_REPLACE_MALLOC),-DMOZ_REPLACE_MALLOC) $(ACDEFINES) $< -o $@)
|
$(call py_action,preprocessor,$(if $(MOZ_REPLACE_MALLOC),-DMOZ_REPLACE_MALLOC) $(ACDEFINES) $< -o $@)
|
||||||
|
|
||||||
GARBAGE += mozglue.def
|
GARBAGE += mozglue.def
|
||||||
@ -16,7 +16,7 @@ GARBAGE += mozglue.def
|
|||||||
# (this dependency should really be just for mozglue.dll, not other targets)
|
# (this dependency should really be just for mozglue.dll, not other targets)
|
||||||
# Note the manifest file exists in the tree, so we use the explicit filename
|
# Note the manifest file exists in the tree, so we use the explicit filename
|
||||||
# here.
|
# here.
|
||||||
EXTRA_DEPS += mozglue.dll.manifest
|
EXTRA_DEPS += $(srcdir)/mozglue.dll.manifest
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(topsrcdir)/mozglue/build/replace_malloc.mk
|
include $(topsrcdir)/mozglue/build/replace_malloc.mk
|
||||||
|
@ -472,12 +472,19 @@ class RecursiveMakeBackend(CommonBackend):
|
|||||||
if isinstance(obj, GeneratedSources):
|
if isinstance(obj, GeneratedSources):
|
||||||
variables.append('GARBAGE')
|
variables.append('GARBAGE')
|
||||||
base = backend_file.objdir
|
base = backend_file.objdir
|
||||||
|
cls = ObjDirPath
|
||||||
|
prefix = '!'
|
||||||
else:
|
else:
|
||||||
base = backend_file.srcdir
|
base = backend_file.srcdir
|
||||||
|
cls = SourcePath
|
||||||
|
prefix = ''
|
||||||
for f in sorted(obj.files):
|
for f in sorted(obj.files):
|
||||||
f = mozpath.relpath(f, base)
|
p = self._pretty_path(
|
||||||
|
cls(obj._context, prefix + mozpath.relpath(f, base)),
|
||||||
|
backend_file,
|
||||||
|
)
|
||||||
for var in variables:
|
for var in variables:
|
||||||
backend_file.write('%s += %s\n' % (var, f))
|
backend_file.write('%s += %s\n' % (var, p))
|
||||||
self._compile_graph[mozpath.join(
|
self._compile_graph[mozpath.join(
|
||||||
backend_file.relobjdir, 'target-objects')]
|
backend_file.relobjdir, 'target-objects')]
|
||||||
elif isinstance(obj, (HostSources, HostGeneratedSources)):
|
elif isinstance(obj, (HostSources, HostGeneratedSources)):
|
||||||
@ -490,12 +497,19 @@ class RecursiveMakeBackend(CommonBackend):
|
|||||||
if isinstance(obj, HostGeneratedSources):
|
if isinstance(obj, HostGeneratedSources):
|
||||||
variables.append('GARBAGE')
|
variables.append('GARBAGE')
|
||||||
base = backend_file.objdir
|
base = backend_file.objdir
|
||||||
|
cls = ObjDirPath
|
||||||
|
prefix = '!'
|
||||||
else:
|
else:
|
||||||
base = backend_file.srcdir
|
base = backend_file.srcdir
|
||||||
|
cls = SourcePath
|
||||||
|
prefix = ''
|
||||||
for f in sorted(obj.files):
|
for f in sorted(obj.files):
|
||||||
f = mozpath.relpath(f, base)
|
p = self._pretty_path(
|
||||||
|
cls(obj._context, prefix + mozpath.relpath(f, base)),
|
||||||
|
backend_file,
|
||||||
|
)
|
||||||
for var in variables:
|
for var in variables:
|
||||||
backend_file.write('%s += %s\n' % (var, f))
|
backend_file.write('%s += %s\n' % (var, p))
|
||||||
self._compile_graph[mozpath.join(
|
self._compile_graph[mozpath.join(
|
||||||
backend_file.relobjdir, 'host-objects')]
|
backend_file.relobjdir, 'host-objects')]
|
||||||
elif isinstance(obj, VariablePassthru):
|
elif isinstance(obj, VariablePassthru):
|
||||||
@ -511,6 +525,9 @@ class RecursiveMakeBackend(CommonBackend):
|
|||||||
elif isinstance(v, bool):
|
elif isinstance(v, bool):
|
||||||
if v:
|
if v:
|
||||||
backend_file.write('%s := 1\n' % k)
|
backend_file.write('%s := 1\n' % k)
|
||||||
|
elif isinstance(v, Path):
|
||||||
|
path = self._pretty_path(Path(obj._context, v), backend_file)
|
||||||
|
backend_file.write('%s := %s\n' % (k, path))
|
||||||
else:
|
else:
|
||||||
backend_file.write('%s := %s\n' % (k, v))
|
backend_file.write('%s := %s\n' % (k, v))
|
||||||
elif isinstance(obj, HostDefines):
|
elif isinstance(obj, HostDefines):
|
||||||
@ -1708,7 +1725,6 @@ class RecursiveMakeBackend(CommonBackend):
|
|||||||
pp.handleLine(b'topsrcdir := @top_srcdir@\n')
|
pp.handleLine(b'topsrcdir := @top_srcdir@\n')
|
||||||
pp.handleLine(b'srcdir := @srcdir@\n')
|
pp.handleLine(b'srcdir := @srcdir@\n')
|
||||||
pp.handleLine(b'srcdir_rel := @srcdir_rel@\n')
|
pp.handleLine(b'srcdir_rel := @srcdir_rel@\n')
|
||||||
pp.handleLine(b'VPATH := @srcdir@\n')
|
|
||||||
pp.handleLine(b'relativesrcdir := @relativesrcdir@\n')
|
pp.handleLine(b'relativesrcdir := @relativesrcdir@\n')
|
||||||
pp.handleLine(b'include $(DEPTH)/config/@autoconfmk@\n')
|
pp.handleLine(b'include $(DEPTH)/config/@autoconfmk@\n')
|
||||||
if not stub:
|
if not stub:
|
||||||
|
@ -1656,7 +1656,7 @@ VARIABLES = {
|
|||||||
|
|
||||||
This variable contains a list of system libaries to link against.
|
This variable contains a list of system libaries to link against.
|
||||||
"""),
|
"""),
|
||||||
'RCFILE': (unicode, unicode,
|
'RCFILE': (Path, unicode,
|
||||||
"""The program .rc file.
|
"""The program .rc file.
|
||||||
|
|
||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
@ -1668,7 +1668,7 @@ VARIABLES = {
|
|||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'RCINCLUDE': (unicode, unicode,
|
'RCINCLUDE': (Path, unicode,
|
||||||
"""The resource script file to be included in the default .res file.
|
"""The resource script file to be included in the default .res file.
|
||||||
|
|
||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
|
@ -227,7 +227,6 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||||||
'topsrcdir := %s' % env.topsrcdir,
|
'topsrcdir := %s' % env.topsrcdir,
|
||||||
'srcdir := %s' % env.topsrcdir,
|
'srcdir := %s' % env.topsrcdir,
|
||||||
'srcdir_rel := %s' % mozpath.relpath(env.topsrcdir, env.topobjdir),
|
'srcdir_rel := %s' % mozpath.relpath(env.topsrcdir, env.topobjdir),
|
||||||
'VPATH := %s' % env.topsrcdir,
|
|
||||||
'relativesrcdir := .',
|
'relativesrcdir := .',
|
||||||
'include $(DEPTH)/config/autoconf.mk',
|
'include $(DEPTH)/config/autoconf.mk',
|
||||||
'',
|
'',
|
||||||
@ -244,7 +243,7 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||||||
self.assertTrue(os.path.exists(p))
|
self.assertTrue(os.path.exists(p))
|
||||||
|
|
||||||
lines = [l.strip() for l in open(p, 'rt').readlines()]
|
lines = [l.strip() for l in open(p, 'rt').readlines()]
|
||||||
self.assertEqual(len(lines), 11)
|
self.assertEqual(len(lines), 10)
|
||||||
|
|
||||||
self.assertTrue(lines[0].startswith('# THIS FILE WAS AUTOMATICALLY'))
|
self.assertTrue(lines[0].startswith('# THIS FILE WAS AUTOMATICALLY'))
|
||||||
|
|
||||||
@ -319,13 +318,13 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||||||
|
|
||||||
expected = {
|
expected = {
|
||||||
'RCFILE': [
|
'RCFILE': [
|
||||||
'RCFILE := foo.rc',
|
'RCFILE := $(srcdir)/foo.rc',
|
||||||
],
|
],
|
||||||
'RESFILE': [
|
'RESFILE': [
|
||||||
'RESFILE := bar.res',
|
'RESFILE := bar.res',
|
||||||
],
|
],
|
||||||
'RCINCLUDE': [
|
'RCINCLUDE': [
|
||||||
'RCINCLUDE := bar.rc',
|
'RCINCLUDE := $(srcdir)/bar.rc',
|
||||||
],
|
],
|
||||||
'EXTRA_DEPS': [
|
'EXTRA_DEPS': [
|
||||||
'EXTRA_DEPS += %s' % mozpath.join(mozpath.relpath(env.topsrcdir,
|
'EXTRA_DEPS += %s' % mozpath.join(mozpath.relpath(env.topsrcdir,
|
||||||
@ -351,28 +350,28 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||||||
|
|
||||||
expected = {
|
expected = {
|
||||||
'ASFILES': [
|
'ASFILES': [
|
||||||
'ASFILES += bar.s',
|
'ASFILES += $(srcdir)/bar.s',
|
||||||
'ASFILES += foo.asm',
|
'ASFILES += $(srcdir)/foo.asm',
|
||||||
],
|
],
|
||||||
'CMMSRCS': [
|
'CMMSRCS': [
|
||||||
'CMMSRCS += bar.mm',
|
'CMMSRCS += $(srcdir)/bar.mm',
|
||||||
'CMMSRCS += foo.mm',
|
'CMMSRCS += $(srcdir)/foo.mm',
|
||||||
],
|
],
|
||||||
'CSRCS': [
|
'CSRCS': [
|
||||||
'CSRCS += bar.c',
|
'CSRCS += $(srcdir)/bar.c',
|
||||||
'CSRCS += foo.c',
|
'CSRCS += $(srcdir)/foo.c',
|
||||||
],
|
],
|
||||||
'HOST_CPPSRCS': [
|
'HOST_CPPSRCS': [
|
||||||
'HOST_CPPSRCS += bar.cpp',
|
'HOST_CPPSRCS += $(srcdir)/bar.cpp',
|
||||||
'HOST_CPPSRCS += foo.cpp',
|
'HOST_CPPSRCS += $(srcdir)/foo.cpp',
|
||||||
],
|
],
|
||||||
'HOST_CSRCS': [
|
'HOST_CSRCS': [
|
||||||
'HOST_CSRCS += bar.c',
|
'HOST_CSRCS += $(srcdir)/bar.c',
|
||||||
'HOST_CSRCS += foo.c',
|
'HOST_CSRCS += $(srcdir)/foo.c',
|
||||||
],
|
],
|
||||||
'SSRCS': [
|
'SSRCS': [
|
||||||
'SSRCS += baz.S',
|
'SSRCS += $(srcdir)/baz.S',
|
||||||
'SSRCS += foo.S',
|
'SSRCS += $(srcdir)/foo.S',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,11 +54,7 @@ def Libxul(name, output_category=None):
|
|||||||
'/widget/windows',
|
'/widget/windows',
|
||||||
'/xpcom/base',
|
'/xpcom/base',
|
||||||
]
|
]
|
||||||
# config/version.mk says $(srcdir)/$(RCINCLUDE), and this needs to
|
RCINCLUDE = '/toolkit/library/xulrunner.rc'
|
||||||
# be valid in both toolkit/library and toolkit/library/gtest.
|
|
||||||
# Eventually, the make backend would do its own path canonicalization
|
|
||||||
# and config/version.mk would lift the $(srcdir)
|
|
||||||
RCINCLUDE = '$(DEPTH)/toolkit/library/xulrunner.rc'
|
|
||||||
|
|
||||||
# Show a breakdown of linker time. (Too verbose for local builds.)
|
# Show a breakdown of linker time. (Too verbose for local builds.)
|
||||||
if CONFIG['CC_TYPE'] == 'clang-cl' and not CONFIG['DEVELOPER_OPTIONS']:
|
if CONFIG['CC_TYPE'] == 'clang-cl' and not CONFIG['DEVELOPER_OPTIONS']:
|
||||||
|
@ -6,7 +6,7 @@ MOZ_WINCONSOLE = 1
|
|||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
libs:: TestXREMakeCommandLineWin.ini
|
libs:: $(srcdir)/TestXREMakeCommandLineWin.ini
|
||||||
$(INSTALL) $^ $(FINAL_TARGET)/
|
$(INSTALL) $^ $(FINAL_TARGET)/
|
||||||
|
|
||||||
check::
|
check::
|
||||||
|
Loading…
Reference in New Issue
Block a user