bug-gnulib
[Top][All Lists]
Advanced

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

Re: sc_makefile_at_at_check and gettext LOCALEDIR


From: Simon Josefsson
Subject: Re: sc_makefile_at_at_check and gettext LOCALEDIR
Date: Sun, 24 Apr 2011 15:33:40 +0200
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/23.2 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> I'm seeing some syntax-check warnings like this:
>> 
>> lib/Makefile.am:623: DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
>> src/Makefile.am:716: DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
>> maint.mk: use $(...), not @...@
>> make: *** [sc_makefile_at_at_check] Error 1
>> 
>> However the gettext 0.18.1 manual still recommends using the lines used
>> above.  Should the gettext manual be updated, or are there valid
>> situations when @....@ is appropriate that maint.mk could detect?
>
> If the maintainer was to write
>
>   DEFS = -DLOCALEDIR=\"$(localedir)\" $(DEFS)
>
> it would be a circular definition, leading to this error with GNU make:
>
>   Makefile:1: *** Recursive variable `DEFS' references itself
> (eventually).  Stop.
>
> So the use of @...@ is not only appropriate here, it is even mandatory.

So possibly the maint.mk check should be relaxed to permit constructs
matching FOO = ... @FOO@ then?

> Note that for packages that use a hand-written Makefile.am (as opposed to a
> hand-written Makefile.in), the gettext documentation [1] suggests to augment
> AM_CPPFLAGS instead of DEFS. Both work, AM_CPPFLAGS is just more modern style.

Ah, I had missed this in some projects -- changing it to use AM_CPPFLAGS
instead also makes the warning go away and seems simple.

Then I think the current behaviour of maint.mk shoudld stay, unless
anyone else finds other corner cases -- this warning resulted a change
to use a more modern style in one of my projects.

/Simon



reply via email to

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