diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2005-01-25 16:49:40 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2005-01-25 16:49:40 +0000 |
commit | 194ffe12d8a3f87f4b2d435e4eb2a0e3b83909af (patch) | |
tree | 67729f1f4fb4dd06c94c43d704f335b5127cd7df | |
parent | 8c6e989a42473a8b0298f15c5d74d5b88a3d4ce4 (diff) | |
download | MPC-194ffe12d8a3f87f4b2d435e4eb2a0e3b83909af.tar.gz |
ChangeLogTag: Tue Jan 25 10:44:07 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 69 | ||||
-rw-r--r-- | README | 2 | ||||
-rwxr-xr-x | clone_build_tree.pl | 1 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 29 | ||||
-rw-r--r-- | templates/bmake.mpd | 6 | ||||
-rw-r--r-- | templates/em3.mpd | 4 | ||||
-rw-r--r-- | templates/em3vcp.mpd | 4 | ||||
-rw-r--r-- | templates/em3vcpdll.mpt | 1 | ||||
-rw-r--r-- | templates/make.mpd | 10 | ||||
-rw-r--r-- | templates/nmake.mpd | 4 | ||||
-rw-r--r-- | templates/vc6.mpd | 4 | ||||
-rw-r--r-- | templates/vc6dsp.mpd | 4 | ||||
-rw-r--r-- | templates/vc6dspdll.mpt | 2 | ||||
-rw-r--r-- | templates/vc7.mpd | 4 | ||||
-rw-r--r-- | templates/vc7csharp.mpd | 8 | ||||
-rw-r--r-- | templates/vc7vb.mpd | 8 |
16 files changed, 124 insertions, 36 deletions
@@ -1,17 +1,48 @@ +Tue Jan 25 10:44:07 2005 Chad Elliott <elliott_c@ociweb.com> + + * clone_build_tree.pl: + + Added .cvsignore to the list of files to exclude. + + * templates/em3vcpdll.mpt: + * templates/vc6dspdll.mpt: + + Explicitly set the type_description and type_code instead of + getting a default in the template file. + + * templates/nmake.mpd: + + Don't run the $(DEPGEN) command if there are no source files. + + * README: + * modules/ProjectCreator.pm: + * templates/bmake.mpd: + * templates/em3vcp.mpd: + * templates/make.mpd: + * templates/vc6dsp.mpd: + * templates/vc7.mpd: + * templates/vc7csharp.mpd: + * templates/vc7vb.mpd: + + Added support for a new keyword called 'custom_only'. If it is + set in an mpc file, the generated project will only contain custom + generation targets. It will not contain source files, header + files, etc. + Mon Jan 24 16:45:31 2005 J.T. Conklin <jtc@acorntoolworks.com> - * templates/automake.mpd: + * templates/automake.mpd: - Fixed pkgconfigdata definition: config.status is found in - ${top_builddir}, not ${top_srcdir}. Also fixed a tab that had - been converted to spaces by mistake. + Fixed pkgconfigdata definition: config.status is found in + ${top_builddir}, not ${top_srcdir}. Also fixed a tab that had + been converted to spaces by mistake. Sun Jan 23 00:15:31 2005 J.T. Conklin <jtc@acorntoolworks.com> - * modules/AutomakeWorkspaceCreator.pm: + * modules/AutomakeWorkspaceCreator.pm: - Restore CLEANFILES and EXTRA_DIST to conditionals since these - two macros don't match the general form of automake primaries. + Restore CLEANFILES and EXTRA_DIST to conditionals since these + two macros don't match the general form of automake primaries. Sat Jan 22 23:59:00 2005 Marek Brudka <mbrudka@aster.pl> @@ -44,27 +75,27 @@ Sat Jan 22 23:59:00 2005 Marek Brudka <mbrudka@aster.pl> Sat Jan 22 23:20:57 2005 J.T. Conklin <jtc@acorntoolworks.com> - * templates/automake.mpd: + * templates/automake.mpd: - Use new "sort" feature to sort list of header, inline, - template, etc. files for _HEADERS primary. + Use new "sort" feature to sort list of header, inline, + template, etc. files for _HEADERS primary. Sat Jan 22 23:12:53 2005 J.T. Conklin <jtc@acorntoolworks.com> - * templates/automake.mpd: + * templates/automake.mpd: - Changed to touch "stamp" file only if custom file type - generates multiple files. + Changed to touch "stamp" file only if custom file type + generates multiple files. Fri Jan 21 17:16:04 2005 J.T. Conklin <jtc@acorntoolworks.com> - * modules/AutomakeWorkspaceCreator.pm: + * modules/AutomakeWorkspaceCreator.pm: - Changed conditionals which matched a set of specific automake - primaries to use a single regular expression that matches the - general form of all automake primaries. We shouldn't have to - change this any more when adding support for additional auto- - make features. + Changed conditionals which matched a set of specific automake + primaries to use a single regular expression that matches the + general form of all automake primaries. We shouldn't have to + change this any more when adding support for additional auto- + make features. Fri Jan 21 11:07:56 2005 Chad Elliott <elliott_c@ociweb.com> @@ -162,6 +162,8 @@ pure_libs Specifies 1 or more libraries to link into the exe or library. If libraries receive a file extension, then these will not. after Specifies that this project must be built after 1 or more project names listed. +custom_only Create a project that contains only custom generation + targets (any file type described by a Define_Custom section). dynamicflags Specifies preprocessor flags needed for dynamic libraries staticflags Specifies preprocessor flags needed for static libraries diff --git a/clone_build_tree.pl b/clone_build_tree.pl index 83b51518..3df26e82 100755 --- a/clone_build_tree.pl +++ b/clone_build_tree.pl @@ -49,6 +49,7 @@ sub findCallback { my($matches) = !(/^CVS\z/s && ($File::Find::prune = 1) || defined $exclude && /^$exclude\z/s && ($File::Find::prune = 1) || + /^\.cvsignore\z/s && ($File::Find::prune = 1) || /^build\z/s && ($File::Find::prune = 1) || /^\..*obj\z/s && ($File::Find::prune = 1) || /^Templates\.DB\z/s && ($File::Find::prune = 1) || diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 83ccef98..ff911eaa 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -43,6 +43,7 @@ my(%validNames) = ('exename' => 1, 'install' => 1, 'includes' => 1, 'after' => 1, + 'custom_only' => 1, 'libs' => 0, 'lit_libs' => 0, 'pure_libs' => 0, @@ -189,6 +190,13 @@ my(%vbma) = ('source_files' => [ 'subtype' ], # Language Specific Component Settings # ************************************************************ +# Index Description +# ----- ----------- +# 0 File types +# 1 Files automatically excluded from source_files +# 2 Assignments available in standard file types +# 3 The entry point for executables +# 4 The language uses a preprocessor my(%language) = ('cplusplus' => [ \%cppvc, \%cppec, {} , 'main', 1 ], 'csharp' => [ \%csvc, {}, \%csma, 'Main', 0 ], 'java' => [ \%jvc, {}, {} , 'Main', 0 ], @@ -3457,6 +3465,10 @@ 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()) { ($status, $error) = $self->write_output_file( $self->transform_file_name( @@ -3560,6 +3572,7 @@ sub reset_generating_types { my($self) = shift; my($lang) = $self->get_language(); my(%reset) = ('valid_components' => $language{$lang}->[0], + 'custom_only_removed' => $language{$lang}->[0], 'exclude_components' => $language{$lang}->[1], 'matching_assignments' => $language{$lang}->[2], 'generated_exts' => {}, @@ -3949,6 +3962,22 @@ sub project_file_name { $self->project_file_extension()); } + +sub remove_non_custom_settings { + my($self) = shift; + + ## Remove any files that may have automatically been added + ## to this project + foreach my $key (keys %{$self->{'custom_only_removed'}}) { + $self->{$key} = {}; + } + + ## Unset the exename, sharedname and staticname + $self->process_assignment('exename', undef); + $self->process_assignment('sharedname', undef); + $self->process_assignment('staticname', undef); +} + # ************************************************************ # Virtual Methods To Be Overridden # ************************************************************ diff --git a/templates/bmake.mpd b/templates/bmake.mpd index be6b4e90..678ceaf2 100644 --- a/templates/bmake.mpd +++ b/templates/bmake.mpd @@ -215,8 +215,7 @@ $(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE) ! <%endif%> -<%if(type_is_static)%> -<%if(staticname)%> +<%if(type_is_static && staticname)%> OUTPUTDIR = <%libout%>\\ all: $(OUTPUTDIR)$(NAME)$(LIB_EXT) @@ -228,7 +227,6 @@ $(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES) ! <%endif%> -<%endif%> <%if(!exename && !sharedname && !staticname)%> all: @-rem @@ -287,6 +285,8 @@ realclean: clean if exist "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del $(OUTPUTDIR)$(NAME)$(LIB_EXT) <%endif%> <%endif%> +<%if(exename || sharedname || staticname)%> if exist "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" del $(OUTPUTDIR)$(NAME)$(POSTLINKRM) +<%endif%> <%marker(bottom)%> diff --git a/templates/em3.mpd b/templates/em3.mpd index 4c4f86e9..89f9d8d7 100644 --- a/templates/em3.mpd +++ b/templates/em3.mpd @@ -3,7 +3,7 @@ # ** DO NOT EDIT ** <%foreach(platforms)%> -# TARGTYPE "<%operating_system("Win32")%> (<%platform%>) <%type_description("Dynamic-Link Library")%>" <%type_code%> +# TARGTYPE "<%operating_system("Win32")%> (<%platform%>) <%if(exename || sharedname || staticname)%><%type_description%>" <%type_code%><%else%>Generic Project" 0x010a<%endif%> <%endfor%> CFG=<%project_name%> - <%operating_system("Win32")%> (<%default_platform%>) <%default_configuration%> @@ -22,7 +22,7 @@ CFG=<%project_name%> - <%operating_system("Win32")%> (<%default_platform%>) <%de !MESSAGE <%foreach(platforms)%> <%foreach(configurations)%> -!MESSAGE "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" (based on "<%operating_system%> (<%platform%>) <%type_description%>") +!MESSAGE "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" (based on "<%operating_system%> (<%platform%>) <%if(exename || sharedname || staticname)%><%type_description%><%else%>Generic Project<%endif%>") <%endfor%> <%endfor%> !MESSAGE diff --git a/templates/em3vcp.mpd b/templates/em3vcp.mpd index 4c4f86e9..89f9d8d7 100644 --- a/templates/em3vcp.mpd +++ b/templates/em3vcp.mpd @@ -3,7 +3,7 @@ # ** DO NOT EDIT ** <%foreach(platforms)%> -# TARGTYPE "<%operating_system("Win32")%> (<%platform%>) <%type_description("Dynamic-Link Library")%>" <%type_code%> +# TARGTYPE "<%operating_system("Win32")%> (<%platform%>) <%if(exename || sharedname || staticname)%><%type_description%>" <%type_code%><%else%>Generic Project" 0x010a<%endif%> <%endfor%> CFG=<%project_name%> - <%operating_system("Win32")%> (<%default_platform%>) <%default_configuration%> @@ -22,7 +22,7 @@ CFG=<%project_name%> - <%operating_system("Win32")%> (<%default_platform%>) <%de !MESSAGE <%foreach(platforms)%> <%foreach(configurations)%> -!MESSAGE "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" (based on "<%operating_system%> (<%platform%>) <%type_description%>") +!MESSAGE "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>" (based on "<%operating_system%> (<%platform%>) <%if(exename || sharedname || staticname)%><%type_description%><%else%>Generic Project<%endif%>") <%endfor%> <%endfor%> !MESSAGE diff --git a/templates/em3vcpdll.mpt b/templates/em3vcpdll.mpt index c2979bff..2e7ed4e9 100644 --- a/templates/em3vcpdll.mpt +++ b/templates/em3vcpdll.mpt @@ -3,6 +3,7 @@ conditional_include "common" +type_description = "Dynamic-Link Library" configurations = Release Debug platforms = "WCE ARM" "WCE ARMV4" "WCE x86" "WCE emulator" default_configuration = Debug diff --git a/templates/make.mpd b/templates/make.mpd index 13d5eb9f..c268da1d 100644 --- a/templates/make.mpd +++ b/templates/make.mpd @@ -124,10 +124,10 @@ all: $(INSTARGET) <%if(install)%>install<%else%><%if(!exename)%>install<%endif%> $(SHLIB): <%foreach(configurations)%><%if(tempinc)%>$(TEMPINCDIR) <%endif%><%endfor%><%targetoutdir%> $(OBJS) <%foreach(configurations)%><%foreach(platforms)%><%if(dld)%><%dld%> $(LDFLAGS)<%else%>$(LINK.cc)<%endif%><%endfor%><%endfor%> $(SHFLAGS) $(OUTPUT_OPTION) $(OBJS) $(LDLIBS) <%else%> -<%if(!exename)%> +<%if(staticname)%> INSTARGET = $(LIB) -all: $(INSTARGET) <%if(install)%>install<%else%><%if(!exename)%>install<%endif%><%endif%> +all: $(INSTARGET)<%if(install)%> install<%endif%> <%endif%> <%endif%> @@ -247,7 +247,7 @@ install: <%endif%> <%else%> -<%if(!exename)%> +<%if(sharedname || staticname)%> install: @if [ "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>" != "." ]; then \ test -d "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%if(targetoutdir)%>/<%targetoutdir%><%endif%>" || mkdir -p "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%if(targetoutdir)%>/<%targetoutdir%><%endif%>" 2> /dev/null || true; \ @@ -279,7 +279,11 @@ $(DEPENDENCIES): @touch $(DEPENDENCIES) depend: +<%if(source_files || pch_source)%> <%depgen("makedepend -Y")%> $(CFLAGS) $(CCFLAGS) $(CPPFLAGS) -f $(DEPENDENCIES) $(SRC) 2> /dev/null +<%else%> + @-: +<%endif%> include $(DEPENDENCIES) <%marker(bottom)%> diff --git a/templates/nmake.mpd b/templates/nmake.mpd index 29f19932..c418de47 100644 --- a/templates/nmake.mpd +++ b/templates/nmake.mpd @@ -85,7 +85,11 @@ DEPEND : @echo cvs -d :pserver:anonymous@anoncvs.ociweb.com:/cvs co Depgen @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(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%> !ENDIF REALCLEAN : CLEAN diff --git a/templates/vc6.mpd b/templates/vc6.mpd index 863e2c26..e09661b5 100644 --- a/templates/vc6.mpd +++ b/templates/vc6.mpd @@ -2,7 +2,7 @@ # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** -# TARGTYPE "<%platform("Win32")%> (<%platform_hardware("x86")%>) <%type_description("Dynamic-Link Library")%>" <%type_code("0x0102")%> +# TARGTYPE "<%platform("Win32")%> (<%platform_hardware("x86")%>) <%if(exename || sharedname || staticname)%><%type_description%>" <%type_code%><%else%>Generic Project" 0x010a<%endif%> CFG=<%project_name%> - <%platform("Win32")%> <%default_configuration("Debug")%> !MESSAGE This is not a valid makefile. To build this project using NMAKE, @@ -19,7 +19,7 @@ CFG=<%project_name%> - <%platform("Win32")%> <%default_configuration("Debug")%> !MESSAGE Possible choices for configuration are: !MESSAGE <%foreach(configurations)%> -!MESSAGE "<%project_name%> - <%platform%> <%configuration%>" (based on "<%platform%> (<%platform_hardware%>) <%type_description%>") +!MESSAGE "<%project_name%> - <%platform%> <%configuration%>" (based on "<%platform%> (<%platform_hardware%>) <%if(exename || sharedname || staticname)%><%type_description%><%else%>Generic Project<%endif%>") <%endfor%> !MESSAGE diff --git a/templates/vc6dsp.mpd b/templates/vc6dsp.mpd index 863e2c26..e09661b5 100644 --- a/templates/vc6dsp.mpd +++ b/templates/vc6dsp.mpd @@ -2,7 +2,7 @@ # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** -# TARGTYPE "<%platform("Win32")%> (<%platform_hardware("x86")%>) <%type_description("Dynamic-Link Library")%>" <%type_code("0x0102")%> +# TARGTYPE "<%platform("Win32")%> (<%platform_hardware("x86")%>) <%if(exename || sharedname || staticname)%><%type_description%>" <%type_code%><%else%>Generic Project" 0x010a<%endif%> CFG=<%project_name%> - <%platform("Win32")%> <%default_configuration("Debug")%> !MESSAGE This is not a valid makefile. To build this project using NMAKE, @@ -19,7 +19,7 @@ CFG=<%project_name%> - <%platform("Win32")%> <%default_configuration("Debug")%> !MESSAGE Possible choices for configuration are: !MESSAGE <%foreach(configurations)%> -!MESSAGE "<%project_name%> - <%platform%> <%configuration%>" (based on "<%platform%> (<%platform_hardware%>) <%type_description%>") +!MESSAGE "<%project_name%> - <%platform%> <%configuration%>" (based on "<%platform%> (<%platform_hardware%>) <%if(exename || sharedname || staticname)%><%type_description%><%else%>Generic Project<%endif%>") <%endfor%> !MESSAGE diff --git a/templates/vc6dspdll.mpt b/templates/vc6dspdll.mpt index cbeafd00..2dac642a 100644 --- a/templates/vc6dspdll.mpt +++ b/templates/vc6dspdll.mpt @@ -4,6 +4,8 @@ conditional_include "common" conditional_include "vccommon" +type_description = "Dynamic-Link Library" +type_code = 0x0102 configurations = Release Debug type_is_binary = 1 type_is_dynamic = 1 diff --git a/templates/vc7.mpd b/templates/vc7.mpd index 83cafc47..51380f28 100644 --- a/templates/vc7.mpd +++ b/templates/vc7.mpd @@ -88,6 +88,7 @@ SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>" GenerateDebugInformation="TRUE" +<%if(exename || sharedname)%> <%if(type_is_dynamic)%> ProgramDatabaseFile="$(OutDir)\<%sharedname%><%lib_modifier%>.pdb" <%else%> @@ -95,12 +96,13 @@ ProgramDatabaseFile="$(OutDir)\<%exename%><%if(use_modifier)%><%lib_modifier%><%endif%>.pdb" <%endif%> <%endif%> +<%endif%> SubSystem="<%subsystem("1")%>" <%if(optimize)%> OptimizeReferences="<%optref("2")%>" EnableCOMDATFolding="<%opticf("2")%>" <%endif%> -<%if(type_is_dynamic)%> +<%if(type_is_dynamic && sharedname)%> ImportLibrary="<%libout%>\<%sharedname%><%lib_modifier%>.lib" <%endif%> <%endif%> diff --git a/templates/vc7csharp.mpd b/templates/vc7csharp.mpd index ea805792..e595dda9 100644 --- a/templates/vc7csharp.mpd +++ b/templates/vc7csharp.mpd @@ -23,13 +23,17 @@ ApplicationIcon = "" <%endif%> AssemblyKeyContainerName = "" - AssemblyName = "<%if(exename)%><%exename%><%else%><%sharedname%><%endif%>" +<%if(exename || sharedname || staticname)%> + AssemblyName = "<%if(exename)%><%exename%><%else%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>" +<%endif%> AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" +<%if(exename || sharedname || staticname)%> OutputType = "<%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%>" +<%endif%> PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "" @@ -51,7 +55,9 @@ NoStdLib = "false" NoWarn = "" Optimize = "<%if(optimize)%>true<%else%>false<%endif%>" +<%if(exename || sharedname || staticname)%> OutputPath = "<%if(exename)%><%if(install)%><%install%><%else%>.<%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%endif%>\<%output_dir%>\" +<%endif%> RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" diff --git a/templates/vc7vb.mpd b/templates/vc7vb.mpd index 8f0423e2..aee35c4e 100644 --- a/templates/vc7vb.mpd +++ b/templates/vc7vb.mpd @@ -23,13 +23,17 @@ ApplicationIcon = "" <%endif%> AssemblyKeyContainerName = "" - AssemblyName = "<%if(exename)%><%exename%><%else%><%sharedname%><%endif%>" +<%if(exename || sharedname || staticname)%> + AssemblyName = "<%if(exename)%><%exename%><%else%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%>" +<%endif%> AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" +<%if(exename || sharedname || staticname)%> OutputType = "<%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%>" +<%endif%> OutputCompare = "Binary" OptionExplicit = "On" OptionStrict = "Off" @@ -47,7 +51,9 @@ DefineSymbols = "<%if(optimize)%>false<%else%>true<%endif%>" IncrementalBuild = "<%incremental("false")%>" Optimize = "<%if(optimize)%>true<%else%>false<%endif%>" +<%if(exename || sharedname || staticname)%> OutputPath = "<%if(exename)%><%if(install)%><%install%><%else%>.<%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%endif%>\<%output_dir%>\" +<%endif%> RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" |