From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: using autoconf for lib-src/Makefile.in Date: Fri, 01 Aug 2008 21:43:04 -0700 Message-ID: <200808020443.m724h4vT017588@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1217652338 4953 80.91.229.12 (2 Aug 2008 04:45:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2008 04:45:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 02 06:46:28 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KP90d-0004bS-1V for ged-emacs-devel@m.gmane.org; Sat, 02 Aug 2008 06:46:27 +0200 Original-Received: from localhost ([127.0.0.1]:51606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KP8zi-0005zM-Bk for ged-emacs-devel@m.gmane.org; Sat, 02 Aug 2008 00:45:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KP8zd-0005yG-Ip for emacs-devel@gnu.org; Sat, 02 Aug 2008 00:45:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KP8zc-0005x6-LX for emacs-devel@gnu.org; Sat, 02 Aug 2008 00:45:24 -0400 Original-Received: from [199.232.76.173] (port=42332 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KP8zc-0005x1-De for emacs-devel@gnu.org; Sat, 02 Aug 2008 00:45:24 -0400 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]:35852) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1KP8zb-0004D1-Tp for emacs-devel@gnu.org; Sat, 02 Aug 2008 00:45:24 -0400 X-ICS-MailScanner-Watermark: 1218256984.69769@Bu1Hy/QtOA6PsVwny+hPDg Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m724h4vT017588 for ; Fri, 1 Aug 2008 21:43:04 -0700 (PDT) Original-Lines: 47 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101938 Archived-At: The use of the C preprocessor on the Makefiles is not ideal. It seems that the number of #ifdefs in lib-src/Makefile.in is not too high, and there's enough infrastructure in configure.in in place to make it feasible to replace the use of the preprocessor. This patch gets rid of the C_SWITCH_SYSTEM #ifdef. It seems to work fine on x86 Fedora. Is this TRTD? --- Makefile.in.~1.167.~ 2008-07-21 11:34:27.000000000 -0700 +++ Makefile.in 2008-08-01 14:49:50.000000000 -0700 @@ -161,10 +161,6 @@ INSTALLABLES = etags${EXEEXT} ctags${EXE #define LIBS_MACHINE #endif -#ifndef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM -#endif - #ifndef C_SWITCH_MACHINE #define C_SWITCH_MACHINE #endif @@ -237,16 +233,16 @@ LOADLIBES=LIBS_SYSTEM LIBS_MACHINE Some other files - those shared with other GNU utilities - need HAVE_CONFIG_H #defined before they know they can take advantage of the information in ../src/config.h. */ -ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ +ALL_CFLAGS = @c_switch_system@ C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} -LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ +LINK_CFLAGS = @c_switch_system@ C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} -CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ +CPP_CFLAGS = @c_switch_system@ C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} /* This was all of CPP_CFLAGS except -Demacs. Now that -Demacs has been deleted from CPP_CFLAGS, this is actually the same as CPP_CFLAGS, but let\'s not delete it yet. */ -BASE_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ +BASE_CFLAGS = @c_switch_system@ C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} .SUFFIXES: .m