[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Automake branch, master, updated. Release-1-10-79-g66027a9
From: |
Akim Demaille |
Subject: |
[SCM] GNU Automake branch, master, updated. Release-1-10-79-g66027a9 |
Date: |
Sun, 25 Nov 2007 11:02:32 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=66027a9bdc9bd3419f5a87e7d50c3ff0f2e920b8
The branch, master has been updated
via 66027a9bdc9bd3419f5a87e7d50c3ff0f2e920b8 (commit)
via 7a3cfc9bd5da9d38c34b10eac420eeed33637ca1 (commit)
from 0db12da3f3ad987547f5156ba7355b593233cb39 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 66027a9bdc9bd3419f5a87e7d50c3ff0f2e920b8
Author: Akim Demaille <address@hidden>
Date: Sun Nov 25 12:02:22 2007 +0100
Fix uses of am__strip_dir.
* lib/am/libs.am, lib/am/ltlib.am: Catch up with the change of
definition of am__strip_dir.
Signed-off-by: Akim Demaille <address@hidden>
commit 7a3cfc9bd5da9d38c34b10eac420eeed33637ca1
Author: Akim Demaille <address@hidden>
Date: Sun Nov 25 11:15:23 2007 +0100
Define and use register_action.
* lib/Automake/Rule.pm: Fix a few typos in the doc.
(&rule): Use || to simplify the code.
(®ister_action): New.
Export it.
* automake.in (&handle_factored_dependencies, &file_contents_internal):
Use it.
Signed-off-by: Akim Demaille <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 16 ++++++++++++++++
automake.in | 15 ++++-----------
lib/Automake/Rule.pm | 41 +++++++++++++++++++++++++++++++----------
lib/am/libs.am | 11 +++++------
lib/am/ltlib.am | 2 +-
5 files changed, 57 insertions(+), 28 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2070bbb..314b2d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2007-11-25 Akim Demaille <address@hidden>
+ Fix uses of am__strip_dir.
+ * lib/am/libs.am, lib/am/ltlib.am: Catch up with the change of
+ definition of am__strip_dir.
+
+2007-11-25 Akim Demaille <address@hidden>
+
+ Define and use register_action.
+ * lib/Automake/Rule.pm: Fix a few typos in the doc.
+ (&rule): Use || to simplify the code.
+ (®ister_action): New.
+ Export it.
+ * automake.in (&handle_factored_dependencies, &file_contents_internal):
+ Use it.
+
+2007-11-25 Akim Demaille <address@hidden>
+
* bootstrap: Fix typos on redirections.
2007-11-24 Akim Demaille <address@hidden>
diff --git a/automake.in b/automake.in
index efad097..b5f5f12 100755
--- a/automake.in
+++ b/automake.in
@@ -4530,10 +4530,10 @@ sub handle_factored_dependencies
{
if (user_phony_rule "$_-hook")
{
- $actions{"$_-am"} .=
- ("address@hidden(NORMAL_INSTALL)\n"
- . "\t" . '$(MAKE) $(AM_MAKEFLAGS) ' . "$_-hook\n");
depend ('.MAKE', "$_-am");
+ register_action("$_-am",
+ ("address@hidden(NORMAL_INSTALL)\n"
+ . "\t\$(MAKE) \$(AM_MAKEFLAGS) $_-hook"));
}
}
@@ -6686,14 +6686,7 @@ sub file_contents_internal ($$$%)
if (defined $dependencies{$_} && $cond != FALSE)
{
&depend ($_, @deps);
- if ($actions{$_})
- {
- $actions{$_} .= "\n$actions" if $actions;
- }
- else
- {
- $actions{$_} = $actions;
- }
+ register_action ($_, $actions);
}
else
{
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index 21890f0..cebf4fd 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -31,7 +31,8 @@ use vars '@ISA', '@EXPORT', '@EXPORT_OK';
@ISA = qw/Automake::Item Exporter/;
@EXPORT = qw (reset register_suffix_rule suffix_rules_count
suffixes rules $suffix_rules $KNOWN_EXTENSIONS_PATTERN
- depend %dependencies %actions accept_extensions
+ depend %dependencies %actions register_action
+ accept_extensions
reject_rule msg_rule msg_cond_rule err_rule err_cond_rule
rule rrule ruledef rruledef);
@@ -62,9 +63,9 @@ and one to look up the conditional definition:
{
my $def = $rule->def ($cond);
if ($def)
- {
- return $def->location;
- }
+ {
+ return $def->location;
+ }
...
}
...
@@ -76,7 +77,7 @@ being looked up exist, the above can be simplified to
but is better written
- return rrule ($name)->rrule ($cond)->location;
+ return rrule ($name)->rdef ($cond)->location;
or even
@@ -109,7 +110,7 @@ use vars '$_suffix_rules_default';
Holds the dependencies of targets which dependencies are factored.
Typically, C<.PHONY> will appear in plenty of F<*.am> files, but must
be output once. Arguably all pure dependencies could be subject to
-this factorization, but it is not unpleasant to have paragraphs in
+this factoring, but it is not unpleasant to have paragraphs in
Makefile: keeping related stuff altogether.
=cut
@@ -272,7 +273,7 @@ sub accept_extensions (@)
=item C<rules>
-Returns the list of all L<Automake::Rule> instances. (I.e., all
+Return the list of all L<Automake::Rule> instances. (I.e., all
rules defined so far.)
=cut
@@ -284,6 +285,27 @@ sub rules ()
}
+=item C<register_action($target, $action)>
+
+Append the C<$action> to C<$actions{$target}> taking care of special
+cases.
+
+=cut
+
+sub register_action ($$)
+{
+ my ($target, $action) = @_;
+ if ($actions{$target})
+ {
+ $actions{$target} .= "\n$action" if $action;
+ }
+ else
+ {
+ $actions{$target} = $action;
+ }
+}
+
+
=item C<Automake::Rule::reset>
The I<forget all> function. Clears all know rules and reset some
@@ -478,8 +500,7 @@ sub rule ($)
# Strip $(EXEEXT) from $name, so we can diagnose
# a clash if `ctags$(EXEEXT):' is redefined after `ctags:'.
$name =~ s,\$\(EXEEXT\)$,,;
- return $_rule_dict{$name} if exists $_rule_dict{$name};
- return 0;
+ return $_rule_dict{$name} || 0;
}
=item C<ruledef ($rulename, $cond)>
@@ -640,7 +661,7 @@ sub define ($$$$$)
# msg ('syntax', $where,
# "redefinition of `$target'$condmsg...", partial => 1);
# msg_cond_rule ('syntax', $cond, $target,
- # "... `$target' previously defined here");
+ # "... `$target' previously defined here");
}
# Return so we don't redefine the rule in our tables,
# don't check for ambiguous condition, etc. The rule
diff --git a/lib/am/libs.am b/lib/am/libs.am
index d2f6389..4c6a7c0 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -39,8 +39,7 @@ install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
## Compute basename of source file. Unless this is a nobase_ target, we
## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
-?BASE? f=$(am__strip_dir) \
-?!BASE? f=$$p; \
+ %BASE?$(am__strip_dir):f=$$p;% \
echo " $(%DIR%LIBRARIES_INSTALL) '$$p'
'$(DESTDIR)$(%NDIR%dir)/$$f'"; \
$(%DIR%LIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
else :; fi; \
@@ -53,7 +52,7 @@ install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
@$(POST_INSTALL)
@list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
-?BASE? $(am__strip_dir) \
+ %BASE?$(am__strip_dir):f=$$p;% \
## Must ranlib after installing because mod time changes.
echo " $(RANLIB) '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
$(RANLIB) "$(DESTDIR)$(%NDIR%dir)/$$f"; \
@@ -71,9 +70,9 @@ if %?INSTALL%
uninstall-%DIR%LIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
-?BASE? $(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
- rm -f "$(DESTDIR)$(%NDIR%dir)/$$p"; \
+ %BASE?$(am__strip_dir):f=$$p;% \
+ echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
+ rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
done
endif %?INSTALL%
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index d4781df..aa16184 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -39,7 +39,7 @@ install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
## Compute basename of source file. Unless this is a nobase_ target, we
## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
- %BASE?$(am__strip_dir):f=$$p%; \
+ %BASE?$(am__strip_dir):f=$$p;% \
## Note that we explicitly set the libtool mode. This avoids any lossage
## if the program doesn't have a name that libtool expects.
## Use INSTALL and not INSTALL_DATA because libtool knows the right
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Automake branch, master, updated. Release-1-10-79-g66027a9,
Akim Demaille <=