Commit 0ac2a8ee by Doug Evans

(INCLUDES): Move definition to same place as parent makefile.

(ALLOCA): Define.
(OLDAR_FLAGS): Delete.
(OLDCC): Define.
(CLIB): Define.
(SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.

From-SVN: r7178
parent 187ce432
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
# Variables that exist for you to override. # Variables that exist for you to override.
# See below for how to change them for certain systems. # See below for how to change them for certain systems.
INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config ALLOCA =
# Various ways of specifying flags for compilations: # Various ways of specifying flags for compilations:
# CFLAGS is for the user to override to, e.g., do a bootstrap with -O2. # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
...@@ -59,7 +59,6 @@ BISONFLAGS = ...@@ -59,7 +59,6 @@ BISONFLAGS =
LEX = flex LEX = flex
LEXFLAGS = LEXFLAGS =
AR = ar AR = ar
OLDAR_FLAGS = qc
AR_FLAGS = rc AR_FLAGS = rc
SHELL = /bin/sh SHELL = /bin/sh
MAKEINFO = makeinfo MAKEINFO = makeinfo
...@@ -70,6 +69,10 @@ TEXI2DVI = texi2dvi ...@@ -70,6 +69,10 @@ TEXI2DVI = texi2dvi
# to compile all the gen* files first by hand to avoid erroneous results. # to compile all the gen* files first by hand to avoid erroneous results.
P = P =
# This is used in the definition of SUBDIR_USE_ALLOCA.
# ??? Perhaps it would be better if it just looked for *gcc*.
OLDCC = cc
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./. # It omits XCFLAGS, and specifies -B./.
# It also specifies -B$(tooldir)/ to find as and ld for a cross compiler. # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
...@@ -88,6 +91,9 @@ tmake_file= ... `configure' substitutes actual t- file name here. ...@@ -88,6 +91,9 @@ tmake_file= ... `configure' substitutes actual t- file name here.
# Directory where sources are, from where we are. # Directory where sources are, from where we are.
srcdir = . srcdir = .
# Additional system libraries to link with.
CLIB=
# Change this to a null string if obstacks are installed in the # Change this to a null string if obstacks are installed in the
# system library. # system library.
OBSTACK=obstack.o OBSTACK=obstack.o
...@@ -123,14 +129,22 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) ...@@ -123,14 +129,22 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
# Likewise. # Likewise.
ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
# Even if ALLOCA is set, don't use it if compiling with GCC.
SUBDIR_OBSTACK = `if [ x$(OBSTACK) != x ]; then echo ../$(OBSTACK); else true; fi` SUBDIR_OBSTACK = `if [ x$(OBSTACK) != x ]; then echo ../$(OBSTACK); else true; fi`
SUBDIR_USE_ALLOCA = `if [ x$(USE_ALLOCA) != x ]; then echo ../$(USE_ALLOCA); else true; fi` SUBDIR_USE_ALLOCA = `case "${CC}" in "${OLDCC}") if [ x$(ALLOCA) != x ]; then echo ../$(ALLOCA); else true; fi ;; esac`
SUBDIR_MALLOC = `if [ x$(MALLOC) != x ]; then echo ../$(MALLOC); else true; fi` SUBDIR_MALLOC = `if [ x$(MALLOC) != x ]; then echo ../$(MALLOC); else true; fi`
# How to link with both our special library facilities # How to link with both our special library facilities
# and the system's installed libraries. # and the system's installed libraries.
LIBS = $(SUBDIR_OBSTACK) $(SUBDIR_USE_ALLOCA) $(SUBDIR_MALLOC) $(CLIB) LIBS = $(SUBDIR_OBSTACK) $(SUBDIR_USE_ALLOCA) $(SUBDIR_MALLOC) $(CLIB)
# Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config
# Always use -I$(srcdir)/config when compiling. # Always use -I$(srcdir)/config when compiling.
.c.o: .c.o:
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment