bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: maint.mk syntax check problems


From: Jim Meyering
Subject: Re: maint.mk syntax check problems
Date: Wed, 14 Sep 2011 15:35:28 +0200

Martin von Gagern wrote:
...
>>>> 5. sc_prohibit_always-defined_macros reports missing files:
>>>>
>>>> The sc_prohibit_always-defined_macros check will cause error messages
>>>> about missing files to be emitted if elements from the gl_other_headers_
>>>> list are not present (i.e. not imported). This can be confusing. I've
>>>> added a "test -e $$f" check to the def_sym_regex code:
>>>> https://github.com/gagern/gnulib/commit/74524a2c993a809bbc20dcc3
>>>> Feel free to merge this.

I nearly missed that patch.
Next time you propose a patch, please include the actual
patch in the message, not just a link to it.

>> gl_other_headers_ is defined like this:
>>
>>   gl_other_headers_ ?= \
>>     intprops.h       \
>>     openat.h \
>>     stat-macros.h
>>
>> The "?=" assignment means that you can override it via cfg.mk.
>> Does that work for you?
>
> Means I'd have to keep that list updated when gnulib changes its header
> organization, or when I change the list of modules I import, or
> whatever. As I'm patching maint.mk in any case, I feel better using the
> modification mentioned above. I guess others might feel the same. After
> all, those headers come from gnulib, so the list should be maintained
> with gnulib as well. And checking files that don't exist is never going
> to make any sense.

Thanks for the patch.
ACK this and I'll push it in your name:

>From def55969d8c3ee7a4fe2988a89a12d3987205e2c Mon Sep 17 00:00:00 2001
From: Martin von Gagern <address@hidden>
Date: Wed, 14 Sep 2011 15:33:16 +0200
Subject: [PATCH] maint.mk: avoid warnings from perl about missing files

* top/maint.mk (def_sym_regex): Ignore files listed in
$(gl_other_headers_) that do not exist, say because a project
does not use a corresponding module.
---
 ChangeLog    |    7 +++++++
 top/maint.mk |    3 ++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bab5ba2..968427e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-14  Martin von Gagern  <address@hidden>
+
+       maint.mk: avoid warnings from perl about missing files
+       * top/maint.mk (def_sym_regex): Ignore files listed in
+       $(gl_other_headers_) that do not exist, say because a project
+       does not use a corresponding module.
+
 2011-09-14  Jim Meyering  <address@hidden>

        maint.mk: sc_tight_scope: propagate failure from sub-make
diff --git a/top/maint.mk b/top/maint.mk
index bbb67ec..0137df1 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -762,7 +762,8 @@ define def_sym_regex
        gen_h=$(gl_generated_headers_);                                 \
        (cd $(gnulib_dir)/lib;                                          \
          for f in *.in.h $(gl_other_headers_); do                      \
-           perl -lne '$(gl_extract_significant_defines_)' $$f;         \
+           test -f $$f                                                 \
+             && perl -lne '$(gl_extract_significant_defines_)' $$f;    \
          done;                                                         \
        ) | sort -u                                                     \
          | sed 's/^/^ *# *(define|undef)  */;s/$$/\\>/'
--
1.7.7.rc0.362.g5a14



reply via email to

[Prev in Thread] Current Thread [Next in Thread]