diff --git a/config/rules.mk b/config/rules.mk index c6b6d742af4..38f6a90f396 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -998,6 +998,7 @@ alltags: # creates OBJS, links with LIBS to create Foo # $(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS) + @rm -f $@.manifest ifeq (WINCE,$(OS_ARCH)) $(LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS) else @@ -1006,11 +1007,15 @@ ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH)) ifdef MSMANIFEST_TOOL @if test -f $@.manifest; then \ if test -f "$(srcdir)/$@.manifest"; then \ + echo "Embedding manifest from $(srcdir)/$@.manifest and $@.manifest"; \ mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" $@.manifest -OUTPUTRESOURCE:$@\;1; \ else \ + echo "Embedding manifest from $@.manifest"; \ mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ fi; \ - rm -f $@.manifest; \ + elif test -f "$(srcdir)/$@.manifest"; then \ + echo "Embedding manifest from $(srcdir)/$@.manifest"; \ + mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" -OUTPUTRESOURCE:$@\;1; \ fi endif # MSVC with manifest tool ifdef MOZ_PROFILE_GENERATE