diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-07-03 18:16:57 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-07-03 18:16:57 +0000 |
commit | 596a7bc31ba0c33c8bbcb18a403fc179759ab8ca (patch) | |
tree | f9a1f1e6268eee3a293c50f92f4586160847ff9c | |
parent | 1fb6182dd2115621110b4ab95050b34f0d4eb641 (diff) | |
download | MPC-596a7bc31ba0c33c8bbcb18a403fc179759ab8ca.tar.gz |
ChangeLogTag: Thu Jul 3 13:15:17 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | modules/ProjectCreator.pm | 34 | ||||
-rw-r--r-- | templates/em3.mpd | 6 | ||||
-rw-r--r-- | templates/em3vcp.mpd | 6 | ||||
-rw-r--r-- | templates/make.mpd | 7 | ||||
-rw-r--r-- | templates/nmake.mpd | 3 | ||||
-rw-r--r-- | templates/vc6.mpd | 6 | ||||
-rw-r--r-- | templates/vc6dsp.mpd | 6 | ||||
-rw-r--r-- | templates/vc7.mpd | 3 |
8 files changed, 54 insertions, 17 deletions
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 0e38bd05..99345057 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -67,21 +67,25 @@ my(%validNames) = ('exename' => 1, ); ## Custom definitions only +## -1 means that it is always an array +## 0 means that it is an array that gets outputext converted to files +## 1 means that it is always scalar my(%customDefined) = ('automatic' => 1, 'command' => 1, 'commandflags' => 1, - 'inputext' => 1, + 'inputext' => -1, + 'libpath' => 1, 'output_option' => 1, 'pch_option' => 1, - 'pre_extension' => 1, - 'pre_filename' => 1, - 'source_outputext' => 1, - 'template_outputext' => 1, - 'header_outputext' => 1, - 'inline_outputext' => 1, - 'documentation_outputext' => 1, - 'resource_outputext' => 1, - 'generic_outputext' => 1, + 'pre_extension' => 0, + 'pre_filename' => 0, + 'source_outputext' => 0, + 'template_outputext' => 0, + 'header_outputext' => 0, + 'inline_outputext' => 0, + 'documentation_outputext' => 0, + 'resource_outputext' => 0, + 'generic_outputext' => 0, ); ## Custom sections as well as definitions @@ -837,7 +841,7 @@ sub parse_define_custom { my($name) = $values[1]; my($value) = $values[2]; if (defined $customDefined{$name}) { - if ($name eq 'inputext') { + if ($customDefined{$name} == -1) { $value = $self->escape_regex_special($value); my(@array) = split(/\s*,\s*/, $value); $self->process_array_assignment( @@ -861,9 +865,7 @@ sub parse_define_custom { $value =~ s/\$\(([^\)]+)\)/$envstart$1$envend/g; } } - if ($name eq 'command' || $name eq 'automatic' || - $name eq 'commandflags' || $name eq 'output_option' || - $name eq 'pch_option') { + if ($customDefined{$name} == 1) { if ($type eq 'assignment') { $self->process_assignment( $name, $value, @@ -1858,8 +1860,8 @@ sub get_custom_value { } $value = \@array; } - elsif ($cmd eq 'command' || $cmd eq 'pch_option' || - $cmd eq 'output_option' || defined $custom{$cmd}) { + elsif (defined $custom{$cmd} || + (defined $customDefined{$cmd} && $customDefined{$cmd} == 1)) { $value = $self->get_assignment($cmd, $self->{'generated_exts'}->{$based}); } diff --git a/templates/em3.mpd b/templates/em3.mpd index 84391cc7..17415167 100644 --- a/templates/em3.mpd +++ b/templates/em3.mpd @@ -251,11 +251,17 @@ InputDir=<%dirname(custom_type->input_file)%> <%if(custom_type->output_option)%> <%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%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> +<%endif%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%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%> BuildCmds= \ +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> \ +<%endif%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%foreach(custom_type->input_file->output_files)%> diff --git a/templates/em3vcp.mpd b/templates/em3vcp.mpd index 84391cc7..17415167 100644 --- a/templates/em3vcp.mpd +++ b/templates/em3vcp.mpd @@ -251,11 +251,17 @@ InputDir=<%dirname(custom_type->input_file)%> <%if(custom_type->output_option)%> <%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%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> +<%endif%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%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%> BuildCmds= \ +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> \ +<%endif%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%foreach(custom_type->input_file->output_files)%> diff --git a/templates/make.mpd b/templates/make.mpd index c13dc330..179c0cfb 100644 --- a/templates/make.mpd +++ b/templates/make.mpd @@ -83,6 +83,13 @@ OUTPUT_OPTION = -o $@ <%if(custom_types)%> <%foreach(custom_types)%> +<%if(custom_types->libpath)%> +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%> +SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%> +LIBPATH := $(LIBPATH):<%custom_type->libpath%> +PATH := $(PATH):<%custom_type->libpath%> + +<%endif%> <%foreach(custom_type->input_files)%> <%if(custom_type->input_file->output_files)%> GENERATED_DIRTY +=<%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%> diff --git a/templates/nmake.mpd b/templates/nmake.mpd index 0b153a69..2304e49c 100644 --- a/templates/nmake.mpd +++ b/templates/nmake.mpd @@ -262,6 +262,9 @@ InputDir=<%dirname(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)" <<tempfile.bat @echo off +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> +<%endif%> <%if(custom_type->output_option)%> <%foreach(custom_type->input_file->output_files)%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%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%> diff --git a/templates/vc6.mpd b/templates/vc6.mpd index 35539dc4..94e720ce 100644 --- a/templates/vc6.mpd +++ b/templates/vc6.mpd @@ -236,11 +236,17 @@ InputDir=<%dirname(custom_type->input_file)%> <%if(custom_type->output_option)%> <%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%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> +<%endif%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%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%> BuildCmds= \ +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> \ +<%endif%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%foreach(custom_type->input_file->output_files)%> diff --git a/templates/vc6dsp.mpd b/templates/vc6dsp.mpd index 35539dc4..94e720ce 100644 --- a/templates/vc6dsp.mpd +++ b/templates/vc6dsp.mpd @@ -236,11 +236,17 @@ InputDir=<%dirname(custom_type->input_file)%> <%if(custom_type->output_option)%> <%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%>" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> +<%endif%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%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%> BuildCmds= \ +<%if(custom_type->libpath)%> + PATH=%PATH%;<%custom_type->libpath%> \ +<%endif%> <%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%foreach(custom_type->input_file->output_files)%> diff --git a/templates/vc7.mpd b/templates/vc7.mpd index 4196d2d8..b02bb504 100644 --- a/templates/vc7.mpd +++ b/templates/vc7.mpd @@ -194,7 +194,8 @@ <Tool Name="VCCustomBuildTool" Description="Invoking <%custom_type->command%> on <%custom_type->input_file%>" - CommandLine="<%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%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%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%endif%>" + CommandLine="<%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%> +<%endif%><%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%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%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_files)%><%else%><%custom_type->input_file->output_files%><%endif%><%endif%>" Outputs="<%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%><%fornotlast(";")%><%endfor%>"/> </FileConfiguration> <%endfor%> |