unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: using autoconf for lib-src/Makefile.in
Date: Fri, 01 Aug 2008 21:43:04 -0700	[thread overview]
Message-ID: <200808020443.m724h4vT017588@sallyv1.ics.uci.edu> (raw)


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}
 \f
 .SUFFIXES: .m




             reply	other threads:[~2008-08-02  4:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-02  4:43 Dan Nicolaescu [this message]
2008-08-02  5:11 ` using autoconf for lib-src/Makefile.in Chong Yidong
2008-08-02  6:48   ` Dan Nicolaescu
2008-08-04 19:00     ` Stefan Monnier
2008-08-07 17:33       ` Dan Nicolaescu
2008-08-07 19:31         ` Stefan Monnier
2008-08-03  5:45 ` Miles Bader
2008-08-04  1:12   ` Dan Nicolaescu
2008-08-04  5:28     ` Miles Bader
2008-08-04  6:16       ` Dan Nicolaescu
2008-08-04 10:21         ` Miles Bader
2008-08-04 11:55           ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200808020443.m724h4vT017588@sallyv1.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).