summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ.T. Conklin <johntconklin@users.noreply.github.com>2004-07-22 02:40:00 +0000
committerJ.T. Conklin <johntconklin@users.noreply.github.com>2004-07-22 02:40:00 +0000
commite3629970ed5bee9483129a53985d3c16ec4f7521 (patch)
tree0f69f746af01b92bf45bac75736d65e0d2a764e8
parent7876bda3b806e72539ac9826c95c3275854680ac (diff)
downloadMPC-e3629970ed5bee9483129a53985d3c16ec4f7521.tar.gz
ChangeLogTag: Wed Jul 21 19:34:46 2004 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r--ChangeLog16
-rw-r--r--modules/AutomakeProjectCreator.pm6
-rw-r--r--modules/AutomakeWorkspaceCreator.pm30
-rw-r--r--templates/automake.mpd92
4 files changed, 67 insertions, 77 deletions
diff --git a/ChangeLog b/ChangeLog
index a960fadc..17982649 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Wed Jul 21 19:34:46 2004 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * modules/AutomakeProjectCreator.pm:
+ Override expand_variables_from_template_values.
+
+ * 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.
+
Wed Jul 21 18:02:31 2004 Steve Huston <shuston@riverace.com>
* templates/automake.mpd: Added the _CPPFLAGS setting to the
@@ -909,3 +921,7 @@ Mon Apr 5 10:43:03 2004 Chad Elliott <elliott_c@ociweb.com>
* templates/vc7libexe.mpt:
Created a new repository for MPC.
+
+Local Variables:
+add-log-time-format: current-time-string
+End:
diff --git a/modules/AutomakeProjectCreator.pm b/modules/AutomakeProjectCreator.pm
index a97421c1..20cc04f2 100644
--- a/modules/AutomakeProjectCreator.pm
+++ b/modules/AutomakeProjectCreator.pm
@@ -28,6 +28,12 @@ sub dollar_special {
}
+sub expand_variables_from_template_values {
+ #my($self) = shift;
+ return 0;
+}
+
+
sub sort_files {
#my($self) = shift;
return 0;
diff --git a/modules/AutomakeWorkspaceCreator.pm b/modules/AutomakeWorkspaceCreator.pm
index 18eb629e..a422d585 100644
--- a/modules/AutomakeWorkspaceCreator.pm
+++ b/modules/AutomakeWorkspaceCreator.pm
@@ -107,16 +107,16 @@ sub write_comps {
## Get a unique list of next-level directories for SUBDIRS.
my($dir) = $self->get_first_level_directory($dep);
- if (!defined $unique{$dir}) {
- $unique{$dir} = 1;
- unshift(@dirs, $dir);
- }
-
- ## 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.
- ## Remember which ones to pull in at this level.
- if ($dir eq '.') {
+ if ($dir ne '.') {
+ 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.
+ ## Remember which ones to pull in at this level.
unshift(@locals, $dep);
}
}
@@ -125,11 +125,13 @@ sub write_comps {
}
## Print out the subdirectories
- print $fh 'SUBDIRS =';
- foreach my $dir (@dirs) {
- print $fh " \\$crlf $dir";
+ if (@dirs) {
+ print $fh 'SUBDIRS =';
+ foreach my $dir (@dirs) {
+ print $fh " \\$crlf $dir";
+ }
+ print $fh $crlf, $crlf;
}
- print $fh $crlf, $crlf;
## Take the local Makefile.<project>.am files and insert each one here,
## then delete it.
diff --git a/templates/automake.mpd b/templates/automake.mpd
index d5259635..41a53a59 100644
--- a/templates/automake.mpd
+++ b/templates/automake.mpd
@@ -28,39 +28,6 @@ CLEANFILES += \
<%endfor%>
<%endfor%>
<%endif%>
-
-<%if(exename)%>
-<%if(install)%>bin_PROGRAMS<%else%>noinst_PROGRAMS<%endif%> += <%exename%>
-
-<%normalize(exename)%>_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-<%if(includes)%><%foreach(includes)%> -I<%include%><%endfor%> \<%endif%>
-<%if(defines || common_defines || macros)%>
-<%foreach(defines common_defines macros)%> -D<%define%><%endfor%> \
-<%endif%>
-<%if(type_is_static || need_staticflags)%>
-<%if(staticflags)%>
-<%foreach(staticflags)%> -D<%staticflag%><%endfor%> \
-<%endif%>
-<%else%>
-<%if(dynamicflags)%>
-<%foreach(dynamicflags)%> -D<%dynamicflags%><%endfor%> \
-<%endif%>
-<%endif%>
- $(DUMMY_VALUE_NOT_ENDING_IN_BACKSLASH)
-
-
-<%normalize(exename)%>_SOURCES = \
-<%foreach(source_files)%>
- <%source_file%><%fornotlast(" \\")%>
-<%endfor%>
-
-<%if(header_files)%>
-noinst_HEADERS += \
-<%foreach(header_files)%>
- <%header_file%><%fornotlast(" \\")%>
-<%endfor%>
-<%endif%>
-<%else%>
<%if(grouped_source_files)%>
<%foreach(grouped_source_files)%>
<%grouped_source_file%> = \
@@ -69,13 +36,20 @@ noinst_HEADERS += \
<%endfor%>
<%endfor%>
-
+<%endif%>
+<%if(exename)%>
+<%if(install)%>bin<%else%>noinst<%endif%>_PROGRAMS += <%exename%>
+<%else%>
lib_LTLIBRARIES += lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.la
+<%endif%>
-lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-<%if(includes)%>
-<%foreach(includes)%> -I<%include%><%endfor%> \
+<%if(exename)%>
+<%normalize(exename)%>_CPPFLAGS = \
+<%else%>
+lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_CPPFLAGS = \
<%endif%>
+ -I$(top_builddir) -I$(top_srcdir) \
+<%if(includes)%><%foreach(includes)%> -I<%include%><%endfor%> \<%endif%>
<%if(defines || common_defines || macros)%>
<%foreach(defines common_defines macros)%> -D<%define%><%endfor%> \
<%endif%>
@@ -88,43 +62,35 @@ lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_CPPFLAGS =
<%foreach(dynamicflags)%> -D<%dynamicflags%><%endfor%> \
<%endif%>
<%endif%>
- $(DUMMY_VALUE_NOT_ENDING_IN_BACKSLASH)
+ $(DUMMY_VALUE_NOT_ENDING_IN_BACKSLASH)
+<%if(exename)%>
+<%normalize(exename)%>_SOURCES = \
+<%else%>
lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_SOURCES = \
+<%endif%>
+<%if(grouped_source_files)%>
<%foreach(grouped_source_files)%>
$(<%grouped_source_file%>)<%fornotlast(" \\")%>
<%endfor%>
-
-lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_LDFLAGS = $(X_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<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>.la
-
-lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-<%if(includes)%>
-<%foreach(includes)%> -I<%include%><%endfor%> \
-<%endif%>
-<%if(defines || common_defines || macros)%>
-<%foreach(defines common_defines macros)%> -D<%define%><%endfor%> \
-<%endif%>
-<%if(type_is_static || need_staticflags)%>
-<%if(staticflags)%>
-<%foreach(staticflags)%> -D<%staticflag%><%endfor%> \
-<%endif%>
<%else%>
-<%if(dynamicflags)%>
-<%foreach(dynamicflags)%> -D<%dynamicflags%><%endfor%> \
-<%endif%>
-<%endif%>
- $(DUMMY_VALUE_NOT_ENDING_IN_BACKSLASH)
-
-lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_SOURCES = \
<%foreach(source_files)%>
<%source_file%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
+<%if(exename)%>
+<%if(header_files)%>
+noinst_HEADERS += \
+<%foreach(header_files)%>
+ <%header_file%><%fornotlast(" \\")%>
+<%endfor%>
+<%endif%>
+<%else%>
+lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_LDFLAGS = $(X_LIBS)
+
+lib<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_la_LIBADD = $(X_PRE_LIBS) $(<%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%>_XLIBS) $(X_EXTRA_LIBS)
+
<%if(template_files)%>
TEMPLATE_FILES += \
<%foreach(template_files)%>