Skip to content

Commit

Permalink
[GH #823] windows has_mt: check for mt.exe and use it
Browse files Browse the repository at this point in the history
I could not test mt_output because I have no mt.exe
  • Loading branch information
Reini Urban committed Sep 1, 2012
1 parent 9eab02c commit 6aa71fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
26 changes: 13 additions & 13 deletions config/gen/makefiles/root.in
Expand Up @@ -898,15 +898,15 @@ $(PARROTOLD) : $(FRP_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
$(LINK) @ld_out@$@ \
$(FRP_DIR)/main$(O) src/parrot_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

$(PARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
src/parrot_config$(O) src/longopt$(O) \
$(MINIPARROT) $(FRPTWO_DIR)/prt0.pbc$(O) $(GEN_PASM_INCLUDES)
$(LINK) @ld_out@$@ \
$(FRPTWO_DIR)/main$(O) $(FRPTWO_DIR)/prt0.pbc$(O) src/parrot_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1


$(DEV_TOOLS_DIR)/pbc_to_exe.pir: $(DEV_TOOLS_DIR)/pbc_to_exe.winxed $(PARROT) $(WINXED_LANG) winxed.pbc
Expand Down Expand Up @@ -942,7 +942,7 @@ $(MINIPARROT) : $(FRP_DIR)/main$(O) $(INC_DIR)/api.h $(INC_DIR)/longopt.h $(LIBP
src/null_config$(O) src/longopt$(O)
$(LINK) @ld_out@$@ $(FRP_DIR)/main$(O) src/null_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

#IF(cygwin and optimize):$(INSTALLABLEPARROT) : LINK += -s
$(INSTALLABLEPARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
Expand All @@ -951,7 +951,7 @@ $(INSTALLABLEPARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
$(LINK) @ld_out@$@ \
$(FRPTWO_DIR)/main$(O) src/install_config$(O) src/longopt$(O) \
$(FRPTWO_DIR)/prt0.pbc$(O) @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

$(INC_DIR)/context.h : $(INC_PMC_DIR)/pmc_callcontext.h

Expand Down Expand Up @@ -1098,7 +1098,7 @@ PARROT_LIBS: \
$(LIBPARROT_STATIC) : $(O_FILES)
$(MKPATH) @blib_dir@
$(AR_CR) @ar_out@$@ @ar_extra@ $(O_FILES)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
$(RANLIB) $@

$(LIBPARROT_SHARED) : $(O_FILES)
Expand All @@ -1108,7 +1108,7 @@ $(LIBPARROT_SHARED) : $(O_FILES)
#IF(cygwin): -Wl,--out-implib=libparrot.dll.a \
#IF(win32 and cc==gcc): -Wl,--out-implib=libparrot.lib \
$(O_FILES) $(C_LIBS) $(ICU_SHARED)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(libparrot_shared_alias): ( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ )
$(CP) tools/dev/gdb-pp-load.py @blib_dir@/@libparrot_shared@-gdb.py
$(CP) tools/dev/gdb-pp.py @blib_dir@/GDBPrettyPrint.py
Expand Down Expand Up @@ -1141,15 +1141,15 @@ $(PDB) : $(FR_DIR)/parrot_debugger/main$(O) src/parrot_config$(O) $(LIBPARROT)
$(FR_DIR)/parrot_debugger/main$(O) \
src/parrot_config$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

#IF(cygwin and optimize):$(INSTALLABLEPDB) : LINK += -s
$(INSTALLABLEPDB) : $(FR_DIR)/parrot_debugger/main$(O) $(LIBPARROT) src/install_config$(O)
$(LINK) @ld_out@$@ \
$(FR_DIR)/parrot_debugger/main$(O) \
src/install_config$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

#
# Parrot Disassembler
Expand All @@ -1166,7 +1166,7 @@ $(DIS) : $(FR_DIR)/pbc_disassemble/main$(O) $(LIBPARROT)
$(FR_DIR)/pbc_disassemble/main$(O) \
src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

#IF(cygwin and optimize):$(INSTALLABLEDIS) : LINK += -s
$(INSTALLABLEDIS) : $(FR_DIR)/pbc_disassemble/main$(O) \
Expand All @@ -1175,7 +1175,7 @@ $(INSTALLABLEDIS) : $(FR_DIR)/pbc_disassemble/main$(O) \
$(FR_DIR)/pbc_disassemble/main$(O) \
src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

#
# Parrot Dump
Expand All @@ -1188,7 +1188,7 @@ $(PDUMP) : $(FR_DIR)/pbc_dump/main$(O) $(FR_DIR)/pbc_dump/packdump$(O) $(LIBPARR
$(FR_DIR)/pbc_dump/main$(O) \
src/longopt$(O) \
$(FR_DIR)/pbc_dump/packdump$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

$(FR_DIR)/pbc_dump/main$(O) : \
$(INC_DIR)/longopt.h \
Expand Down Expand Up @@ -1221,7 +1221,7 @@ $(PBC_MERGE) : $(FR_DIR)/pbc_merge/main$(O) $(LIBPARROT) src/parrot_config$(O)
src/parrot_config$(O) \
src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

#IF(cygwin and optimize):$(INSTALLABLEPBC_MERGE) : LINK += -s
$(INSTALLABLEPBC_MERGE) : $(FR_DIR)/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABLECONFIG)
Expand All @@ -1230,7 +1230,7 @@ $(INSTALLABLEPBC_MERGE) : $(FR_DIR)/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABL
src/install_config$(O) \
src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

#
# Profiling runcore test supporting code
Expand Down
4 changes: 4 additions & 0 deletions config/init/hints/mswin32.pm
Expand Up @@ -45,6 +45,10 @@ sub runstep {

$conf->data->set( clock_best => ' ' );

my $mt_output = `mt.exe /help` || '';
my $has_mt = $mt_output =~ m/manifest/; # TODO untested
$conf->data->set( has_mt => $has_mt ? 1 : 0);

if ($is_msvc) {
my $msvcversion = $conf->data->get('msvcversion');

Expand Down

0 comments on commit 6aa71fa

Please sign in to comment.