[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8675: error: token "@" is not valid in preprocessor expressions
From: |
Paul Eggert |
Subject: |
bug#8675: error: token "@" is not valid in preprocessor expressions |
Date: |
Wed, 18 May 2011 12:55:13 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10 |
[Adding bug-gnulib to this thread. For bug-gnulib readers, the scenario is
in Emacs a "bzr update; make" failed with:
./unistd.h:1186:5: error: token "@" is not valid in preprocessor expressions
because unistd.h was built with the old Makefile.
Full thread at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8675#31>.
]
On 05/18/11 05:39, Andreas Schwab wrote:
> If that does not work, then proper dependencies are missing.
I don't see how adding a dependency would fix this problem. In this
case, lib/Makefile in turn depended on 'configure', 'configure.in',
'm4/longlong.m4', etc., etc., and one of these files got updated, so
lib/Makefile was regenerated; but as I understand it, the 'make' that was
(still) running was based on the out-of-date lib/Makefile, and it
generated the a bad lib/unistd.h.
Adding a dependency "unistd.h: Makefile" wouldn't fix this problem.
This sort of problem is not due to gnulib per se; it's inherent to any
project that uses makefiles. In general, if a patch modifies a
makefile, or anything the makefile depends on, then you must
regenerate everything from scratch with a fresh 'make' invocation.
That being said, I've run into Christoph's problem myself more than
once, and it's a hassle, and it'd be nice to address it somehow. How
about this idea? I expect it would have worked around this problem.
Currently lib/Makefile contains something like this:
unistd.h: <dependencies>
<big-hairy-command>
Suppose we change this rule to look like this:
unistd.h: Makefile <dependencies>
case ' $? ,$(USING_NEW_MAKEFILE)' in \
*' Makefile '*,) \
exec $(MAKE) $(AM_MAKEFLAGS) USING_NEW_MAKEFILE=yes $@;; \
esac; \
<big-hairy-command>
This would be a gnulib change, so I'll CC: this to bug-gnulib.
A similar pattern would apply to every module that generates
a .h file with a big hairy command that uses 'make' variables.
- bug#8675: lisp_string_width and strings wider than INT_MAX, (continued)
bug#8675: committed fix into trunk, Paul Eggert, 2011/05/17
- bug#8675: committed fix into trunk, Christoph Scholtes, 2011/05/17
- bug#8675: committed fix into trunk, Paul Eggert, 2011/05/17
- bug#8675: committed fix into trunk, Christoph Scholtes, 2011/05/17
- bug#8675: committed fix into trunk, Andreas Schwab, 2011/05/18
- bug#8675: error: token "@" is not valid in preprocessor expressions,
Paul Eggert <=
- bug#8675: error: token "@" is not valid in preprocessor expressions, Andreas Schwab, 2011/05/18
- bug#8675: error: token "@" is not valid in preprocessor expressions, Paul Eggert, 2011/05/18
- bug#8675: error: token "@" is not valid in preprocessor expressions, Bruno Haible, 2011/05/18
- bug#8675: error: token "@" is not valid in preprocessor expressions, Christoph Scholtes, 2011/05/18
- bug#8675: error: token "@" is not valid in preprocessor expressions, Paul Eggert, 2011/05/19
bug#8664: committed fix into trunk, Eli Zaretskii, 2011/05/18