summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2005-03-24 14:40:05 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2005-03-24 14:40:05 +0000
commitbd97c79f77a20fd2d3ea62cb8c30b6cc160830da (patch)
treefc13fbb0512b5fdb68d7c8368878d35379f93399
parent6ca8f276d17ffe762042d064d315afdea949276d (diff)
downloadMPC-bd97c79f77a20fd2d3ea62cb8c30b6cc160830da.tar.gz
ChangeLogTag: Thu Mar 24 08:38:59 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog14
-rw-r--r--modules/AutomakeProjectCreator.pm6
-rw-r--r--modules/MakeProjectCreator.pm6
-rw-r--r--modules/ProjectCreator.pm31
-rw-r--r--modules/StringProcessor.pm4
-rw-r--r--modules/TemplateParser.pm10
-rw-r--r--templates/automake.mpd4
-rw-r--r--templates/make.mpd4
-rw-r--r--templates/nmake.mpd58
9 files changed, 96 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index 455cf3a0..af768b4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Thu Mar 24 08:38:59 2005 Chad Elliott <elliott_c@ociweb.com>
+
+ * modules/AutomakeProjectCreator.pm:
+ * modules/MakeProjectCreator.pm:
+ * modules/ProjectCreator.pm:
+ * modules/StringProcessor.pm:
+ * modules/TemplateParser.pm:
+ * templates/automake.mpd:
+ * templates/make.mpd:
+ * templates/nmake.mpd:
+
+ Added better support for building projects with files that have
+ spaces in the names.
+
Thu Mar 17 08:03:31 2005 Chad Elliott <elliott_c@ociweb.com>
* config/openssl.mpb:
diff --git a/modules/AutomakeProjectCreator.pm b/modules/AutomakeProjectCreator.pm
index 71510e19..a96cab21 100644
--- a/modules/AutomakeProjectCreator.pm
+++ b/modules/AutomakeProjectCreator.pm
@@ -22,6 +22,12 @@ use vars qw(@ISA);
# Subroutine Section
# ************************************************************
+sub escape_spaces {
+ #my($self) = shift;
+ return 1;
+}
+
+
sub use_reldefs {
#my($self) = shift;
return 0;
diff --git a/modules/MakeProjectCreator.pm b/modules/MakeProjectCreator.pm
index 607afe9a..b79518a6 100644
--- a/modules/MakeProjectCreator.pm
+++ b/modules/MakeProjectCreator.pm
@@ -22,6 +22,12 @@ use vars qw(@ISA);
# Subroutine Section
# ************************************************************
+sub escape_spaces {
+ #my($self) = shift;
+ return 1;
+}
+
+
sub convert_slashes {
#my($self) = shift;
return 0;
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index d62d345c..f8ad91ab 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -276,6 +276,7 @@ sub new {
$self->{'addtemp_state'} = undef;
$self->{'command_subs'} = $self->get_command_subs();
$self->{'use_reldefs'} = $self->use_reldefs();
+ $self->{'escape_spaces'} = $self->escape_spaces();
$self->add_default_matching_assignments();
$self->reset_generating_types();
@@ -875,8 +876,7 @@ sub process_component_line {
## Now look for specially listed files
if ($line =~ /(.*)\s+>>\s+(.*)/) {
$line = $1;
- my(@extra) = split(/\s+/, $2);
- $self->{'custom_special_output'}->{$line} = \@extra;
+ $self->{'custom_special_output'}->{$line} = $self->create_array($2);
}
## Set up the files array. If the line contains a wild card
@@ -3524,11 +3524,24 @@ sub write_project {
if ($self->check_features($self->get_assignment('requires'),
$self->get_assignment('avoids'),
1)) {
- if ($self->get_assignment('custom_only')) {
- $self->remove_non_custom_settings();
- }
-
if ($self->need_to_write_project()) {
+ if ($self->get_assignment('custom_only')) {
+ $self->remove_non_custom_settings();
+ }
+
+ if ($self->{'escape_spaces'}) {
+ foreach my $key (keys %{$self->{'valid_components'}}) {
+ my($names) = $self->{$key};
+ foreach my $name (keys %$names) {
+ foreach my $key (keys %{$$names{$name}}) {
+ foreach my $file (@{$$names{$name}->{$key}}) {
+ $file =~ s/(\s)/\\$1/g;
+ }
+ }
+ }
+ }
+ }
+
($status, $error) = $self->write_output_file(
$self->transform_file_name(
$self->project_file_name()));
@@ -4041,6 +4054,12 @@ sub remove_non_custom_settings {
# Virtual Methods To Be Overridden
# ************************************************************
+sub escape_spaces {
+ #my($self) = shift;
+ return 0;
+}
+
+
sub use_reldefs {
#my($self) = shift;
return 1;
diff --git a/modules/StringProcessor.pm b/modules/StringProcessor.pm
index 2b1047fc..db8be883 100644
--- a/modules/StringProcessor.pm
+++ b/modules/StringProcessor.pm
@@ -62,6 +62,8 @@ sub create_array {
## Replace all escaped double and single quotes with special characters
my($escaped) = ($line =~ s/\\\"/\01/g);
$escaped |= ($line =~ s/\\\'/\02/g);
+ $escaped |= ($line =~ s/\\ /\03/g);
+ $escaped |= ($line =~ s/\\\t/\04/g);
foreach my $part (grep(!/^\s*$/,
split(/(\"[^\"]+\"|\'[^\']+\'|\s+)/, $line))) {
@@ -73,6 +75,8 @@ sub create_array {
if ($escaped) {
$part =~ s/\01/\"/g;
$part =~ s/\02/\'/g;
+ $part =~ s/\03/ /g;
+ $part =~ s/\04/\t/g;
}
## Push it onto the array
diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm
index 4d198f95..4082fc17 100644
--- a/modules/TemplateParser.pm
+++ b/modules/TemplateParser.pm
@@ -94,7 +94,12 @@ sub basename {
my($self) = shift;
my($file) = shift;
- $file =~ s/.*[\/\\]//;
+ if ($self->{'cslashes'}) {
+ $file =~ s/.*[\/\\]//;
+ }
+ else {
+ $file =~ s/.*\///;
+ }
return $file;
}
@@ -102,9 +107,10 @@ sub basename {
sub tp_dirname {
my($self) = shift;
my($file) = shift;
+
for(my $i = length($file) - 1; $i != 0; --$i) {
my($ch) = substr($file, $i, 1);
- if ($ch eq '/' || $ch eq '\\') {
+ if ($ch eq '/' || ($self->{'cslashes'} && $ch eq '\\')) {
return $self->{'prjc'}->validated_directory(substr($file, 0, $i));
}
}
diff --git a/templates/automake.mpd b/templates/automake.mpd
index 64887b07..c05f367a 100644
--- a/templates/automake.mpd
+++ b/templates/automake.mpd
@@ -61,7 +61,7 @@ CLEANFILES += \
<%endif%>
<%endif%>
<%if(multiple(custom_type->input_file->output_files))%>
- @touch $@
+ @touch "$@"
<%endif%>
<%endif%>
@@ -188,7 +188,7 @@ lib<%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><
pkgconfig_DATA += <%basenoextension(pkgconfig_file)%>
<%basenoextension(pkgconfig_file)%>: ${top_builddir}/config.status ${srcdir}/<%pkgconfig_file%>
- ${top_builddir}/config.status --file $@:${srcdir}/<%pkgconfig_file%>
+ ${top_builddir}/config.status --file "$@":${srcdir}/<%pkgconfig_file%>
<%endfor%>
<%endif%>
<%if(avoids || requires)%>
diff --git a/templates/make.mpd b/templates/make.mpd
index 489a6a8d..76bf802a 100644
--- a/templates/make.mpd
+++ b/templates/make.mpd
@@ -55,7 +55,7 @@ SHFLAGS = <%shflags%>
<%endfor%>
<%foreach(configurations)%>
OBJEXT = <%objext%>
-OUTPUT_OPTION = <%output_option("-o $@")%>
+OUTPUT_OPTION = <%output_option(-o \"$@\")%>
COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%compile_option("-c")%>
<%if(arflags)%>
ARFLAGS = <%arflags%>
@@ -169,7 +169,7 @@ GENERATED_DIRTY =<%foreach(custom_types)%><%foreach(custom_type->input_files)
<%if(flag_overrides(custom_type->input_file, gendir))%>
@mkdir -p <%flag_overrides(custom_type->input_file, gendir)%>
<%endif%>
- <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%> <%if(custom_type->output_option)%><%custom_type->output_option%> $@<%endif%>
+ <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%> <%if(custom_type->output_option)%><%custom_type->output_option%> "$@"<%endif%>
<%if(flag_overrides(custom_type->input_file, postcommand))%>
<%foreach(custom_type->input_file->output_files)%>
<%flag_overrides(custom_type->input_file, postcommand)%>
diff --git a/templates/nmake.mpd b/templates/nmake.mpd
index 828619d8..4bb9bb2c 100644
--- a/templates/nmake.mpd
+++ b/templates/nmake.mpd
@@ -74,7 +74,7 @@ DEPEND :
@echo Then set the DEPGEN_ROOT environment variable to the full path of Depgen.
!ELSE
<%if(source_files || pch_source)%>
- $(DEPGEN)<%foreach(includes)%> -I"<%include%>"<%endfor%><%foreach(defines cpu_defines common_defines macros)%> -D<%define%><%endfor%><%if(unicode)%> /D UNICODE /D _UNICODE<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%> -D<%staticflag%><%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%> -f "<%noextension(project_file)%>.dep"<%foreach(source_files)%> <%source_file%><%endfor%><%if(pch_source)%> <%pch_source%><%endif%>
+ $(DEPGEN)<%foreach(includes)%> -I"<%include%>"<%endfor%><%foreach(defines cpu_defines common_defines macros)%> -D<%define%><%endfor%><%if(unicode)%> /D UNICODE /D _UNICODE<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%> -D<%staticflag%><%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%> -f "<%noextension(project_file)%>.dep"<%foreach(source_files)%> "<%source_file%>"<%endfor%><%if(pch_source)%> "<%pch_source%>"<%endif%>
<%else%>
-@rem
<%endif%>
@@ -83,39 +83,39 @@ DEPEND :
REALCLEAN : CLEAN
<%if(pdbl)%>
<%if(exename)%>
- -@erase "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.pdb"
+ -@del /f/q "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.pdb"
<%endif%>
<%if(sharedname && type_is_dynamic)%>
- -@erase "$(OUTDIR)\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb"
- -@erase "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.dll"
- -@erase "$(OUTDIR)\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.lib"
- -@erase "$(OUTDIR)\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.exp"
- -@erase "$(OUTDIR)\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.ilk"
+ -@del /f/q "$(OUTDIR)\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb"
+ -@del /f/q "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.dll"
+ -@del /f/q "$(OUTDIR)\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.lib"
+ -@del /f/q "$(OUTDIR)\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.exp"
+ -@del /f/q "$(OUTDIR)\<%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.ilk"
<%else%>
<%if(staticname && type_is_dynamic)%>
- -@erase "$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb"
- -@erase "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.dll"
+ -@del /f/q "$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb"
+ -@del /f/q "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.dll"
<%endif%>
<%endif%>
<%if(staticname && type_is_static || !sharedname && type_is_dynamic)%>
- -@erase "$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.lib"
- -@erase "$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.exp"
- -@erase "$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.ilk"
+ -@del /f/q "$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.lib"
+ -@del /f/q "$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.exp"
+ -@del /f/q "$(OUTDIR)\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.ilk"
<%endif%>
<%endif%>
<%if(pdbc)%>
<%if(type_is_static)%>
- -@erase "<%libout%>\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb"
+ -@del /f/q "<%libout%>\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb"
<%endif%>
<%endif%>
<%if(exename)%>
- -@erase "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.exe"
- -@erase "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.ilk"
+ -@del /f/q "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.exe"
+ -@del /f/q "$(INSTALLDIR)\<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>.ilk"
<%endif%>
<%foreach(custom_types)%>
<%foreach(custom_type->input_files)%>
<%foreach(custom_type->input_file->output_files)%>
- -@erase "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"
+ -@del /f/q "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"
<%endfor%>
<%endfor%>
<%endfor%>
@@ -226,15 +226,15 @@ SOURCE=<%pch_source%>
CPP_SWITCHES=/nologo <%if(add_compile)%><%add_compile%> <%endif%><%if(optimize)%><%optimize_flags%><%else%><%debug_flags%><%endif%> <%compile_flags%><%if(pdbc)%> /Fd"<%if(type_is_static)%><%libout%>\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%>$(INTDIR)/<%endif%>"<%endif%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines macros)%>/D <%define%> <%endfor%><%if(unicode)%>/D UNICODE /D _UNICODE <%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%staticflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%>/Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" /Yc"<%pch_header%>" <%endif%>/FD /c
-"$(INTDIR)\<%noextension(pch_source)%>.obj" "$(INTDIR)\<%noextension(pch_header)%>.pch" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\<%noextension(pch_source)%>.obj" "$(INTDIR)\<%noextension(pch_header)%>.pch" : "$(SOURCE)" "$(INTDIR)"
<%if(dirname(pch_source))%>
@if not exist "$(INTDIR)\<%dirname(pch_source)%>\$(NULL)" mkdir "$(INTDIR)\<%dirname(pch_source)%>"
$(CPP) @<<
- $(CPP_SWITCHES) /Fo"$(INTDIR)\<%noextension(pch_source)%>.obj" $(SOURCE)
+ $(CPP_SWITCHES) /Fo"$(INTDIR)\<%noextension(pch_source)%>.obj" "$(SOURCE)"
<<
<%else%>
$(CPP) @<<
- $(CPP_SWITCHES) /Fo"<%fo_flag%>" $(SOURCE)
+ $(CPP_SWITCHES) /Fo"<%fo_flag%>" "$(SOURCE)"
<<
<%endif%>
@@ -250,15 +250,15 @@ SOURCE=<%source_file%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>"
-"$(INTDIR)\<%noextension(source_file)%>.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\<%noextension(source_file)%>.obj" : "$(SOURCE)" "$(INTDIR)"
@if not exist "$(INTDIR)\<%dirname(source_file)%>\$(NULL)" mkdir "$(INTDIR)\<%dirname(source_file)%>"
$(CPP) @<<
- /nologo <%if(add_compile)%><%add_compile%> <%endif%><%if(optimize)%><%optimize_flags%><%else%><%debug_flags%><%endif%> <%compile_flags%><%if(pdbc)%> /Fd"<%if(type_is_static)%><%libout%>\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%>$(INTDIR)/<%endif%>"<%endif%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines macros)%>/D <%define%> <%endfor%><%if(unicode)%>/D UNICODE /D _UNICODE <%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%staticflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" <%endif%>/FD /c /Fo"$(INTDIR)\<%noextension(source_file)%>.obj" $(SOURCE)
+ /nologo <%if(add_compile)%><%add_compile%> <%endif%><%if(optimize)%><%optimize_flags%><%else%><%debug_flags%><%endif%> <%compile_flags%><%if(pdbc)%> /Fd"<%if(type_is_static)%><%libout%>\<%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>.pdb<%else%>$(INTDIR)/<%endif%>"<%endif%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines macros)%>/D <%define%> <%endfor%><%if(unicode)%>/D UNICODE /D _UNICODE <%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%staticflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" <%endif%>/FD /c /Fo"$(INTDIR)\<%noextension(source_file)%>.obj" "$(SOURCE)"
<<
<%endfor%>
!ENDIF
<%else%>
-"$(INTDIR)\<%noextension(source_file)%>.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\<%noextension(source_file)%>.obj" : "$(SOURCE)" "$(INTDIR)"
<%endif%>
<%endfor%>
@@ -270,7 +270,7 @@ SOURCE=<%custom_type->input_file%>
InputPath=<%custom_type->input_file%>
-<%foreach(custom_type->input_file->output_files)%>"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" <%endfor%>: $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+<%foreach(custom_type->input_file->output_files)%>"<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" <%endfor%>: "$(SOURCE)" "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
<%if(custom_type->libpath)%>
@@ -281,10 +281,10 @@ InputPath=<%custom_type->input_file%>
<%endif%>
<%if(custom_type->output_option)%>
<%foreach(custom_type->input_file->output_files)%>
- <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%custom_type->output_option%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>
+ <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> "$(InputPath)" <%custom_type->output_option%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"
<%endfor%>
<%else%>
- <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath)
+ <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> "$(InputPath)"
<%endif%>
<%if(flag_overrides(custom_type->input_file, postcommand))%>
<%foreach(custom_type->input_file->output_files)%>
@@ -301,8 +301,8 @@ InputPath=<%custom_type->input_file%>
<%if(custom_type->pch_postrule)%>
<%foreach(custom_type->input_file->source_output_files)%>
echo #include "<%pch_header%>" > temporary.src
- type <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src
- move /y temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
+ type "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> temporary.src
+ move /y temporary.src "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>"
<%endfor%>
<%endif%>
<%endif%>
@@ -315,11 +315,11 @@ InputPath=<%custom_type->input_file%>
<%foreach(resource_files)%>
SOURCE=<%resource_file%>
-"$(INTDIR)\<%noextension(resource_file)%>.res" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\<%noextension(resource_file)%>.res" : "$(SOURCE)" "$(INTDIR)"
<%if(dirname(resource_file))%>
@if not exist "$(INTDIR)\<%dirname(resource_file)%>\$(NULL)" mkdir "$(INTDIR)\<%dirname(resource_file)%>"
<%endif%>
- $(RSC) $(RSC_PROJ) $(SOURCE)
+ $(RSC) $(RSC_PROJ) "$(SOURCE)"
<%endfor%>