diff options
author | J.T. Conklin <johntconklin@users.noreply.github.com> | 2004-08-04 16:25:33 +0000 |
---|---|---|
committer | J.T. Conklin <johntconklin@users.noreply.github.com> | 2004-08-04 16:25:33 +0000 |
commit | 74885e861b2928d25b372a2839a9cc1fdccbe714 (patch) | |
tree | dd70053925fd9d2e1ac29694a563af2c1269d9bb | |
parent | 293bbe70514a193631cfb46246d8f5d4c64bf77a (diff) | |
download | MPC-74885e861b2928d25b372a2839a9cc1fdccbe714.tar.gz |
ChangeLogTag: Wed Aug 4 09:23:03 2004 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | modules/AutomakeWorkspaceCreator.pm | 52 | ||||
-rw-r--r-- | templates/automake.mpd | 20 |
3 files changed, 31 insertions, 51 deletions
@@ -1,3 +1,13 @@ +Wed Aug 4 09:23:03 2004 J.T. Conklin <jtc@acorntoolworks.com> + + * modules/AutomakeWorkspaceCreator: + * templates/automake.mpd: + Changed to set nobase_pkginstall_HEADERS instead of HEADER_FILES, + INLINE_FILES, and TEMPLATE_FILES in Makefile.<project>.am files. + Extending this will enable us to control installing headers on a + per library basis (all we need is some way to control the prefix + used for _HEADERS). + Mon Aug 2 09:29:31 2004 Steve Huston <shuston@riverace.com> * templates/automake.mpd: For non-installed libraries, generate diff --git a/modules/AutomakeWorkspaceCreator.pm b/modules/AutomakeWorkspaceCreator.pm index f43235f7..b4d233b8 100644 --- a/modules/AutomakeWorkspaceCreator.pm +++ b/modules/AutomakeWorkspaceCreator.pm @@ -170,14 +170,12 @@ sub write_comps { my($seen_noinst_headers) = 0; my($seen_built_sources) = 0; my($seen_cleanfiles) = 0; - my($seen_template_files) = 0; - my($seen_header_files) = 0; - my($seen_inline_files) = 0; + my($seen_nobase_pkginclude_headers) = 0; ## Take the local Makefile.<project>.am files and insert each one here, ## then delete it. if (@locals) { - foreach my $local (@locals) { + foreach my $local (reverse @locals) { my($pfh) = new FileHandle(); if (open($pfh,$local)) { print $fh "## $local $crlf"; @@ -231,20 +229,10 @@ sub write_comps { s/\+=/=/; $seen_cleanfiles = 1; } - } elsif (/^TEMPLATE_FILES\s*\+=\s*/) { - if (! $seen_template_files) { + } elsif (/^nobase_pkginclude_HEADERS\s*\+=\s*/) { + if (! $seen_nobase_pkginclude_headers) { s/\+=/=/; - $seen_template_files = 1; - } - } elsif (/^HEADER_FILES\s*\+=\s*/) { - if (! $seen_header_files) { - s/\+=/=/; - $seen_header_files = 1; - } - } elsif (/^INLINE_FILES\s*\+=\s*/) { - if (! $seen_inline_files) { - s/\+=/=/; - $seen_inline_files = 1; + $seen_nobase_pkginclude_headers= 1; } } @@ -272,24 +260,20 @@ sub write_comps { $crlf; } - ## Insert pkginclude_HEADERS if we saw TEMPLATE_FILES, HEADER_FILES, - ## or INLINE_FILES in the Makefile.<project>.am files. - if ($seen_template_files || $seen_inline_files || $seen_header_files) { - print $fh 'pkginclude_HEADERS ='; - print $fh ' $(TEMPLATE_FILES)' if ($seen_template_files); - print $fh ' $(INLINE_FILES)' if ($seen_inline_files); - print $fh ' $(HEADER_FILES)' if ($seen_header_files); - print $fh $crlf, - $crlf; - } - ## Finish up with the cleanup specs. - print $fh '## Clean up template repositories, etc.', $crlf, - 'clean-local:', $crlf, - "\t-rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core", - $crlf, - "\t-rm -f gcctemp.c gcctemp so_locations", $crlf, - "\t-rm -rf ptrepository SunWS_cache Templates.DB", $crlf; + if (@locals) { + ## There is no reason to emit this if there are no local targets. + ## An argument could be made that it shouldn't be emitted in any + ## case because it could be handled by CLEANFILES or a verbatim + ## clause. + + print $fh '## Clean up template repositories, etc.', $crlf, + 'clean-local:', $crlf, + "\t-rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core", + $crlf, + "\t-rm -f gcctemp.c gcctemp so_locations", $crlf, + "\t-rm -rf ptrepository SunWS_cache Templates.DB", $crlf; + } } diff --git a/templates/automake.mpd b/templates/automake.mpd index eed08961..2ac1b123 100644 --- a/templates/automake.mpd +++ b/templates/automake.mpd @@ -102,25 +102,11 @@ noinst_HEADERS += \ <%endfor%> <%endif%> <%else%> -<%if(template_files)%> -TEMPLATE_FILES += \ -<%foreach(template_files)%> - <%template_file%><%fornotlast(" \\")%> -<%endfor%> - -<%endif%> -<%if(header_files)%> -HEADER_FILES += \ -<%foreach(header_files)%> +<%if(header_files || inline_files || template_files)%> +nobase_pkginclude_HEADERS += \ +<%foreach(header_files inline_files template_files)%> <%header_file%><%fornotlast(" \\")%> <%endfor%> <%endif%> -<%if(inline_files)%> -INLINE_FILES += \ -<%foreach(inline_files)%> - <%inline_file%><%fornotlast(" \\")%> -<%endfor%> - -<%endif%> <%endif%> |