[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/8] automake: simplify '&saw_sources_p'
From: |
Stefano Lattarini |
Subject: |
[PATCH 5/8] automake: simplify '&saw_sources_p' |
Date: |
Fri, 8 Jun 2012 10:20:27 +0200 |
This is just a minor cleanup. No semantic change is intended.
* automake.in (saw_sources_p): Since its now-only caller calls it with
the '0' argument, remove the code paths that assumed the argument could
be '1', and assume no arguments.
(handle_languages): Drop the arguments '0' in the '&saw_sources_p'
invocation.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/automake.in b/automake.in
index d5091ec..347b952 100644
--- a/automake.in
+++ b/automake.in
@@ -1301,7 +1301,7 @@ sub handle_languages
{
# Include auto-dep code. Don't include it if DEP_FILES would
# be empty.
- if (&saw_sources_p (0) && keys %dep_files)
+ if (&saw_sources_p && keys %dep_files)
{
# Set location of depcomp.
&define_variable ('depcomp',
@@ -6089,25 +6089,10 @@ sub count_files_for_language
return $r
}
-# Called to ask whether source files have been seen . If HEADERS is 1,
-# headers can be included.
+# Called to ask whether source files (not headers) have been seen.
sub saw_sources_p
{
- my ($headers) = @_;
-
- # count all the sources
- my $count = 0;
- foreach my $val (values %extension_seen)
- {
- $count += $val;
- }
-
- if (!$headers)
- {
- $count -= count_files_for_language ('header');
- }
-
- return $count > 0;
+ return scalar keys %extension_seen;
}
--
1.7.9.5
- [PATCH 0/8] {master} Some simplifications in tags support, Stefano Lattarini, 2012/06/08
- [PATCH 3/8] tags: new var $(am__tagged_files) to list all files to run taggers on, Stefano Lattarini, 2012/06/08
- [PATCH 4/8] tags: look at $(am__tagged_files) to decide whether to activate, Stefano Lattarini, 2012/06/08
- [PATCH 1/8] tags (ID, cscope): also process config header (if any), Stefano Lattarini, 2012/06/08
- [PATCH 2/8] tags (cscope): also process $(TAGS_FILES), Stefano Lattarini, 2012/06/08
- [PATCH 8/8] cleanup: simplify subroutine '&saw_extension', Stefano Lattarini, 2012/06/08
- [PATCH 6/8] cleanup: remove unused '&count_files_for_language' subroutine, Stefano Lattarini, 2012/06/08
- [PATCH 5/8] automake: simplify '&saw_sources_p',
Stefano Lattarini <=
- [PATCH 7/8] cleanup: remove subroutine '&saw_sources_p', Stefano Lattarini, 2012/06/08
- Re: [PATCH 0/8] {master} Some simplifications in tags support, Stefano Lattarini, 2012/06/09