summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2010-09-17 11:27:20 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2010-09-17 11:27:20 +0000
commit0dae65693bfce8f3962e962d3e661baffd7b4868 (patch)
tree07d2fc1fc1a3fef1d56a39829a4d0c8bafdc6bcf
parent353ae86d1cee77a063144d67921a646047490000 (diff)
downloadMPC-0dae65693bfce8f3962e962d3e661baffd7b4868.tar.gz
ChangeLogTag: Fri Sep 17 11:25:48 UTC 2010 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog23
-rw-r--r--docs/README10
-rw-r--r--docs/html/MakeProjectCreator.html12
-rw-r--r--docs/templates/make.txt6
-rw-r--r--modules/MakeWorkspaceCreator.pm2
-rw-r--r--modules/Options.pm2
-rw-r--r--modules/ProjectCreator.pm16
-rw-r--r--templates/make.mpd13
-rw-r--r--templates/makedll.mpt4
-rw-r--r--templates/vc8csharp.mpd2
10 files changed, 65 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index bd5ed1d8..500c6125 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+Fri Sep 17 11:25:48 UTC 2010 Chad Elliott <elliott_c@ociweb.com>
+
+ * docs/README:
+ * docs/html/MakeProjectCreator.html:
+ * templates/vc8csharp.mpd:
+
+ Removed trailing whitespace.
+
+ * docs/templates/make.txt:
+ * modules/MakeWorkspaceCreator.pm:
+ * templates/make.mpd:
+ * templates/makedll.mpt:
+
+ Added support for the check-syntax target used by emacs.
+
+ * modules/Options.pm:
+
+ Fixed a typo.
+
+ * modules/ProjectCreator.pm:
+
+ Cleaned up and commented a bit of code.
+
Tue Sep 14 19:38:30 UTC 2010 Adam Mitz <mitza@ociweb.com>
* prj_install.pl:
diff --git a/docs/README b/docs/README
index 58838a6c..c4cfdae5 100644
--- a/docs/README
+++ b/docs/README
@@ -489,11 +489,11 @@ dependent If this is given a value, then a dependency upon that
dependent_libs If this is given a value, then a dependency upon that
library value will be given to all of the generated files.
The format for this entry should be the basename for the
- library (no library prefix, postfix, or extension)
+ library (no library prefix, postfix, or extension)
preceded by any relative or absolute path to the library.
- The typical use for this would be so that a project is
- rebuilt when a library needs to be rebuilt for its
- dependent executable. The default for this is unset and no
+ The typical use for this would be so that a project is
+ rebuilt when a library needs to be rebuilt for its
+ dependent executable. The default for this is unset and no
dependency will be generated.
inputext This is a comma separated list of input file extensions
that belong to the command.
@@ -769,7 +769,7 @@ regardless of the presence of an extension definition. In this case, the
input file will be "excluded" from the build.
For custom file types, there are a few keywords that can be used within the
-custom file type input lists: command, commandflags, dependent,
+custom file type input lists: command, commandflags, dependent,
dependent_libs, gendir and postcommand. These keywords (except for gendir)
can be used to augment or override the values of the same name defined in a
Define_Custom section. gendir can be used to specify the directory in which
diff --git a/docs/html/MakeProjectCreator.html b/docs/html/MakeProjectCreator.html
index 6bb0bce0..e1d425fb 100644
--- a/docs/html/MakeProjectCreator.html
+++ b/docs/html/MakeProjectCreator.html
@@ -3110,11 +3110,11 @@
<p class="Tbl-Body">If this is given a value, then a dependency upon that
library value will be given to all of the generated files.
The format for this entry should be the basename for the
- library (no library prefix, postfix, or extension)
+ library (no library prefix, postfix, or extension)
preceded by any relative or absolute path to the library.
- The typical use for this would be so that a project is
- rebuilt when a library needs to be rebuilt for its
- dependent executable. The default for this is unset and no
+ The typical use for this would be so that a project is
+ rebuilt when a library needs to be rebuilt for its
+ dependent executable. The default for this is unset and no
dependency will be generated.</p>
</td>
</tr>
@@ -3838,7 +3838,7 @@
<li class="Body">For custom file types, there are a few
keywords that can be used within the custom file type component
lists: <em class="Code">command</em>, <em class=
- "Code">commandflags</em>, <em class="Code">dependent</em>,
+ "Code">commandflags</em>, <em class="Code">dependent</em>,
<em class="Code">dependent_libs</em>, <em class="Code">gendir</em>,
<em class="Code">postcommand</em>, and <em class=
"Code">recurse</em>.</li>
@@ -3848,7 +3848,7 @@
class="XRef">Assignment Keywords</a>.</li>
<li class="Body">The <em class="Code">command</em>, <em class=
- "Code">commandflags</em>, <em class="Code">dependent</em>,
+ "Code">commandflags</em>, <em class="Code">dependent</em>,
<em class="Code">dependent_libs</em> and
<em class="Code">postcommand</em> keywords can be used to
augment or override the value defined in the <em class=
diff --git a/docs/templates/make.txt b/docs/templates/make.txt
index 4fc01a28..d4dd9938 100644
--- a/docs/templates/make.txt
+++ b/docs/templates/make.txt
@@ -8,6 +8,8 @@ ar = The static library creation tool.
arflags = Flags passed to the static library creation tool.
arflags64 = The 64-bit version of flags passed to the static library creation tool.
build64bit = Determine whether this project is built in 64-bit mode.
+cc = Holds the C compiler.
+checkopt = Compiler specific options to signify syntax checking only.
chmod = A utility to change permissions on a file.
clean = Additional files or directories to be "cleaned" when the clean target is invoked.
compile_option = The option used to specify that the compiler should only compile.
@@ -17,7 +19,7 @@ compilers = Although it is plural, it holds only a single compiler which is used
copy = A utility to copy a file.
cpu = This can be used with the Wind River specific compilers to specify the CPU macro.
cputype = This can be used with the Wind River specific compilers to specify the CPU type.
-cxx = Holds the C/C++ compiler.
+cxx = Holds the C++ compiler.
cxxint = This is Green Hills specific and specifies the type of integration.
delete = A utility to delete a file.
depgen = A utility to generate make dependencies.
@@ -25,6 +27,7 @@ depgen_flags = Flags to be passed to the dependency generator utility.
devnull = The null device for a particular platform.
dld = The linker to create dynamic libraries.
dmclink = Used by the dmc compiler, this determines if the dmc special mode of linking is used.
+echo_outer_quote = A quote variable to assist in Windows/UNIX compatibility.
exe_linkflags = Provides additional link flags for binary targets. The value is eval'ed.
expanded_variable_assignment = Used to enable the setting of custom library paths. Be default this is disabled due to lack of support from all make variants.
extraarflags = Additional, platform specific, flags to be passed to the static library creation tool.
@@ -44,6 +47,7 @@ move = A utility to move a file.
nm = A utility to generate a symbol listing of an object file or executable.
obj_dir = If specified, object files will be place in this directory. It should always end in a slash.
obj_ext = The object file extension.
+output_dir_ext = An optional extension for output directories.
output_option = The option used to specify the output location of various parts of a project such as object file, libraries and executables.
pchcreate = Options passed to the source compiler to create a precompiled header binary.
pchext = The extension of the precompiled header binary file.
diff --git a/modules/MakeWorkspaceCreator.pm b/modules/MakeWorkspaceCreator.pm
index fe3c0d05..2e839a40 100644
--- a/modules/MakeWorkspaceCreator.pm
+++ b/modules/MakeWorkspaceCreator.pm
@@ -23,7 +23,7 @@ use vars qw(@ISA);
# Data Section
# ************************************************************
-my $targets = 'clean depend generated realclean $(CUSTOM_TARGETS)';
+my $targets = 'clean depend generated realclean check-syntax $(CUSTOM_TARGETS)';
# ************************************************************
# Subroutine Section
diff --git a/modules/Options.pm b/modules/Options.pm
index f94637bc..0dc91de0 100644
--- a/modules/Options.pm
+++ b/modules/Options.pm
@@ -137,7 +137,7 @@ sub printUsage {
" -nocomments Do not place comments in the generated files.\n" .
" -noreldefs Do not try to generate default relative definitions.\n" .
" -notoplevel Do not generate the top level target file. Files\n" .
-" are still process, but no top level file is created.\n" .
+" are still processed, but no top level file is created.\n" .
" -recurse Recurse from the current directory and generate from\n" .
" all found input files.\n" .
" -relative Any \$() variable in an mpc file that is matched to NAME\n" .
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 45231ef1..c1cf837e 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -441,6 +441,8 @@ sub process_assignment {
$self->{'dependency_attributes'}->{$2} = $3;
}
+ ## Check the after value and warn the user in the event that it
+ ## contains a value that can not be used within a project name.
if (!$self->valid_project_name($value)) {
$self->warning("after '$value' contains an invalid project name in " .
$self->{'current_input'} . ' at line ' .
@@ -5357,13 +5359,15 @@ sub get_resource_tag {
sub find_command_helper {
my($self, $tag) = @_;
- if (!defined $tag) {
- return undef;
- }
+
+ ## No tag results in no command helper
+ return undef if (!defined $tag);
+
+ ## See if we have a command helper for this tag
my $ch = CommandHelper::get($tag);
- if (defined $ch) {
- return $ch;
- }
+ return $ch if (defined $ch);
+
+ ## None for the base define custom, try again with the parent
return $self->find_command_helper($self->{'define_custom_parent'}->{$tag});
}
diff --git a/templates/make.mpd b/templates/make.mpd
index f0f37e74..91aa0bc4 100644
--- a/templates/make.mpd
+++ b/templates/make.mpd
@@ -74,10 +74,10 @@ CCC = $(CXX)
MAKEFILE = <%project_file%>
DEPENDENCIES = <%if(supports_include)%>.depend.<%endif%>$(MAKEFILE)
<%if(exename)%>
-BTARGETDIR = <%if(exeout)%><%exeout%><%else%>.<%endif%><%slash%><%targetoutdir%>
+BTARGETDIR = <%if(exeout)%><%exeout%><%output_dir_ext%><%else%>.<%endif%><%slash%><%targetoutdir%>
BIN = $(BTARGETDIR)<%exename%>$(EXESUFFIX)$(EXEEXT)
<%else%>
-LTARGETDIR = <%libout%><%slash%><%targetoutdir%>
+LTARGETDIR = <%libout%><%if(!compares(libout, .))%><%output_dir_ext%><%endif%><%slash%><%targetoutdir%>
<%endif%>
CAT = <%type("cat")%>
MV = <%move("mv -f")%>
@@ -107,7 +107,7 @@ LIB = $(LTARGETDIR)$(LIBPREFIX)<%staticname%>$(LIBSUFFIX)$(AREXT)
<%endif%>
<%if(dll_ext && sharedname)%>
SOEXT = <%dll_ext%>
-SHTARGETDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%slash%><%targetoutdir%>
+SHTARGETDIR = <%if(dllout)%><%dllout%><%if(!compares(dllout, .))%><%output_dir_ext%><%endif%><%else%><%libout%><%if(!compares(libout, .))%><%output_dir_ext%><%endif%><%endif%><%slash%><%targetoutdir%>
<%if(version && versupport)%>
SHLIB_BASE = $(LIBPREFIX)<%sharedname%>$(LIBSUFFIX)$(SOEXT)
<%endif%>
@@ -290,7 +290,9 @@ $(TEMPINCDIR):
@$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%dirname(source_file)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%dirname(source_file)%>"
<%endif%>
<%if(ends_with(source_file, \.c) || ends_with(source_file, \.[Ss]))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%><%if(pchuse && pch_source && pchsupport)%><%pchuse%><%pch_header%><%pchext%> <%if(pchstop)%><%pchstop%><%pch_header%><%endif%><%endif%>$(EXPORTFLAGS) $(OUTPUT_OPTION) <%source_file%>
-<%if(source_file->postcommand)%> <%source_file->postcommand%><%endif%>
+<%if(source_file->postcommand)%>
+ <%source_file->postcommand%>
+<%endif%>
<%endfor%>
<%if(resource_files)%>
@@ -326,6 +328,9 @@ realclean: clean
-<%eval(postclean)%>
<%endif%>
+check-syntax:
+ $(COMPILE.cc) $(EXPORTFLAGS)<%if(checkopt)%> <%checkopt%><%endif%> $(CHK_SOURCES)
+
<%if(prebuild)%>
__prebuild__:
@<%eval(prebuild)%>
diff --git a/templates/makedll.mpt b/templates/makedll.mpt
index 472bea30..afa1c910 100644
--- a/templates/makedll.mpt
+++ b/templates/makedll.mpt
@@ -115,6 +115,7 @@ gcc {
platforms = linux
pchcreate = "-o "
pchnobj = 1
+ checkopt = -Wall -Wextra -pedantic -fsyntax-only
visopt = -fvisibility=hidden -fvisibility-inlines-hidden
}
@@ -128,6 +129,7 @@ arm_elf_gcc {
platforms = nucleus
pchcreate = "-o "
pchnobj = 1
+ checkopt = -Wall -Wextra -pedantic -fsyntax-only
visopt = -fvisibility=hidden -fvisibility-inlines-hidden
}
@@ -197,6 +199,7 @@ wrsppc {
ar = ar$(CPUTYPE)
nm = nm$(CPUTYPE)
compilerflags = -mlongcall
+ checkopt = -Wall -Wextra -pedantic -fsyntax-only
platforms = vxworks
}
@@ -207,6 +210,7 @@ wrspentium {
cpu = PENTIUM
ar = ar$(CPUTYPE)
nm = nm$(CPUTYPE)
+ checkopt = -Wall -Wextra -pedantic -fsyntax-only
platforms = vxworks
}
diff --git a/templates/vc8csharp.mpd b/templates/vc8csharp.mpd
index 062314c8..e6a4b48b 100644
--- a/templates/vc8csharp.mpd
+++ b/templates/vc8csharp.mpd
@@ -72,7 +72,7 @@
<NoStdLib>false</NoStdLib>
<%if(DisableSpecificWarnings)%>
<NoWarn><%foreach(DisableSpecificWarnings)%><%DisableSpecificWarning%><%fornotlast(";")%><%endfor%></NoWarn>
-<%endif%>
+<%endif%>
<Optimize><%if(optimize)%>true<%else%>false<%endif%></Optimize>
<RegisterForComInterop><%RegisterForComInterop("false")%></RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>