summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-07-03 18:16:57 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-07-03 18:16:57 +0000
commit0f1fcb02951a4fc3e72e75a0c9f01ca887bcec84 (patch)
treead996c2990be9071cafe2404ae48591b41a2689b
parent05f811da763a8503e7722d5ff02884e9cf64f640 (diff)
downloadATCD-0f1fcb02951a4fc3e72e75a0c9f01ca887bcec84.tar.gz
ChangeLogTag: Thu Jul 3 13:15:17 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog15
-rw-r--r--bin/MakeProjectCreator/README2
-rw-r--r--bin/MakeProjectCreator/modules/ProjectCreator.pm34
-rw-r--r--bin/MakeProjectCreator/templates/bor.mpd4
-rw-r--r--bin/MakeProjectCreator/templates/em3vcp.mpd6
-rw-r--r--bin/MakeProjectCreator/templates/gnu.mpd7
-rw-r--r--bin/MakeProjectCreator/templates/make.mpd7
-rw-r--r--bin/MakeProjectCreator/templates/nmake.mpd3
-rw-r--r--bin/MakeProjectCreator/templates/vc6dsp.mpd6
-rw-r--r--bin/MakeProjectCreator/templates/vc7.mpd3
10 files changed, 70 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 08debba8c34..0f53a56a246 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Thu Jul 3 13:15:17 2003 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/README:
+ * bin/MakeProjectCreator/modules/ProjectCreator.pm:
+ * bin/MakeProjectCreator/templates/bor.mpd:
+ * bin/MakeProjectCreator/templates/em3vcp.mpd:
+ * bin/MakeProjectCreator/templates/gnu.mpd:
+ * bin/MakeProjectCreator/templates/make.mpd:
+ * bin/MakeProjectCreator/templates/nmake.mpd:
+ * bin/MakeProjectCreator/templates/vc6dsp.mpd:
+ * bin/MakeProjectCreator/templates/vc7.mpd:
+
+ Added 'libpath' to the custom define keywords to allow a user to
+ specify an additional library search path for the custom command.
+
Thu Jul 3 11:49:23 2003 Chad Elliott <elliott_c@ociweb.com>
* bin/MakeProjectCreator/templates/bor.mpd:
diff --git a/bin/MakeProjectCreator/README b/bin/MakeProjectCreator/README
index 9abca592ab2..6f3b04062a4 100644
--- a/bin/MakeProjectCreator/README
+++ b/bin/MakeProjectCreator/README
@@ -211,6 +211,8 @@ command The name of the command that should be used to process
commandflags Any options that should be passed to the command go here.
inputext This is a comma separated list of input file extensions
that belong to the command.
+libpath If the command requires an additional library path, add
+ it here.
output_option If the command takes an option to specify a single file
output name, then set it here. Otherwise, this should be
omitted.
diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm
index 0e38bd0525e..99345057ed7 100644
--- a/bin/MakeProjectCreator/modules/ProjectCreator.pm
+++ b/bin/MakeProjectCreator/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/bin/MakeProjectCreator/templates/bor.mpd b/bin/MakeProjectCreator/templates/bor.mpd
index 94fc6a2d61e..990319e1f60 100644
--- a/bin/MakeProjectCreator/templates/bor.mpd
+++ b/bin/MakeProjectCreator/templates/bor.mpd
@@ -174,6 +174,10 @@ $(IDLDIR)\<%basenoextension(idl_file)%>S.cpp $(IDLDIR)\<%basenoextension(idl_fil
# <%custom_type%> rules
#
+<%if(cutom_type->libpath)%>
+PATH := $(PATH);<%custom_type->libpath%>
+
+<%endif%>
<%foreach(custom_type->input_files)%>
<%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%>: <%custom_type->input_file%>
diff --git a/bin/MakeProjectCreator/templates/em3vcp.mpd b/bin/MakeProjectCreator/templates/em3vcp.mpd
index 84391cc7b0c..174151676e4 100644
--- a/bin/MakeProjectCreator/templates/em3vcp.mpd
+++ b/bin/MakeProjectCreator/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/bin/MakeProjectCreator/templates/gnu.mpd b/bin/MakeProjectCreator/templates/gnu.mpd
index 3c6578d8c78..0b0bb28a717 100644
--- a/bin/MakeProjectCreator/templates/gnu.mpd
+++ b/bin/MakeProjectCreator/templates/gnu.mpd
@@ -311,6 +311,13 @@ avoid_warning:
<%endif%>
<%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/bin/MakeProjectCreator/templates/make.mpd b/bin/MakeProjectCreator/templates/make.mpd
index c13dc33033c..179c0cfb8bd 100644
--- a/bin/MakeProjectCreator/templates/make.mpd
+++ b/bin/MakeProjectCreator/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/bin/MakeProjectCreator/templates/nmake.mpd b/bin/MakeProjectCreator/templates/nmake.mpd
index 0b153a6975e..2304e49c367 100644
--- a/bin/MakeProjectCreator/templates/nmake.mpd
+++ b/bin/MakeProjectCreator/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/bin/MakeProjectCreator/templates/vc6dsp.mpd b/bin/MakeProjectCreator/templates/vc6dsp.mpd
index 35539dc485d..94e720ce92b 100644
--- a/bin/MakeProjectCreator/templates/vc6dsp.mpd
+++ b/bin/MakeProjectCreator/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/bin/MakeProjectCreator/templates/vc7.mpd b/bin/MakeProjectCreator/templates/vc7.mpd
index 4196d2d84d9..b02bb50446b 100644
--- a/bin/MakeProjectCreator/templates/vc7.mpd
+++ b/bin/MakeProjectCreator/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%>