diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2010-01-25 18:47:53 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2010-01-25 18:47:53 +0000 |
commit | df4028fd7d8c2293b758bf36bd31877cdc68fbac (patch) | |
tree | 28b4a2147bda36b6bbe0b5797fe5a86110fe8ff7 | |
parent | b7d2fdfa37436d7bc1a4592bdba44ed986bff13c (diff) | |
download | MPC-df4028fd7d8c2293b758bf36bd31877cdc68fbac.tar.gz |
ChangeLogTag: Mon Jan 25 18:46:30 UTC 2010 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | docs/README | 8 | ||||
-rw-r--r-- | docs/USAGE | 4 | ||||
-rw-r--r-- | docs/html/MakeProjectCreator.html | 50 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 8 | ||||
-rw-r--r-- | templates/make.mpd | 10 | ||||
-rw-r--r-- | templates/makedll.mpt | 10 |
7 files changed, 104 insertions, 5 deletions
@@ -1,3 +1,22 @@ +Mon Jan 25 18:46:30 UTC 2010 Chad Elliott <elliott_c@ociweb.com> + + * docs/README: + * docs/USAGE: + * docs/html/MakeProjectCreator.html: + * modules/ProjectCreator.pm: + + Added additional psuedo template variables (bat, cmd and exe) and + an optional environment variable to force Windows compatible + commands to be used in psuedo template variables. See the + documentation for more on this. + + * templates/make.mpd: + * templates/makedll.mpt: + + Modified this template and template input file to use a C compiler + on files that have a .c extension instead of always using the C++ + compiler. + Sat Jan 23 18:32:14 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl> * config/ndds_ts_defaults.mpb: diff --git a/docs/README b/docs/README index 806002d6..ad67a3c9 100644 --- a/docs/README +++ b/docs/README @@ -563,6 +563,14 @@ postcommand Allows a user to execute arbitrary commands after <%prj_type%> - The project type supplied by the -type option. + The following psuedo template variables will be set to + the known extension for Windows and empty on non-Windows + based project types. + + <%bat%> - The extension for batch files. + <%cmd%> - The extension for command files. + <%exe%> - The extension for executable files. + If any referenced pseudo template variable does not contain a value, then the particular setting (command, commandflags, dependent, postcommand or @@ -300,3 +300,7 @@ MPC_GHS_UNIX - This environment variable is only meaningful when generating the ghs project files. By default, the ghs type assumes that it is for Windows. If this is not the case, set this environment variable prior to running MPC. + +MPC_USE_WIN_COMMANDS - Setting this causes the Windows related pseudo +template variables to be used regardless of the type of project being +generated. diff --git a/docs/html/MakeProjectCreator.html b/docs/html/MakeProjectCreator.html index d712ed71..802ef252 100644 --- a/docs/html/MakeProjectCreator.html +++ b/docs/html/MakeProjectCreator.html @@ -1261,6 +1261,11 @@ By default, the ghs type assumes that it is for Windows. Set this environment variable prior to running MPC if this is not the case.</li> + + <li class="Body">The <em class="Code">MPC_USE_WIN_COMMANDS</em> + environment variable causes the Windows related pseudo template + variables to be used regardless of the type of project being + generated.</li> </ul> </div> </div> @@ -4544,6 +4549,51 @@ variable setting.</p> </td> </tr> + + <tr> + <td rowspan="1" colspan="2"> + <p class="TblCode">The following variables will + be set to the known extension for Windows based + project types and empty on non-Windows based + project types.</p> + </td> + </tr> + + <tr> + <td rowspan="1" colspan="1"> + <p class="TblCode"><em class= + "TableCode"><%bat%></em></p> + </td> + + <td rowspan="1" colspan="1"> + <p class="Tbl-Body">The extension for batch + files.</p> + </td> + </tr> + + <tr> + <td rowspan="1" colspan="1"> + <p class="TblCode"><em class= + "TableCode"><%cmd%></em></p> + </td> + + <td rowspan="1" colspan="1"> + <p class="Tbl-Body">The extension for command + files.</p> + </td> + </tr> + + <tr> + <td rowspan="1" colspan="1"> + <p class="TblCode"><em class= + "TableCode"><%exe%></em></p> + </td> + + <td rowspan="1" colspan="1"> + <p class="Tbl-Body">The extension for executable + files.</p> + </td> + </tr> </table> </li> </ul> diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 28e14ac5..2f68c181 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -3902,6 +3902,9 @@ sub get_command_subs { $valid{'rmdir'} = 'rmdir /s/q'; $valid{'nul'} = 'nul'; $valid{'slash'} = '\\'; + $valid{'bat'} = '.bat'; + $valid{'cmd'} = '.cmd'; + $valid{'exe'} = '.exe'; } else { $valid{'cat'} = 'cat'; @@ -3914,6 +3917,9 @@ sub get_command_subs { $valid{'rmdir'} = 'rm -rf'; $valid{'nul'} = '/dev/null'; $valid{'slash'} = '/'; + $valid{'bat'} = ''; + $valid{'cmd'} = ''; + $valid{'exe'} = ''; } ## Add the project specific compatibility commands @@ -5256,7 +5262,7 @@ sub webapp_supported { sub use_win_compatibility_commands { #my $self = shift; - return 0; + return $ENV{MPC_USE_WIN_COMMANDS}; } diff --git a/templates/make.mpd b/templates/make.mpd index cf5015b8..fa2e67da 100644 --- a/templates/make.mpd +++ b/templates/make.mpd @@ -28,6 +28,7 @@ ifeq ($(CFG), <%platform%> <%configuration%>) ifeq ($(CFG), <%configuration%>) <%endif%> <%endif%> +CC = <%cc%> CXX = <%cxx%> <%if(ld)%> LD = <%ld%> @@ -53,7 +54,8 @@ PICFLAGS = <%pic%> CPPFLAGS = <%if(visibility && visopt)%><%visopt%> <%endif%>$(PICFLAGS) $(GENFLAGS)<%if(compile_flags)%> <%compile_flags%><%endif%><%if(cpu)%> -DCPU=$(CPU)<%endif%><%if(tempincopt)%> <%tempincopt%>$(TEMPINCDIR)<%endif%><%if(compilerflags)%> <%compilerflags%><%endif%><%if(build64bit && compilerflags64)%> <%compilerflags64%><%endif%><%if(pch_source && pchsupport)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%><%if(extracppflags)%><%foreach(extracppflags)%><%if(!starts_with(extracppflag, -D) || !contains(language, java))%> <%extracppflag%><%endif%><%endfor%><%endif%><%if(includes)%><%foreach(includes)%> -I"<%include%>"<%endfor%><%endif%><%if(!contains(language, java) && macros)%><%foreach(macros)%> -D<%macro%><%endfor%><%endif%> OBJEXT = <%obj_ext%> OUTPUT_OPTION = <%output_option(-o \"$@\")%> -COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%compile_option("-c")%> +COMPILE.c = $(CC) $(CCFLAGS) $(CPPFLAGS) <%compile_option("-c")%> +COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%compile_option%> <%if(rc)%> RESEXT = <%res_ext%> <%endif%> @@ -95,7 +97,7 @@ LIBSUFFIX = <%lib_modifier%> EXESUFFIX = <%lib_modifier%> <%endif%> GENFLAGS =<%if(!contains(configuration, Release) || optimize)%> <%genflags%><%endif%> -LDLIBS =<%foreach(libs)%> <%libopt%><%libname_prefix%><%lib%>$(LIBSUFFIX)<%endfor%><%foreach(lit_libs)%> <%libopt%>"<%lit_lib%>"<%endfor%><%foreach(pure_libs)%> "<%pure_lib%>"<%endfor%> <%ldlibs%> +LDLIBS =<%foreach(libs)%> <%libopt%>"<%libname_prefix%><%lib%>$(LIBSUFFIX)"<%endfor%><%foreach(lit_libs)%> <%libopt%>"<%lit_lib%>"<%endfor%><%foreach(pure_libs)%> "<%pure_lib%>"<%endfor%> <%ldlibs%> OBJS =<%if(pch_source && pchsupport)%> <%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT)<%endif%><%foreach(source_files)%> <%targetoutdir%><%obj_dir%><%noextension(source_file)%>$(OBJEXT)<%endfor%><%if(rc)%><%foreach(resource_files)%> <%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT)<%endfor%><%endif%> <%if(lib_ext)%> <%if(staticname)%> @@ -276,7 +278,7 @@ $(TEMPINCDIR): <%if(targetoutdir || obj_dir)%> @$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%dirname(pch_source)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%dirname(pch_source)%>" <%endif%> - $(COMPILE.cc) <%if(pchcreate)%><%pchcreate%><%targetoutdir%><%obj_dir%><%pch_header%><%pchext%> <%endif%>$(EXPORTFLAGS)<%if(!pchnobj)%> $(OUTPUT_OPTION)<%endif%> <%pch_source%> + <%if(ends_with(pch_source, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(pchcreate)%><%pchcreate%><%targetoutdir%><%obj_dir%><%pch_header%><%pchext%> <%endif%>$(EXPORTFLAGS)<%if(!pchnobj)%> $(OUTPUT_OPTION)<%endif%> <%pch_source%> <%if(pchnobj)%> @$(CP) <%targetoutdir%><%obj_dir%><%pch_header%><%pchext%> <%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT) <%endif%> @@ -287,7 +289,7 @@ $(TEMPINCDIR): <%if(targetoutdir || obj_dir)%> @$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%dirname(source_file)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%dirname(source_file)%>" <%endif%> - $(COMPILE.cc) <%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(ends_with(source_file, \.c))%>$(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%> <%endfor%> <%if(resource_files)%> diff --git a/templates/makedll.mpt b/templates/makedll.mpt index f051ad7e..f79093fd 100644 --- a/templates/makedll.mpt +++ b/templates/makedll.mpt @@ -35,6 +35,7 @@ versupport = 1 supports_include = 1 visibility = depgen_flags = +cc = cc // *********************************************************************** // Configuration Section @@ -55,6 +56,7 @@ Release { // *********************************************************************** java { + cc = javac cxx = javac ld = : obj_ext = .class @@ -66,6 +68,7 @@ java { } gcj { + cc = gcj cxx = gcj pic = -fPIC shflags = -shared @@ -95,6 +98,7 @@ cxx_vms { } dmc { + cc = dmc cxx = dmc dmclink = 1 ar = lib @@ -104,6 +108,7 @@ dmc { } gcc { + cc = gcc cxx = g++ pic = -fPIC shflags = -shared @@ -114,6 +119,7 @@ gcc { } arm_elf_gcc { + cc = arm-elf-gcc cxx = arm-elf-g++ ar = arm-elf-ar arflags = rcs @@ -162,6 +168,7 @@ aCC { } xlC_r { + cc = xlc_r cxx = xlC_r arflags64 += -X64 -rv compilerflags64 = -q64 @@ -183,6 +190,7 @@ SGICC { } wrsppc { + cc = gcc$(CPUTYPE) cxx = g++$(CPUTYPE) cputype = ppc cpu = PPC604 @@ -193,6 +201,7 @@ wrsppc { } wrspentium { + cc = gcc$(CPUTYPE) cxx = g++$(CPUTYPE) cputype = pentium cpu = PENTIUM @@ -208,6 +217,7 @@ NCC { } ghsppc { + cc = cc$(CXXINT)$(CPUTYPE) cxx = cx$(CXXINT)$(CPUTYPE) ar = cx$(CXXINT)$(CPUTYPE) cputype = ppc |