diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2002-07-18 13:41:50 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2002-07-18 13:41:50 +0000 |
commit | ba9692d06c0b01e5810b3d8a4c09bfa54bdb6e9f (patch) | |
tree | 0ff6b5570da2e09beb983dea3b7b6e4a30caff7b | |
parent | 8ca2a0ac3fa476d6e5eff7b2914f0c3c7fbe7959 (diff) | |
download | ATCD-ba9692d06c0b01e5810b3d8a4c09bfa54bdb6e9f.tar.gz |
ChangeLogTag: Thu Jul 18 08:39:08 2002 Chad Elliott <elliott_c@ociweb.com>
20 files changed, 295 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog index c94aa0c672d..a7a98b61a87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,47 @@ +Thu Jul 18 08:39:08 2002 Chad Elliott <elliott_c@ociweb.com> + + * bin/MakeProjectCreator/README: + + Update the documentation to reflect the additions to the grammar. + + * bin/MakeProjectCreator/config/avstreamsexe.mpb: + * bin/MakeProjectCreator/config/corba_messaging.mpb: + * bin/MakeProjectCreator/config/minimum_corba.mpb: + * bin/MakeProjectCreator/config/namingexe.mpb: + * bin/MakeProjectCreator/config/notify.mpb: + * bin/MakeProjectCreator/config/orbsvcsexe.mpb: + * bin/MakeProjectCreator/config/orbsvcslib.mpb: + * bin/MakeProjectCreator/config/rt_client.mpb: + * bin/MakeProjectCreator/config/rt_server.mpb: + * bin/MakeProjectCreator/config/rteventexe.mpb: + + Add the GNU specific info for generating conditional target + Makefiles. + + * bin/MakeProjectCreator/modules/GNUProjectCreator.pm: + + Added code to generate the conditional sections of the GNU + Makefiles. + + * bin/MakeProjectCreator/modules/ProjectCreator.pm: + * bin/MakeProjectCreator/modules/TemplateParser.pm: + + Fix some minor problems with generated project files. + + * bin/MakeProjectCreator/templates/gnu.mpd: + + Added template info for conditional targets. + + * bin/MakeProjectCreator/templates/vc6dsp.mpd: + * bin/MakeProjectCreator/templates/vc7.mpd: + + Removed the tie class idl targets. + + * bin/ace_components: + + Added a new append option that will be used by the generated GNU + Makefiles. + Thu Jul 18 06:17:19 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> * Doug turns 40 today. Fortunately, that's only 32 in Octal ;-). diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index c94aa0c672d..a7a98b61a87 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,47 @@ +Thu Jul 18 08:39:08 2002 Chad Elliott <elliott_c@ociweb.com> + + * bin/MakeProjectCreator/README: + + Update the documentation to reflect the additions to the grammar. + + * bin/MakeProjectCreator/config/avstreamsexe.mpb: + * bin/MakeProjectCreator/config/corba_messaging.mpb: + * bin/MakeProjectCreator/config/minimum_corba.mpb: + * bin/MakeProjectCreator/config/namingexe.mpb: + * bin/MakeProjectCreator/config/notify.mpb: + * bin/MakeProjectCreator/config/orbsvcsexe.mpb: + * bin/MakeProjectCreator/config/orbsvcslib.mpb: + * bin/MakeProjectCreator/config/rt_client.mpb: + * bin/MakeProjectCreator/config/rt_server.mpb: + * bin/MakeProjectCreator/config/rteventexe.mpb: + + Add the GNU specific info for generating conditional target + Makefiles. + + * bin/MakeProjectCreator/modules/GNUProjectCreator.pm: + + Added code to generate the conditional sections of the GNU + Makefiles. + + * bin/MakeProjectCreator/modules/ProjectCreator.pm: + * bin/MakeProjectCreator/modules/TemplateParser.pm: + + Fix some minor problems with generated project files. + + * bin/MakeProjectCreator/templates/gnu.mpd: + + Added template info for conditional targets. + + * bin/MakeProjectCreator/templates/vc6dsp.mpd: + * bin/MakeProjectCreator/templates/vc7.mpd: + + Removed the tie class idl targets. + + * bin/ace_components: + + Added a new append option that will be used by the generated GNU + Makefiles. + Thu Jul 18 06:17:19 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> * Doug turns 40 today. Fortunately, that's only 32 in Octal ;-). diff --git a/bin/MakeProjectCreator/README b/bin/MakeProjectCreator/README index b55fd82bf20..a5a04976958 100644 --- a/bin/MakeProjectCreator/README +++ b/bin/MakeProjectCreator/README @@ -54,6 +54,14 @@ depends Specifies 1 or more projects upon which this project depends dllflags (Windows Only) Specifies preprocessor flags needed for dll's libflags (Windows Only) Specifies preprocessor flags needed for lib's +The Following are GNU only: +requires Specifies which tao macros should be set to build the target +avoids Specifies which tao macros should not be set to build the target +compname Specifies the argument to pass to the ace_components script +comps Specifies which components are required to build the target +tagname Specifies the make macro to check before building the target +tagchecks Specifies the values for tagname to check + Special Keywords Available to Templates --------------------------------------- diff --git a/bin/MakeProjectCreator/config/avstreamsexe.mpb b/bin/MakeProjectCreator/config/avstreamsexe.mpb index 645cfd57f0d..c0b0bab831c 100644 --- a/bin/MakeProjectCreator/config/avstreamsexe.mpb +++ b/bin/MakeProjectCreator/config/avstreamsexe.mpb @@ -1,5 +1,6 @@ -project { +project: orbsvcsexe { depends += AV CosProperty CosNaming Svc_Utils IORTable PortableServer libs += TAO_AV TAO_CosProperty TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer + comps += AV } diff --git a/bin/MakeProjectCreator/config/corba_messaging.mpb b/bin/MakeProjectCreator/config/corba_messaging.mpb new file mode 100644 index 00000000000..32b88438211 --- /dev/null +++ b/bin/MakeProjectCreator/config/corba_messaging.mpb @@ -0,0 +1,3 @@ +project { + requires += corba_messaging +} diff --git a/bin/MakeProjectCreator/config/minimum_corba.mpb b/bin/MakeProjectCreator/config/minimum_corba.mpb new file mode 100644 index 00000000000..b877810439b --- /dev/null +++ b/bin/MakeProjectCreator/config/minimum_corba.mpb @@ -0,0 +1,3 @@ +project { + avoids += minimum_corba +} diff --git a/bin/MakeProjectCreator/config/namingexe.mpb b/bin/MakeProjectCreator/config/namingexe.mpb index 9ed6a25ee5b..fa483d3da10 100644 --- a/bin/MakeProjectCreator/config/namingexe.mpb +++ b/bin/MakeProjectCreator/config/namingexe.mpb @@ -1,4 +1,5 @@ project : server, orbsvcsexe { depends += CosNaming Svc_Utils IORTable libs += TAO_CosNaming TAO_Svc_Utils TAO_IORTable + comps += Naming } diff --git a/bin/MakeProjectCreator/config/notify.mpb b/bin/MakeProjectCreator/config/notify.mpb index ec7c0021297..5ffdbe8a278 100644 --- a/bin/MakeProjectCreator/config/notify.mpb +++ b/bin/MakeProjectCreator/config/notify.mpb @@ -1,4 +1,5 @@ project { depends += CosNotification ETCL CosNaming Svc_Utils IORTable DynamicAny PortableServer TAO libs += TAO_CosNotification TAO_ETCL TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_DynamicAny TAO_PortableServer TAO + comps += Notify Naming } diff --git a/bin/MakeProjectCreator/config/orbsvcsexe.mpb b/bin/MakeProjectCreator/config/orbsvcsexe.mpb index afd750ca5a1..505d10186b2 100644 --- a/bin/MakeProjectCreator/config/orbsvcsexe.mpb +++ b/bin/MakeProjectCreator/config/orbsvcsexe.mpb @@ -1,4 +1,5 @@ project : taoexe { includes += $(TAO_ROOT)/orbsvcs libpaths += $(TAO_ROOT)/orbsvcs/orbsvcs + compname = --orbsvcs } diff --git a/bin/MakeProjectCreator/config/orbsvcslib.mpb b/bin/MakeProjectCreator/config/orbsvcslib.mpb index 2db60b09c75..5f89746afa7 100644 --- a/bin/MakeProjectCreator/config/orbsvcslib.mpb +++ b/bin/MakeProjectCreator/config/orbsvcslib.mpb @@ -2,4 +2,6 @@ project : taolib_with_idl { includes += $(TAO_ROOT)/orbsvcs libpaths += $(TAO_ROOT)/orbsvcs/orbsvcs idlflags += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs + compname = --orbsvcs + tagname = TAO_ORBSVCS } diff --git a/bin/MakeProjectCreator/config/rt_client.mpb b/bin/MakeProjectCreator/config/rt_client.mpb index 08143c2ca37..c6d2ad45b4f 100644 --- a/bin/MakeProjectCreator/config/rt_client.mpb +++ b/bin/MakeProjectCreator/config/rt_client.mpb @@ -1,4 +1,5 @@ project : client { - depends += RTCORBA - libs += TAO_RTCORBA + depends += RTCORBA + libs += TAO_RTCORBA + requires += rt_corba } diff --git a/bin/MakeProjectCreator/config/rt_server.mpb b/bin/MakeProjectCreator/config/rt_server.mpb index 603b031b57d..050c3c07a8a 100644 --- a/bin/MakeProjectCreator/config/rt_server.mpb +++ b/bin/MakeProjectCreator/config/rt_server.mpb @@ -1,4 +1,5 @@ project : server { - depends += RTPortableServer RTCORBA - libs += TAO_RTCORBA TAO_RTPortableServer + depends += RTPortableServer RTCORBA + libs += TAO_RTCORBA TAO_RTPortableServer + requires += rt_corba } diff --git a/bin/MakeProjectCreator/config/rteventexe.mpb b/bin/MakeProjectCreator/config/rteventexe.mpb index c2fbb8dc552..d706ef188db 100644 --- a/bin/MakeProjectCreator/config/rteventexe.mpb +++ b/bin/MakeProjectCreator/config/rteventexe.mpb @@ -1,4 +1,5 @@ project: orbsvcsexe { depends += RTEvent Svc_Utils PortableServer libs += TAO_RTEvent TAO_Svc_Utils TAO_PortableServer + comps += RTEvent } diff --git a/bin/MakeProjectCreator/modules/GNUProjectCreator.pm b/bin/MakeProjectCreator/modules/GNUProjectCreator.pm index 63fdcac01c8..3add06a2aea 100644 --- a/bin/MakeProjectCreator/modules/GNUProjectCreator.pm +++ b/bin/MakeProjectCreator/modules/GNUProjectCreator.pm @@ -19,6 +19,15 @@ use vars qw(@ISA); @ISA = qw(ProjectCreator); # ************************************************************ +# Data Section +# ************************************************************ + +my(%compscript) = ('ACE_COMPONENTS' => ["--ace", "--set"], + 'TAO_COMPONENTS' => ["--tao", "--set"], + 'ORBSVCS_COMPONENTS' => ["--orbsvcs", "--append"], + ); + +# ************************************************************ # Subroutine Section # ************************************************************ @@ -56,12 +65,11 @@ sub fill_value { my($name) = shift; my($value) = undef; my($crlf) = $self->crlf(); + my($tag) = 'source_files'; + my($names) = $self->{$tag}; if ($name eq "gnu_source_files") { my(%vpath) = (); - my($tag) = 'source_files'; - my($names) = $self->{$tag}; - $value = ""; foreach my $name (keys %$names) { my($comps) = $$names{$name}; @@ -121,6 +129,38 @@ sub fill_value { } } } + elsif ($name eq "build") { + foreach my $name (keys %$names) { + if ($name ne "default") { + if (!defined $value) { + $value = "BUILD +="; + } + $value .= " $name"; + } + } + } + elsif ($name eq "comptarget") { + foreach my $name (keys %$names) { + if ($name ne "default") { + if (!defined $value) { + $value = ""; + } + $value .= "$crlf.PHONY: $name$crlf" . + "$name:$crlf" . + "\t\@sh \$(ACE_ROOT)/bin/ace_components $compscript{$name}->[0] $compscript{$name}->[1] '\$($name)'$crlf$crlf" . + "compclean:$crlf" . + "\t\@sh \$(ACE_ROOT)/bin/ace_components $compscript{$name}->[0] --remove"; + } + } + } + elsif ($name eq "compclean") { + foreach my $name (keys %$names) { + if ($name ne "default") { + $value = "compclean"; + last; + } + } + } return $value; } diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm index b12217aea06..22c09c69553 100644 --- a/bin/MakeProjectCreator/modules/ProjectCreator.pm +++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm @@ -52,6 +52,12 @@ my(%validNames) = ('exename' => 1, 'dllflags' => 1, 'libflags' => 1, 'version' => 1, + 'requires' => 1, + 'avoids' => 1, + 'compname' => 1, + 'comps' => 1, + 'tagname' => 1, + 'tagchecks' => 1, ); ## Deal with these components in a special way @@ -396,6 +402,7 @@ sub process_assignment_add { $nval = $value; } $self->process_assignment($name, $nval); + $self->process_lib_modification($name); } @@ -414,6 +421,33 @@ sub process_assignment_sub { } } $self->process_assignment($name, $nval); + $self->process_lib_modification($name); + } +} + + +sub process_lib_modification { + my($self) = shift; + my($name) = shift; + + ## If we are modifying the "libs" assignment with + ## either addition or subtraction, we are going to + ## perform a little fix on the value to avoid multiple + ## libraries and to try to insure the correct linking order + if ($name eq "libs") { + my($nval) = $self->get_assignment($name); + if (defined $nval) { + my($parts) = $self->create_array($nval); + my(%seen) = (); + my($value) = ""; + foreach my $part (reverse @$parts) { + if (!defined $seen{$part}) { + $value = "$part $value"; + $seen{$part} = 1; + } + } + $self->process_assignment($name, $value); + } } } diff --git a/bin/MakeProjectCreator/modules/TemplateParser.pm b/bin/MakeProjectCreator/modules/TemplateParser.pm index 8bdac504980..76c1e2df257 100644 --- a/bin/MakeProjectCreator/modules/TemplateParser.pm +++ b/bin/MakeProjectCreator/modules/TemplateParser.pm @@ -212,14 +212,14 @@ sub relative { if ($self->{'prjc'}->convert_slashes()) { $val =~ s/\//\\/g; } - $value =~ s/\$\([^)]+\)/$val/; + substr($value, $start) =~ s/\$\([^)]+\)/$val/; } } $start += length($whole); } } } - + return $value; } diff --git a/bin/MakeProjectCreator/templates/gnu.mpd b/bin/MakeProjectCreator/templates/gnu.mpd index c922e6f87c1..d4abe58c1de 100644 --- a/bin/MakeProjectCreator/templates/gnu.mpd +++ b/bin/MakeProjectCreator/templates/gnu.mpd @@ -5,13 +5,13 @@ MAKEFILE = <%project_file%> DEPENDENCY_FILE = .depend.<%project_file%> <%if(exename)%> -BIN = <%exename%> +BIN_UNCHECKED = <%exename%> <%endif%> <%if(staticname)%> -LIB = lib<%staticname%>.a +LIB_UNCHECKED = lib<%staticname%>.a <%endif%> <%if(sharedname)%> -SHLIB = lib<%sharedname%>.$(SOEXT) +SHLIB_UNCHECKED = lib<%sharedname%>.$(SOEXT) <%endif%> <%if(tao)%> @@ -26,6 +26,43 @@ IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext <%endif%> <%gnu_source_files%> +<%if(comps)%> + +<%if(compname)%> +CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components <%compname%>) +<%endif%> +<%foreach(comps)%> +ifeq (<%comp%>, $(findstring <%comp%>, $(CURRENT_COMPONENTS))) +<%endfor%> +<%if(exename)%> +BIN = $(BIN_UNCHECKED) +<%else%> +LIB = $(LIB_UNCHECKED) +SHLIB = $(SHLIB_UNCHECKED) +<%endif%> +<%foreach(comps)%> +endif +<%endfor%> +<%else%> + +<%if(tagname)%> +ifeq (,$(<%tagname%>)) +<%endif%> +LIB = $(LIB_UNCHECKED) +SHLIB = $(SHLIB_UNCHECKED) +<%if(tagname)%> +else +<%foreach(tagchecks)%> + ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>))) +<%endfor%> + LIB = $(LIB_UNCHECKED) + SHLIB = $(SHLIB_UNCHECKED) +<%foreach(tagchecks)%> + endif +<%endfor%> +endif +<%endif%> +<%endif%> #---------------------------------------------------------------------------- # Include macros and targets @@ -34,6 +71,21 @@ include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU <%if(tao)%> include $(TAO_ROOT)/rules.tao.GNU <%endif%> +<%if(!comps)%> + +<%foreach(requires)%> +ifeq ($(<%require%>),1) +<%endfor%> +<%foreach(avoids)%> +ifeq ($(<%avoid%>),0) +<%endfor%> +<%if(exename)%> +BIN = $(BIN_UNCHECKED) +<%endif%> +<%foreach(avoids requires)%> +endif +<%endfor%> +<%endif%> <%if(exename)%> OBJS = $(addsuffix .o, $(notdir $(FILES))) @@ -42,6 +94,23 @@ SRC = $(addsuffix .cpp,$(FILES)) <%if(sharedname)%> LSRC = $(addsuffix .cpp,$(FILES)) <%endif%> +<%if(!comps)%> +<%if(tagname)%> +ifeq (,$(<%tagname%>)) +<%endif%> +<%build%> +<%if(tagname)%> +else +<%foreach(tagchecks)%> + ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>))) +<%endfor%> + <%build%> +<%foreach(tagchecks)%> + endif +<%endfor%> +endif +<%endif%> +<%endif%> ACELIB =<%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%> include $(ACE_ROOT)/include/makeinclude/macros.GNU @@ -99,6 +168,7 @@ TAO_IDLFLAGS += <%idlflags%> #---------------------------------------------------------------------------- # Local targets #---------------------------------------------------------------------------- +<%comptarget%> <%if(idl_files)%> all: idl_stubs @@ -112,7 +182,7 @@ $(BIN): $(addprefix $(VDIR), $(OBJS)) <%endif%> <%if(idl_files)%> -realclean: clean +realclean: clean <%compclean%> -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) <%endif%> diff --git a/bin/MakeProjectCreator/templates/vc6dsp.mpd b/bin/MakeProjectCreator/templates/vc6dsp.mpd index 3e999f9f61f..dac0dafa695 100644 --- a/bin/MakeProjectCreator/templates/vc6dsp.mpd +++ b/bin/MakeProjectCreator/templates/vc6dsp.mpd @@ -197,14 +197,6 @@ BuildCmds= \ "$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) # End Custom Build <%endfor%> diff --git a/bin/MakeProjectCreator/templates/vc7.mpd b/bin/MakeProjectCreator/templates/vc7.mpd index 4302f33983e..1ed72102772 100644 --- a/bin/MakeProjectCreator/templates/vc7.mpd +++ b/bin/MakeProjectCreator/templates/vc7.mpd @@ -152,7 +152,7 @@ Name="VCCustomBuildTool" Description="Invoking TAO_IDL Compiler on <%idl_file%>" CommandLine="<%tao_idl_exe("$(ACE_ROOT)\\bin\\tao_idl")%> <%idlflags("-Sc")%> <%idl_file%>" - Outputs="<%noextension(idl_file)%>C.h;<%noextension(idl_file)%>C.i;<%noextension(idl_file)%>C.cpp;<%noextension(idl_file)%>S.h;<%noextension(idl_file)%>S.i;<%noextension(idl_file)%>S.cpp;<%noextension(idl_file)%>S_T.h;<%noextension(idl_file)%>S_T.i;<%noextension(idl_file)%>S_T.cpp"/> + Outputs="<%noextension(idl_file)%>C.h;<%noextension(idl_file)%>C.i;<%noextension(idl_file)%>C.cpp;<%noextension(idl_file)%>S.h;<%noextension(idl_file)%>S.i;<%noextension(idl_file)%>S.cpp"/> </FileConfiguration> <%endfor%> </File> diff --git a/bin/ace_components b/bin/ace_components index 86f49381ce5..887d29168a1 100755 --- a/bin/ace_components +++ b/bin/ace_components @@ -43,6 +43,7 @@ else fi set_components=0 +append_components=0 if [ $# -ge 1 ]; then if [ $1 = '--set' ]; then set_components=1 @@ -54,6 +55,16 @@ if [ $# -ge 1 ]; then echo $usage exit -1 fi + elif [ $1 = '--append' ]; then + append_components=1 + shift + if [ $# -eq 1 ]; then + components=$1 + shift + else + echo $usage + exit -1 + fi elif [ $1 = '--remove' ]; then rm -f $components_file else @@ -75,6 +86,20 @@ if [ $set_components -eq 1 ]; then else echo "$components" > $components_file fi +elif [ $append_components -eq 1 ]; then + #### + #### Update the components file, if it has changed since last set. + #### + if [ -f $components_file ]; then + if cat $components_file | grep "$components" > /dev/null; then + : + else + (cat $components_file; echo "$components") | tr ' ' '\012' | sort -u > $components_file.$$ + mv -f $components_file.$$ $components_file + fi + else + echo "$components" > $components_file + fi else #### #### Access the contents of the components file, if it exists. |