[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] Re: modules/{sysexits,poll}: syntax nits
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] Re: modules/{sysexits,poll}: syntax nits |
Date: |
Mon, 3 Nov 2003 22:57:05 +0100 |
User-agent: |
KMail/1.5 |
Simon Josefsson wrote:
> I'm not sure I understand what difference using one over the other
> would have.
The change recommended by Alexandre is a no-op. As I understand it,
the benefit of using $(VAR) over @VAR@ in Makefiles is that in the
bigger picture of the GNU build system (= autoconf + automake + libtoolize
+ gettextize) things get simpler because the user doesn't need to know
whether a certain feature comes from automake or autoconf. In other words,
it reduces the learning curve of beginners.
However, not in all cases can @VAR@ be replaced with $(VAR). Here are three
cases:
1) Synthethized variable names, e.g.
Dependencies that depends on an autoconf result.
FOO_DEPS = $(address@hidden@)
FOO_DEPS_yes = some files
FOO_DEPS_no = some other files
foo$(EXEEXT) : $(FOO_DEPS)
2) Variables which expand to Makefile rules or dependencies. Example
from gettext:
@SET_RELOCATABLE@
This line expands to empty or to
RELOCATABLE_LDFLAGS = "$reloc_ldflags" "$(host)" "$(RELOCATABLE_LIBRARY_PATH)"
or to
INSTALL_PROGRAM_ENV = RELOC_LIBRARY_PATH_VAR="$shlibpath_var"
RELOC_LIBRARY_PATH_VALUE="$(RELOCATABLE_LIBRARY_PATH)" RELOC_PREFIX="$(prefix)"
RELOC_COMPILE_COMMAND="$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)"
RELOC_SRCDIR="$(RELOCATABLE_SRC_DIR)" RELOC_BUILDDIR="$(RELOCATABLE_BUILD_DIR)"
RELOC_CONFIG_H_DIR="$(RELOCATABLE_CONFIG_H_DIR)"
RELOC_INSTALL_PROG="$INSTALL_PROGRAM"
depending on the platform.
3) Variable definitions which override those from automake. Example:
MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
(This one prevents makeinfo from generating .info files with German words
near the beginning, in my environment.)
In none of these case can you replace @...@ with $(...).
Bruno