summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2004-07-28 14:16:39 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2004-07-28 14:16:39 +0000
commit4c3321e420a7526bd9c3a4a8949b9f092b695c25 (patch)
treee88b0c71d3f728c71c55c906ed7905a4666c80d3
parentb6de6b085a84c706031aa4ecd098ee9a78c7dbfb (diff)
downloadMPC-4c3321e420a7526bd9c3a4a8949b9f092b695c25.tar.gz
ChangeLogTag: Wed Jul 28 09:15:02 2004 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog133
-rwxr-xr-xclone_build_tree.pl11
-rw-r--r--modules/AutomakeWorkspaceCreator.pm195
-rw-r--r--templates/automakedll.mpt4
-rw-r--r--templates/automakeexe.mpt4
5 files changed, 194 insertions, 153 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c599480..a8fc3992 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,82 +1,99 @@
+Wed Jul 28 09:15:02 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * clone_build_tree.pl:
+
+ Remove backup files before trying to create them and added
+ information to some error messages.
+
+ * modules/AutomakeWorkspaceCreator.pm:
+
+ Cleaned up the code a bit.
+
+ * templates/automakedll.mpt:
+ * templates/automakeexe.mpt:
+
+ The automakedll.mpt defines linkflags for use within
+ automake.mpd. automakeexe.mpt just includes automakedll.mpt.
+
Fri Jul 23 14:32:54 2004 J.T. Conklin <jtc@acorntoolworks.com>
- * modules/AutomakeWorkspaceCreator.pm:
- Parse generated Makefile.<project>.am files as their contents
- are being inserted into the workspace Makefile.am, converting
- the first instance where a macro is appended to (+=) into a
- simple assignment (=). This results in a Makefile.am that is
- closer to what would be written by hand, and automake will often
- generate smaller Makefile.in files since it won't be tricked
- into pulling in boilerplate for macros that were defined and not
- used.
+ * modules/AutomakeWorkspaceCreator.pm:
+ Parse generated Makefile.<project>.am files as their contents
+ are being inserted into the workspace Makefile.am, converting
+ the first instance where a macro is appended to (+=) into a
+ simple assignment (=). This results in a Makefile.am that is
+ closer to what would be written by hand, and automake will often
+ generate smaller Makefile.in files since it won't be tricked
+ into pulling in boilerplate for macros that were defined and not
+ used.
Thu Jul 22 17:39:41 2004 Steve Huston <shuston@riverace.com>
- * modules/AutomakeWorkspaceCreator.pm: When writing
- configure.ac.Makefiles, insert entries for project-less directories
- between project-containing directories. Allows the bootstrap
- procedure to find and make the needed Makefiles to traverse the
- entire build tree.
+ * modules/AutomakeWorkspaceCreator.pm: When writing
+ configure.ac.Makefiles, insert entries for project-less directories
+ between project-containing directories. Allows the bootstrap
+ procedure to find and make the needed Makefiles to traverse the
+ entire build tree.
- * templates/automake.mpd: Changed _LIBADD to _LDADD for programs.
+ * templates/automake.mpd: Changed _LIBADD to _LDADD for programs.
Thu Jul 22 12:52:39 2004 Steve Huston <shuston@riverace.com>
- * modules/AutomakeWorkspaceCreator.pm: If there's no local project
- info for the current Makefile.am, don't put the initial bin_PROGRAMS,
- lib_LTLIBRARIES, etc. If there are local projects, add "." to the
- SUBDIRS.
+ * modules/AutomakeWorkspaceCreator.pm: If there's no local project
+ info for the current Makefile.am, don't put the initial bin_PROGRAMS,
+ lib_LTLIBRARIES, etc. If there are local projects, add "." to the
+ SUBDIRS.
- * templates/automake.mpd: Add _LIBADD settings to pick up needed
- libraries.
+ * templates/automake.mpd: Add _LIBADD settings to pick up needed
+ libraries.
Wed Jul 21 19:34:46 2004 J.T. Conklin <jtc@acorntoolworks.com>
- * modules/AutomakeProjectCreator.pm:
- Override expand_variables_from_template_values.
+ * modules/AutomakeProjectCreator.pm:
+ Override expand_variables_from_template_values.
- * modules/AutomakeWorkspaceCreator.pm: Don't emit SUBDIRS
- definition if there aren't any subdirectories.
+ * modules/AutomakeWorkspaceCreator.pm: Don't emit SUBDIRS
+ definition if there aren't any subdirectories.
- * templates/automake.mpd: Simplify so that _CPPFLAGS, etc.
- settings are not duplicated for programs and libraries,
- grouped and non-grouped source files, etc.
+ * templates/automake.mpd: Simplify so that _CPPFLAGS, etc.
+ settings are not duplicated for programs and libraries,
+ grouped and non-grouped source files, etc.
Wed Jul 21 18:02:31 2004 Steve Huston <shuston@riverace.com>
- * templates/automake.mpd: Added the _CPPFLAGS setting to the
- non-grouped library section.
+ * templates/automake.mpd: Added the _CPPFLAGS setting to the
+ non-grouped library section.
Wed Jul 21 17:04:39 2004 Steve Huston <shuston@riverace.com>
- * modules/AutomakeWorkspaceCreator.pm: In write_comps(), combine all
- of the current directory level's Makefile.<project>.am files into
- the directory's Makefile.am file and delete the individual files.
- Write only the Makefile.am file paths into the configure.ac.Makefiles
- list. This is because the previous loop-through-current-Makefile
- scheme sent make into an infinite loop, consuming all process
- slots very quickly. The generated Makefiles always like to start
- again at the top Makefile to check its updatedness, even if
- a specific Makefile.<project> file was specified to make. Moved the
- general cleanup text from automake.mpd to here.
-
- * templates/automake.mpd: For non-project-specific info (bin, lib,
- etc.) use += rather than = to allow multiple per-project files to
- be combined into one file later. Removed the general cleanup
- directives and put them in the workspace generator, above. J.T.
- Conklin also supplied changes for the following:
-
- - Append list of custom_type outfiles to BUILT_SOURCES
-
- - Append list of custom_type outfiles to CLEANFILES
-
- - Emit explicit rules for building custom type outfiles. Note that
- unlike some of the other makefile templates, I've used $< instead
- of <%custom_type->input_file%> so that the file will be found via
- vpath.
-
- - Removed global setting of INCLUDES. Include paths are now handled
- by per library/program _CPPFLAGS.
+ * modules/AutomakeWorkspaceCreator.pm: In write_comps(), combine all
+ of the current directory level's Makefile.<project>.am files into
+ the directory's Makefile.am file and delete the individual files.
+ Write only the Makefile.am file paths into the configure.ac.Makefiles
+ list. This is because the previous loop-through-current-Makefile
+ scheme sent make into an infinite loop, consuming all process
+ slots very quickly. The generated Makefiles always like to start
+ again at the top Makefile to check its updatedness, even if
+ a specific Makefile.<project> file was specified to make. Moved the
+ general cleanup text from automake.mpd to here.
+
+ * templates/automake.mpd: For non-project-specific info (bin, lib,
+ etc.) use += rather than = to allow multiple per-project files to
+ be combined into one file later. Removed the general cleanup
+ directives and put them in the workspace generator, above. J.T.
+ Conklin also supplied changes for the following:
+
+ - Append list of custom_type outfiles to BUILT_SOURCES
+
+ - Append list of custom_type outfiles to CLEANFILES
+
+ - Emit explicit rules for building custom type outfiles. Note that
+ unlike some of the other makefile templates, I've used $< instead
+ of <%custom_type->input_file%> so that the file will be found via
+ vpath.
+
+ - Removed global setting of INCLUDES. Include paths are now handled
+ by per library/program _CPPFLAGS.
Fri Jul 16 12:24:36 2004 Chad Elliott <elliott_c@ociweb.com>
diff --git a/clone_build_tree.pl b/clone_build_tree.pl
index abbc5f58..4515e85f 100755
--- a/clone_build_tree.pl
+++ b/clone_build_tree.pl
@@ -32,10 +32,11 @@ use File::Basename;
# Data Section
# ******************************************************************
-my($version) = '0.2';
my($exclude) = undef;
my($verbose) = 0;
my(@foundFiles) = ();
+my($version) = '$Id$';
+$version =~ s/.*\s+(\d+[\.\d]+)\s+.*/$1/;
# ******************************************************************
# Subroutine Section
@@ -129,6 +130,7 @@ sub backupAndMoveModified {
$status = 0;
## Move the real file to a backup
+ unlink("$realpath.bak");
if (rename($realpath, "$realpath.bak")) {
## Move the linked file to the real file name
if (move($linkpath, $realpath)) {
@@ -152,6 +154,7 @@ sub backupAndMoveModified {
if (!$status) {
## We were not able to properly deal with this file. We will
## attempt to preserve the modified file.
+ unlink("$linkpath.bak");
rename($linkpath, "$linkpath.bak");
}
}
@@ -207,7 +210,8 @@ sub symlinkFiles {
my($stat) = stat($fullpath);
if ($stat->nlink() > 1) {
print STDERR "ERROR: Attempting to mix softlinks ",
- "with a hardlink build.\n";
+ "with a hardlink build.\n",
+ "$fullpath has ", $stat->nlink(), " links.\n";
return 1;
}
}
@@ -286,7 +290,8 @@ sub hardlinkFiles {
## and softlinks.
if (-l $fullpath) {
print STDERR "ERROR: Attempting to mix hardlinks ",
- "with a softlink build.\n";
+ "with a softlink build.\n",
+ "$fullpath is a softlink.\n";
return 1;
}
backupAndMoveModified($file, $fullpath);
diff --git a/modules/AutomakeWorkspaceCreator.pm b/modules/AutomakeWorkspaceCreator.pm
index 5b489e3f..f43235f7 100644
--- a/modules/AutomakeWorkspaceCreator.pm
+++ b/modules/AutomakeWorkspaceCreator.pm
@@ -20,6 +20,12 @@ use vars qw(@ISA);
@ISA = qw(WorkspaceCreator);
# ************************************************************
+# Data Section
+# ************************************************************
+
+my($acfile) = 'configure.ac.Makefiles';
+
+# ************************************************************
# Subroutine Section
# ************************************************************
@@ -71,9 +77,9 @@ sub write_comps {
## of all the involved Makefiles.
my($mfh);
if ($toplevel) {
- unlink('configure.ac.Makefiles');
+ unlink($acfile);
$mfh = new FileHandle();
- open($mfh, '>configure.ac.Makefiles');
+ open($mfh, ">$acfile");
## The top-level is never listed as a dependency, so it needs to be
## added explicitly.
print $mfh "AC_CONFIG_FILES([ Makefile ])$crlf";
@@ -116,11 +122,12 @@ sub write_comps {
## Get a unique list of next-level directories for SUBDIRS.
my($dir) = $self->get_first_level_directory($dep);
if ($dir ne '.') {
- if (!defined $unique{$dir}) {
- $unique{$dir} = 1;
- unshift(@dirs, $dir);
- }
- } else {
+ if (!defined $unique{$dir}) {
+ $unique{$dir} = 1;
+ unshift(@dirs, $dir);
+ }
+ }
+ else {
## At each directory level, each project is written into a separate
## Makefile.<project>.am file. To bring these back into the build
## process, they'll be sucked back into the workspace Makefile.am file.
@@ -171,83 +178,86 @@ sub write_comps {
## then delete it.
if (@locals) {
foreach my $local (@locals) {
- my($pfh);
- $pfh = new FileHandle();
- open($pfh,$local) || print "Error opening $local" . $crlf;
- print $fh "## $local $crlf";
-
- while (<$pfh>) {
- # Don't emit comments
- next if (/^#/);
-
- if (/^bin_PROGRAMS\s*\+=\s*/) {
- if (! $seen_bin_programs) {
- s/\+=/=/;
- $seen_bin_programs = 1;
- }
- } elsif (/^noinst_PROGRAMS\s*\+=\s*/) {
- if (! $seen_noinst_programs) {
- s/\+=/=/;
- $seen_noinst_programs = 1;
- }
- } elsif (/^lib_LIBRARIES\s*\+=\s*/) {
- if (! $seen_lib_libraries ) {
- s/\+=/=/;
- $seen_lib_libraries = 1;
- }
- } elsif (/^noinst_LIBRARIES\s*\+=\s*/) {
- if (! $seen_noinst_libraries ) {
- s/\+=/=/;
- $seen_noinst_libraries = 1;
- }
- } elsif (/^lib_LTLIBRARIES\s*\+=\s*/) {
- if (! $seen_lib_ltlibraries ) {
- s/\+=/=/;
- $seen_lib_ltlibraries = 1;
- }
- } elsif (/^noinst_LTLIBRARIES\s*\+=\s*/) {
- if (! $seen_noinst_ltlibraries ) {
- s/\+=/=/;
- $seen_noinst_ltlibraries = 1;
- }
- } elsif (/^noinst_HEADERS\s*\+=\s*/) {
- if (! $seen_noinst_headers) {
- s/\+=/=/;
- $seen_noinst_headers = 1;
- }
- } elsif (/^BUILT_SOURCES\s*\+=\s*/) {
- if (! $seen_built_sources) {
- s/\+=/=/;
- $seen_built_sources = 1;
- }
- } elsif (/^CLEANFILES\s*\+=\s*/) {
- if (! $seen_cleanfiles) {
- s/\+=/=/;
- $seen_cleanfiles = 1;
- }
- } elsif (/^TEMPLATE_FILES\s*\+=\s*/) {
- if (! $seen_template_files) {
- 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;
+ my($pfh) = new FileHandle();
+ if (open($pfh,$local)) {
+ print $fh "## $local $crlf";
+
+ while (<$pfh>) {
+ # Don't emit comments
+ next if (/^#/);
+
+ if (/^bin_PROGRAMS\s*\+=\s*/) {
+ if (! $seen_bin_programs) {
+ s/\+=/=/;
+ $seen_bin_programs = 1;
+ }
+ } elsif (/^noinst_PROGRAMS\s*\+=\s*/) {
+ if (! $seen_noinst_programs) {
+ s/\+=/=/;
+ $seen_noinst_programs = 1;
+ }
+ } elsif (/^lib_LIBRARIES\s*\+=\s*/) {
+ if (! $seen_lib_libraries ) {
+ s/\+=/=/;
+ $seen_lib_libraries = 1;
+ }
+ } elsif (/^noinst_LIBRARIES\s*\+=\s*/) {
+ if (! $seen_noinst_libraries ) {
+ s/\+=/=/;
+ $seen_noinst_libraries = 1;
+ }
+ } elsif (/^lib_LTLIBRARIES\s*\+=\s*/) {
+ if (! $seen_lib_ltlibraries ) {
+ s/\+=/=/;
+ $seen_lib_ltlibraries = 1;
+ }
+ } elsif (/^noinst_LTLIBRARIES\s*\+=\s*/) {
+ if (! $seen_noinst_ltlibraries ) {
+ s/\+=/=/;
+ $seen_noinst_ltlibraries = 1;
+ }
+ } elsif (/^noinst_HEADERS\s*\+=\s*/) {
+ if (! $seen_noinst_headers) {
+ s/\+=/=/;
+ $seen_noinst_headers = 1;
+ }
+ } elsif (/^BUILT_SOURCES\s*\+=\s*/) {
+ if (! $seen_built_sources) {
+ s/\+=/=/;
+ $seen_built_sources = 1;
+ }
+ } elsif (/^CLEANFILES\s*\+=\s*/) {
+ if (! $seen_cleanfiles) {
+ s/\+=/=/;
+ $seen_cleanfiles = 1;
+ }
+ } elsif (/^TEMPLATE_FILES\s*\+=\s*/) {
+ if (! $seen_template_files) {
+ 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;
+ }
}
+
+ print $fh $_;
}
- print $fh $_;
+ close($pfh);
+## unlink($local);
+ print $fh $crlf;
+ }
+ else {
+ $self->error("Unable to open $local for reading.");
}
-
- close($pfh);
-## unlink($local);
- print $fh $crlf;
}
}
@@ -255,11 +265,11 @@ sub write_comps {
## autoconf/automake flags down the tree when running autoconf.
## *** This may be too closely tied to how we have things set up in ACE,
## even though it's recommended practice. ***
- if ($self->getstartdir() eq $self->getcwd()) {
- print $fh $crlf;
- print $fh 'ACLOCAL = @ACLOCAL@' . $crlf;
- print $fh 'ACLOCAL_AMFLAGS = -I m4' . $crlf;
- print $fh $crlf;
+ if ($toplevel) {
+ print $fh $crlf,
+ 'ACLOCAL = @ACLOCAL@', $crlf,
+ 'ACLOCAL_AMFLAGS = -I m4', $crlf,
+ $crlf;
}
## Insert pkginclude_HEADERS if we saw TEMPLATE_FILES, HEADER_FILES,
@@ -269,16 +279,17 @@ sub write_comps {
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;
- print $fh $crlf;
+ print $fh $crlf,
+ $crlf;
}
## Finish up with the cleanup specs.
- print $fh '## Clean up template repositories, etc.' . $crlf;
- print $fh 'clean-local:' . $crlf;
- print $fh "\t-rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core" . $crlf;
- print $fh "\t-rm -f gcctemp.c gcctemp so_locations" . $crlf;
- print $fh "\t-rm -rf ptrepository SunWS_cache Templates.DB" . $crlf;
+ 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/automakedll.mpt b/templates/automakedll.mpt
new file mode 100644
index 00000000..3e0a0788
--- /dev/null
+++ b/templates/automakedll.mpt
@@ -0,0 +1,4 @@
+// -*- MPC -*-
+// $Id$
+
+linkflags =
diff --git a/templates/automakeexe.mpt b/templates/automakeexe.mpt
new file mode 100644
index 00000000..0978dac9
--- /dev/null
+++ b/templates/automakeexe.mpt
@@ -0,0 +1,4 @@
+// -*- MPC -*-
+// $Id$
+
+conditional_include "automakedll"