From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#8675: error: token "@" is not valid in preprocessor expressions Date: Wed, 18 May 2011 12:55:13 -0700 Organization: UCLA Computer Science Department Message-ID: <4DD42421.6090906__3761.14118048481$1305748577$gmane$org@cs.ucla.edu> References: <4DD0B118.1040205@cs.ucla.edu> <4DD321E5.2020202@cs.ucla.edu> <4DD32E3C.7080408@gmail.com> <4DD33392.7020907@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1305748577 9895 80.91.229.12 (18 May 2011 19:56:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 May 2011 19:56:17 +0000 (UTC) Cc: Christoph Scholtes , 8675@debbugs.gnu.org, Bug-gnulib To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 18 21:56:10 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QMmqm-0003dr-Ex for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 May 2011 21:56:08 +0200 Original-Received: from localhost ([::1]:54647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMmql-0007rP-Ur for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 May 2011 15:56:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMmqi-0007rK-Hh for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 15:56:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMmqh-0001rV-BE for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 15:56:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMmqh-0001rQ-4T for bug-gnu-emacs@gnu.org; Wed, 18 May 2011 15:56:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QMmqg-0002QC-B0; Wed, 18 May 2011 15:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 May 2011 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8675 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8675-submit@debbugs.gnu.org id=B8675.13057485239257 (code B ref 8675); Wed, 18 May 2011 19:56:02 +0000 Original-Received: (at 8675) by debbugs.gnu.org; 18 May 2011 19:55:23 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMmq3-0002PF-41 for submit@debbugs.gnu.org; Wed, 18 May 2011 15:55:23 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QMmpz-0002P2-Pr for 8675@debbugs.gnu.org; Wed, 18 May 2011 15:55:21 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 4995C39E8128; Wed, 18 May 2011 12:55:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tztQOk4lt+JI; Wed, 18 May 2011 12:55:13 -0700 (PDT) Original-Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6352939E80F9; Wed, 18 May 2011 12:55:13 -0700 (PDT) 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 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 18 May 2011 15:56:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46565 Archived-At: [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 . ] 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: Suppose we change this rule to look like this: unistd.h: Makefile case ' $? ,$(USING_NEW_MAKEFILE)' in \ *' Makefile '*,) \ exec $(MAKE) $(AM_MAKEFLAGS) USING_NEW_MAKEFILE=yes $@;; \ esac; \ 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.