Bug 1255485 - Don't assume target path is srcdir relative when locating a program's manifest on windows.
MozReview-Commit-ID: L5BVxWGtpeN
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -554,26 +554,26 @@ endef
#
$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
$(REPORT_BUILD)
@$(RM) $@.manifest
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LINK) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \
- if test -f '$(srcdir)/$@.manifest'; then \
- echo 'Embedding manifest from $(srcdir)/$@.manifest and $@.manifest'; \
- $(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$@.manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
+ if test -f '$(srcdir)/$(notdir $@).manifest'; then \
+ echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest and $@.manifest'; \
+ $(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
else \
echo 'Embedding manifest from $@.manifest'; \
$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
fi; \
- elif test -f '$(srcdir)/$@.manifest'; then \
- echo 'Embedding manifest from $(srcdir)/$@.manifest'; \
- $(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$@.manifest' -OUTPUTRESOURCE:$@\;1; \
+ elif test -f '$(srcdir)/$(notdir $@).manifest'; then \
+ echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest'; \
+ $(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' -OUTPUTRESOURCE:$@\;1; \
fi
endif # MSVC with manifest tool
ifdef MOZ_PROFILE_GENERATE
# touch it a few seconds into the future to work around FAT's
# 2-second granularity
touch -t `date +%Y%m%d%H%M.%S -d 'now+5seconds'` pgo.relink
endif
else # !WINNT || GNU_CC