diff options
author | jonesc <jonesc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-11-07 18:48:04 +0000 |
---|---|---|
committer | jonesc <jonesc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-11-07 18:48:04 +0000 |
commit | cf603177b94fb6addb3ae7d6d3e6f670eab5aa03 (patch) | |
tree | 34ff650854215e5fcbf5e4782ddedb448dcf1bb1 | |
parent | 5064449df94a0ca70917b9ba3a13d5f45008c5c3 (diff) | |
download | ATCD-cf603177b94fb6addb3ae7d6d3e6f670eab5aa03.tar.gz |
Mon Nov 7 16:41:08 UTC 2011 Chip Jones <jonesc@ociweb.com>
* bin/DependencyGenerator/GNUIDLDependencyWriter.pm:
* bin/DependencyGenerator/GNUIDLObjectGenerator.pm:
Added these files to support writing IDL dependencies.
* bin/MakeProjectCreator/templates/gnu.mpd:
Modifications to support IDL dependency generation.
* include/makeinclude/rules.common.GNU:
* include/makeinclude/rules.local.GNU:
* include/makeinclude/wrapper_macros.GNU:
Modifications to support IDL dependency generation.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | bin/DependencyGenerator/GNUIDLDependencyWriter.pm | 40 | ||||
-rw-r--r-- | bin/DependencyGenerator/GNUIDLObjectGenerator.pm | 40 | ||||
-rw-r--r-- | bin/MakeProjectCreator/templates/gnu.mpd | 4 | ||||
-rw-r--r-- | include/makeinclude/rules.common.GNU | 2 | ||||
-rw-r--r-- | include/makeinclude/rules.local.GNU | 15 | ||||
-rw-r--r-- | include/makeinclude/wrapper_macros.GNU | 1 |
7 files changed, 116 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index ddc41b52d64..635be78fedb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Mon Nov 7 16:41:08 UTC 2011 Chip Jones <jonesc@ociweb.com> + + * bin/DependencyGenerator/GNUIDLDependencyWriter.pm: + * bin/DependencyGenerator/GNUIDLObjectGenerator.pm: + + Added these files to support writing IDL dependencies. + + * bin/MakeProjectCreator/templates/gnu.mpd: + + Modifications to support IDL dependency generation. + + * include/makeinclude/rules.common.GNU: + * include/makeinclude/rules.local.GNU: + * include/makeinclude/wrapper_macros.GNU: + + Modifications to support IDL dependency generation. + Sat Oct 22 02:06:37 UTC 2011 Abdullah Sowayan <sowayan@gmail.com> * include/makeinclude/platform_macosx_common.GNU: diff --git a/bin/DependencyGenerator/GNUIDLDependencyWriter.pm b/bin/DependencyGenerator/GNUIDLDependencyWriter.pm new file mode 100644 index 00000000000..acdf29547f8 --- /dev/null +++ b/bin/DependencyGenerator/GNUIDLDependencyWriter.pm @@ -0,0 +1,40 @@ +package GNUIDLDependencyWriter; + +# ************************************************************ +# Description : Generates GNU IDL Makefile dependencies. +# Author : Chip Jones +# Create Date : 11/01/2011 +# $Id$ +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use DependencyWriter; + +use vars qw(@ISA); +@ISA = qw(DependencyWriter); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub process { + my($objects) = $_[1]; + my($files) = $_[2]; + + ## Sort the dependencies to make them reproducible + if (scalar @$files > 0) { + return '$(sort ' . join(' ', @$objects) . "): \\\n " + . join(" \\\n ", sort @$files) . "\n"; + } + else { + return; + } + +} + + +1; diff --git a/bin/DependencyGenerator/GNUIDLObjectGenerator.pm b/bin/DependencyGenerator/GNUIDLObjectGenerator.pm new file mode 100644 index 00000000000..62376ca965a --- /dev/null +++ b/bin/DependencyGenerator/GNUIDLObjectGenerator.pm @@ -0,0 +1,40 @@ +package GNUIDLObjectGenerator; + +# ************************************************************ +# Description : Generates object files for GNU IDL Makefiles. +# Author : Chip Jones +# Create Date : 11/01/2011 +# $Id$ +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use ObjectGenerator; + +use vars qw(@ISA); +@ISA = qw(ObjectGenerator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub process { + my($noext) = $_[1]; + $noext =~ s/\.[^\.]+$//o; + $noext =~ s/.+\/// if $noext =~ /\.\.\//; + return ["\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_CLIENT_HDR_EXT)", + "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_CLIENT_INL_EXT)", + "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_CLIENT_SRC_EXT)", + "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_HDR_EXT)", + "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_INL_EXT)", + "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_SRC_EXT)", + "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_THDR_EXT)", + "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_TINL_EXT)", + "\$(IDL_GEN_FILES_DIR)\/$noext\$(IDL_SERVER_TSRC_EXT)" + ]; +} + +1; diff --git a/bin/MakeProjectCreator/templates/gnu.mpd b/bin/MakeProjectCreator/templates/gnu.mpd index 6a66e2993a8..da548788919 100644 --- a/bin/MakeProjectCreator/templates/gnu.mpd +++ b/bin/MakeProjectCreator/templates/gnu.mpd @@ -68,6 +68,10 @@ FILES = \ <%endfor%> <%endif%> +IDL_DEPS = \ +<%foreach(idl_files)%> + <%idl_file%><%fornotlast(" \\")%> +<%endfor%> <%vpath%> #---------------------------------------------------------------------------- # Include macros and targets diff --git a/include/makeinclude/rules.common.GNU b/include/makeinclude/rules.common.GNU index a52d629823c..0d6ae13b8ea 100644 --- a/include/makeinclude/rules.common.GNU +++ b/include/makeinclude/rules.common.GNU @@ -18,7 +18,7 @@ clean_idl_stubs: clean_idl_stubs.nested clean_idl_stubs.local clean: clean.nested clean.local realclean: realclean.nested realclean.local clobber: clobber.nested clobber.local -depend: depend.nested depend.local +depend: depend.nested depend.local depend_idl.local rcs_info: rcs_info.nested rcs_info.local idl_stubs: idl_stubs.nested idl_stubs.local svnignore: svnignore.nested svnignore.local diff --git a/include/makeinclude/rules.local.GNU b/include/makeinclude/rules.local.GNU index 18696073c5e..034722dfed7 100644 --- a/include/makeinclude/rules.local.GNU +++ b/include/makeinclude/rules.local.GNU @@ -447,7 +447,7 @@ ifeq ($(lacks_touch),1) else touch $(DEPENDENCY_FILE) endif -depend.local: $(DEPENDENCY_FILE) +depend_idl.local depend.local: $(DEPENDENCY_FILE) -include $(DEPENDENCY_FILE) endif @@ -467,12 +467,23 @@ ifeq ($(findstring depgen.pl, $(notdir $(DEPGEN))), depgen.pl) endif endif +depend_idl.local: $(MAKEFILE) idl_stubs.local + @$(RM) $(DEPENDENCY_FILE)_idl.old + @cp $(DEPENDENCY_FILE) $(DEPENDENCY_FILE)_idl.old + $(DEPGEN_ENV) $(DEPGEN) -A $(DEPEND_CMD_ARGS) -f $(DEPENDENCY_FILE) \ + $(TAO_IDLFLAGS) -a -t gnuidl -DMAKEDEPEND $(IDL_DEPS) + @if cmp -s $(DEPENDENCY_FILE) $(DEPENDENCY_FILE)_idl.old ;\ + then echo "GNUmakefile idl dependencies unchanged." ;\ + else \ + echo "GNUmakefile idl dependencies updated." ;\ + fi ;\ + $(RM) $(DEPENDENCY_FILE)_idl.old ; depend.local: $(MAKEFILE) idl_stubs.local @$(RM) $(DEPENDENCY_FILE).old @cp $(DEPENDENCY_FILE) $(DEPENDENCY_FILE).old $(DEPGEN_ENV) $(DEPGEN) -A $(DEPEND_CMD_ARGS) -f $(DEPENDENCY_FILE) \ - $(CPPFLAGS) -t gnu -DMAKEDEPEND $(CCFLAGS) $(LSRC) $(SRC) $(PSRC) + $(CPPFLAGS) -t gnu -DMAKEDEPEND $(CCFLAGS) $(LSRC) $(SRC) $(PSRC) @if cmp -s $(DEPENDENCY_FILE) $(DEPENDENCY_FILE).old ;\ then echo "GNUmakefile dependencies unchanged." ;\ else \ diff --git a/include/makeinclude/wrapper_macros.GNU b/include/makeinclude/wrapper_macros.GNU index 29f8650283e..e0e459fa8b9 100644 --- a/include/makeinclude/wrapper_macros.GNU +++ b/include/makeinclude/wrapper_macros.GNU @@ -294,6 +294,7 @@ IDL_SERVER_SRC_EXT ?= S.cpp IDL_SERVER_THDR_EXT ?= S_T.h IDL_SERVER_TINL_EXT ?= S_T.inl IDL_SERVER_TSRC_EXT ?= S_T.cpp +IDL_GEN_FILES_DIR ?= . ifeq (default,$(origin LEX)) LEX = flex |