From 9df34af6cde6a8c9450fa70641984e5f1cb82ef9 Mon Sep 17 00:00:00 2001 From: elliott_c Date: Fri, 31 Oct 2003 13:42:25 +0000 Subject: ChangeLogTag: Fri Oct 31 07:38:40 2003 Chad Elliott --- ChangeLog | 41 ++++++++++++++++++++++----- bin/MakeProjectCreator/templates/automake.mpd | 24 ++++++++-------- bin/MakeProjectCreator/templates/bor.mpd | 6 ++-- bin/MakeProjectCreator/templates/em3vcp.mpd | 2 +- bin/MakeProjectCreator/templates/ghs.mpd | 4 +-- bin/MakeProjectCreator/templates/gnu.mpd | 31 +++++++++++++------- bin/MakeProjectCreator/templates/nmake.mpd | 4 +-- bin/MakeProjectCreator/templates/va4icc.mpd | 8 +++--- bin/MakeProjectCreator/templates/vc6dsp.mpd | 2 +- bin/MakeProjectCreator/templates/vc7.mpd | 9 +++++- bin/MakeProjectCreator/templates/vc7dll.mpt | 12 +++++--- 11 files changed, 94 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index dabeb49fb6b..7c24d4de29d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,43 @@ +Fri Oct 31 07:38:40 2003 Chad Elliott + + * bin/MakeProjectCreator/templates/gnu.mpd: + + Allow a user to set the sharedname to empty to force only static + builds. Also, fixed the output directory target such that it will + be executed before the library is generated. + + * bin/MakeProjectCreator/templates/automake.mpd: + * bin/MakeProjectCreator/templates/bor.mpd: + * bin/MakeProjectCreator/templates/em3vcp.mpd: + * bin/MakeProjectCreator/templates/ghs.mpd: + * bin/MakeProjectCreator/templates/nmake.mpd: + * bin/MakeProjectCreator/templates/va4icc.mpd: + * bin/MakeProjectCreator/templates/vc6dsp.mpd: + + Allow these templates to work properly if the sharedname is set to + empty. + + * bin/MakeProjectCreator/templates/vc7.mpd: + * bin/MakeProjectCreator/templates/vc7dll.mpt: + + Partially fixed a bug with static libraries. The wrong + configuration type and library tool was being used. A correct + implementation of the vc7 type would involve splitting the static + build targets from the dynamic into separate projects. + Thu Oct 30 16:14:06 2003 Balachandran Natarajan - * ace/Thread_Manager.cpp (spawn_i): + * ace/Thread_Manager.cpp (spawn_i): - Fixed ACE_Thread_Manager problem on VxWorks where thread id - could be corrupted by taking address of a temporary - variable. Thank to Dennis Noll, and Brian Mendel for tracking - this down. + Fixed ACE_Thread_Manager problem on VxWorks where thread id + could be corrupted by taking address of a temporary + variable. Thank to Dennis Noll, and Brian Mendel for tracking + this down. Thu Oct 30 11:57:36 2003 Balachandran Natarajan - * bin/tao_orb_tests.lst: Added a couple of Portable_Interceptor - tests to the daily builds. + * bin/tao_orb_tests.lst: Added a couple of Portable_Interceptor + tests to the daily builds. Thu Oct 30 09:33:15 2003 Chad Elliott diff --git a/bin/MakeProjectCreator/templates/automake.mpd b/bin/MakeProjectCreator/templates/automake.mpd index 78c4c3f6807..55a02d4ce9a 100644 --- a/bin/MakeProjectCreator/templates/automake.mpd +++ b/bin/MakeProjectCreator/templates/automake.mpd @@ -41,7 +41,7 @@ noinst_HEADERS = \ <%else%> <%if(grouped_source_files)%> <%foreach(grouped_source_files)%> -lib<%sharedname%>_<%uc(grouped_source_file)%>_la_SOURCES = \ +lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_<%uc(grouped_source_file)%>_la_SOURCES = \ <%foreach(grouped_source_file->files)%> <%grouped_source_file->file%><%fornotlast(" \\")%> <%endfor%> @@ -49,39 +49,39 @@ lib<%sharedname%>_<%uc(grouped_source_file)%>_la_SOURCES = \ <%endfor%> <%foreach(grouped_source_files)%> if BUILD_<%uc(grouped_source_file)%>_FILES -LIB<%sharedname%>_<%uc(grouped_source_file)%> = lib<%sharedname%>_<%grouped_source_file%>.la +LIB<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_<%uc(grouped_source_file)%> = lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_<%grouped_source_file%>.la else -LIB<%sharedname%>_<%uc(grouped_source_file)%> = +LIB<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_<%uc(grouped_source_file)%> = endif <%endfor%> lib_LTLIBRARIES = \ - $(LIB<%sharedname%>) \ + $(LIB<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>) \ <%foreach(grouped_source_files)%> - $(LIB<%sharedname%>_<%uc(grouped_source_file)%>)<%fornotlast(" \\")%> + $(LIB<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_<%uc(grouped_source_file)%>)<%fornotlast(" \\")%> <%endfor%> -lib<%sharedname%>_la_SOURCES = \ +lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_SOURCES = \ <%foreach(grouped_source_files)%> - $(lib<%sharedname%>_<%uc(grouped_source_file)%>_la_SOURCES)<%fornotlast(" \\")%> + $(lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_<%uc(grouped_source_file)%>_la_SOURCES)<%fornotlast(" \\")%> <%endfor%> <%foreach(grouped_source_files)%> -lib<%sharedname%>_<%uc(grouped_source_file)%>_la_SOURCES = \ +lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_<%uc(grouped_source_file)%>_la_SOURCES = \ <%foreach(grouped_source_file->files)%> <%grouped_source_file->file%><%fornotlast(" \\")%> <%endfor%> <%endfor%> -lib<%sharedname%>_la_LDFLAGS = $(X_LIBS) \ +lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_LDFLAGS = $(X_LIBS) \ -version-info <%if(tao)%>@TAO_CURRENT@:@TAO_REVISION@:@TAO_AGE@<%else%>@ACE_CURRENT@:@ACE_REVISION@:@ACE_AGE@<%endif%> -lib<%sharedname%>_la_LIBADD = $(X_PRE_LIBS) $(<%sharedname%>_XLIBS) $(X_EXTRA_LIBS) +lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_LIBADD = $(X_PRE_LIBS) $(<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_XLIBS) $(X_EXTRA_LIBS) <%else%> -lib_LTLIBRARIES = lib<%sharedname%>.la +lib_LTLIBRARIES = lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.la -lib<%sharedname%>_la_SOURCES = \ +lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_SOURCES = \ <%foreach(source_files)%> <%source_file%><%fornotlast(" \\")%> <%endfor%> diff --git a/bin/MakeProjectCreator/templates/bor.mpd b/bin/MakeProjectCreator/templates/bor.mpd index e71f52afef8..b987b20e576 100644 --- a/bin/MakeProjectCreator/templates/bor.mpd +++ b/bin/MakeProjectCreator/templates/bor.mpd @@ -1,10 +1,10 @@ -# Makefile for building the <%if(exename)%><%exename%> exe<%endif%><%if(sharedname)%><%sharedname%> library<%endif%> with Borland C++ Builder +# Makefile for building the <%if(exename)%><%exename%> exe<%endif%><%if(sharedname)%><%sharedname%> library<%else%><%if(staticname)%><%staticname%> library<%endif%><%endif%> with Borland C++ Builder <%if(exename)%> NAME = <%exename%> <%else%> -<%if(sharedname)%> -NAME = <%sharedname%> +<%if(sharedname || staticname)%> +NAME = <%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%> <%endif%> <%endif%> diff --git a/bin/MakeProjectCreator/templates/em3vcp.mpd b/bin/MakeProjectCreator/templates/em3vcp.mpd index 90aa54fd1e8..511a0b4adbe 100644 --- a/bin/MakeProjectCreator/templates/em3vcp.mpd +++ b/bin/MakeProjectCreator/templates/em3vcp.mpd @@ -66,7 +66,7 @@ CPP=<%cpp("cl.exe")%> # SUBTRACT CPP <%compile_flags_removed%> <%endif%> BSC32=bscmake.exe -# ADD BSC32 /nologo <%if(sharedname)%>/o"<%libout%>\<%sharedname%>.bsc"<%endif%> +# ADD BSC32 /nologo <%if(sharedname || staticname)%>/o"<%libout%>\<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.bsc"<%endif%> <%if(type_is_binary)%> LINK32=link.exe # ADD LINK32 <%systemlibs("winsock.lib commctrl.lib coredll.lib iphlpapi.lib")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>\<%machine%>" <%endfor%>/nologo /base:"<%base("0x00100000")%>" <%stack%><%if(type_is_dynamic)%> /entry:"_DllMainCRTStartup"<%endif%> /nodefaultlib:"$(CENoDefaultLib)" /version:<%version("1.0")%> /subsystem:$(CESubsystem) /align:"<%align("4096")%>"<%if(pdb)%><%if(sharedname)%> /pdb:"<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%machine%>\<%sharedname%><%lib_modifier%>.pdb"<%else%><%if(exename)%> /pdb:"<%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%machine%>\<%exename%>.pdb"<%endif%><%endif%><%endif%> <%if(type_is_dynamic)%> /dll<%endif%> <%if(use_debug_libraries)%>/debug<%endif%> /machine:<%machine%> /out:"<%if(sharedname)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%machine%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%machine%>\<%exename%>.exe<%endif%>" diff --git a/bin/MakeProjectCreator/templates/ghs.mpd b/bin/MakeProjectCreator/templates/ghs.mpd index fbfb6a0a870..6d6314a7473 100644 --- a/bin/MakeProjectCreator/templates/ghs.mpd +++ b/bin/MakeProjectCreator/templates/ghs.mpd @@ -3,10 +3,10 @@ default: <%if(exename)%> program <%endif%> -<%if(sharedname)%> +<%if(sharedname || staticname)%> library :cx_pch_option=automatic - :outputname=<%libout%>\<%sharedname%>.lib + :outputname=<%libout%>\<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.lib :object_dir=obj :cx_pch_dir=pch <%endif%> diff --git a/bin/MakeProjectCreator/templates/gnu.mpd b/bin/MakeProjectCreator/templates/gnu.mpd index 6f389310f2b..d9ef3fc53ff 100644 --- a/bin/MakeProjectCreator/templates/gnu.mpd +++ b/bin/MakeProjectCreator/templates/gnu.mpd @@ -10,16 +10,19 @@ # #---------------------------------------------------------------------------- <%marker(top)%> -MAKEFILE = <%project_file%> -DEPENDENCY_FILE = .depend.<%project_file%> +MAKEFILE = <%project_file%> +DEPENDENCY_FILE = .depend.<%project_file%> <%if(exename)%> -BIN_UNCHECKED = <%exename%> +BIN_UNCHECKED = <%exename%> <%endif%> <%if(staticname)%> -LIB = lib<%staticname%>.a +LIB = lib<%staticname%>.a +<%if(!sharedname)%> +static_libs_only = 1 +<%endif%> <%endif%> <%if(sharedname)%> -SHLIB = lib<%sharedname%>.$(SOEXT) +SHLIB = lib<%sharedname%>.$(SOEXT) <%endif%> <%if(tao)%> @@ -103,8 +106,17 @@ $(TEMPINCDIR): @-test -d $(TEMPINCDIR) || mkdir -p $(TEMPINCDIR) $(ACE_NUL_STDERR) endif -<%if(!exename)%> +<%if(exename)%> +OUTPUT_DIRECTORY = <%if(install)%><%install%><%else%>.<%endif%> +<%else%> +OUTPUT_DIRECTORY = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%> +<%endif%> +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@mkdir -p "$(OUTPUT_DIRECTORY)" + +<%if(!exename)%> <%if(compname)%> CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components <%compname%>) <%endif%> @@ -254,7 +266,7 @@ ifneq (,$(RC)) FILES += $(RESOURCES) endif -<%if(sharedname)%> +<%if(sharedname || staticname)%> LSRC = $(addsuffix .cpp, $(FILES)) <%endif%> <%if(!comps)%> @@ -356,7 +368,7 @@ endif <%endif%> <%endif%> -<%if(sharedname)%> +<%if(sharedname || staticname)%> include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU <%endif%> include $(ACE_ROOT)/include/makeinclude/rules.local.GNU @@ -451,9 +463,6 @@ all: $(GENERATED_DIRTY) endif <%endif%> -<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>: - -@mkdir -p "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>" - <%comptarget%> <%if(idl_files)%> diff --git a/bin/MakeProjectCreator/templates/nmake.mpd b/bin/MakeProjectCreator/templates/nmake.mpd index df338ff44af..32ed2184d32 100644 --- a/bin/MakeProjectCreator/templates/nmake.mpd +++ b/bin/MakeProjectCreator/templates/nmake.mpd @@ -147,9 +147,7 @@ RSC=rc.exe RSC_PROJ=/l 0x409 /fo"$(INTDIR)\<%basenoextension(resource_file)%>.res"<%foreach(defines cpu_defines macros)%> /d <%define%><%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%> <%endfor%> BSC32=bscmake.exe -<%if(sharedname)%> -BSC32_FLAGS=/nologo <%if(type_is_dynamic)%>/o"$(OUTDIR)\<%sharedname%>.bsc"<%endif%> -<%endif%> +BSC32_FLAGS=/nologo <%if(sharedname || staticname)%>/o"$(OUTDIR)\<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.bsc"<%endif%> BSC32_SBRS= \ <%if(type_is_binary)%> diff --git a/bin/MakeProjectCreator/templates/va4icc.mpd b/bin/MakeProjectCreator/templates/va4icc.mpd index 591c91d47aa..60c8560752e 100644 --- a/bin/MakeProjectCreator/templates/va4icc.mpd +++ b/bin/MakeProjectCreator/templates/va4icc.mpd @@ -49,7 +49,7 @@ option <%foreach(includes)%> incl(searchPath, '<%include%>'), <%endfor%> -<%if(sharedname)%> +<%if(sharedname || staticname)%> link(exportAll), <%endif%> link(linkwithsharedlib), @@ -60,11 +60,11 @@ option link(debug) { if $__TOS_WIN__ { - target type ( <%if(type_is_dynamic)%>shr<%endif%><%if(type_is_static)%>lib<%endif%><%if(type_is_binary)%>exe<%endif%> ) '<%if(type_is_dynamic)%>shr.o<%endif%><%if(type_is_static)%>lib<%sharedname%>.a<%endif%><%if(type_is_binary)%><%exename%><%endif%>' + target type ( <%if(type_is_dynamic)%>shr<%endif%><%if(type_is_static)%>lib<%endif%><%if(type_is_binary)%>exe<%endif%> ) '<%if(type_is_dynamic)%>shr.o<%endif%><%if(type_is_static)%>lib<%staticname%>.a<%endif%><%if(type_is_binary)%><%exename%><%endif%>' { option macros(global) { -<%if(sharedname)%> +<%if(sharedname || staticname)%> source type(hpp) 'wchar.h' source type(hpp) 'wcstr.h' <%endif%> @@ -103,7 +103,7 @@ option } } if $__TOS_AIX__ { - target type ( <%if(type_is_dynamic)%>shr<%endif%><%if(type_is_static)%>lib<%endif%><%if(type_is_binary)%>exe<%endif%> ) '<%if(type_is_dynamic)%>shr.o<%endif%><%if(type_is_static)%>lib<%sharedname%>.a<%endif%><%if(type_is_binary)%><%exename%><%endif%>' + target type ( <%if(type_is_dynamic)%>shr<%endif%><%if(type_is_static)%>lib<%endif%><%if(type_is_binary)%>exe<%endif%> ) '<%if(type_is_dynamic)%>shr.o<%endif%><%if(type_is_static)%>lib<%staticname%>.a<%endif%><%if(type_is_binary)%><%exename%><%endif%>' { run after sources("shr.o") targets ("lib<%sharedname%>.a") "ar -r -u lib<%sharedname%>.a shr.o", "rm -rf shr.o" run cleanup "rm -rf lib<%sharedname%>.a shr.o" diff --git a/bin/MakeProjectCreator/templates/vc6dsp.mpd b/bin/MakeProjectCreator/templates/vc6dsp.mpd index 5757f21d8ee..85b216617c9 100644 --- a/bin/MakeProjectCreator/templates/vc6dsp.mpd +++ b/bin/MakeProjectCreator/templates/vc6dsp.mpd @@ -58,7 +58,7 @@ LINK32=link.exe -lib <%endif%> # ADD RSC /l 0x409<%foreach(defines macros)%> /d <%define%><%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%> BSC32=bscmake.exe -# ADD BSC32 /nologo <%if(sharedname)%>/o"<%libout%>\<%sharedname%>.bsc"<%endif%> +# ADD BSC32 /nologo <%if(sharedname || staticname)%>/o"<%libout%>\<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.bsc"<%endif%> <%if(type_is_binary)%> LINK32=link.exe # ADD LINK32 <%systemlibs("advapi32.lib user32.lib")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo /version:<%version("1.0")%> /subsystem:<%subsystem("windows")%><%if(pdb)%><%if(sharedname)%> /pdb:"<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.pdb"<%else%><%if(exename)%> /pdb:"<%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%exename%>.pdb"<%endif%><%endif%><%endif%><%if(type_is_dynamic)%> /dll<%endif%> <%debug_switch("/debug")%> /machine:<%machine("I386")%> /out:"<%if(sharedname)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%exename%>.exe<%endif%>" diff --git a/bin/MakeProjectCreator/templates/vc7.mpd b/bin/MakeProjectCreator/templates/vc7.mpd index dc5fbdaab4e..436c5e38329 100644 --- a/bin/MakeProjectCreator/templates/vc7.mpd +++ b/bin/MakeProjectCreator/templates/vc7.mpd @@ -57,12 +57,18 @@ + Name="VCLibrarianTool" +<%if(staticname)%> + OutputFile="$(OutDir)/<%staticname%><%lib_modifier%>.lib" +<%endif%> +<%else%> Name="VCLinkerTool" <%if(type_is_binary)%> AdditionalDependencies="<%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib<%fornotlast(" ")%><%endfor%>" <%endif%> <%if(exename || sharedname || staticname)%> - OutputFile="$(OutDir)/<%if(type_is_dynamic)%><%sharedname%><%lib_modifier%>.dll<%else%><%if(type_is_static)%><%staticname%><%lib_modifier%>.lib<%else%><%exename%>.exe<%endif%><%endif%>" + OutputFile="$(OutDir)/<%if(type_is_dynamic)%><%sharedname%><%lib_modifier%>.dll<%else%><%exename%>.exe<%endif%>" <%endif%> Version="<%version("1.0")%>" LinkIncremental="<%LinkIncremental("1")%>" @@ -85,6 +91,7 @@ <%endif%> <%if(type_is_dynamic)%> ImportLibrary="$(OutDir)/<%sharedname%><%lib_modifier%>.lib" +<%endif%> <%endif%> />