summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-11-21 19:33:57 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-11-21 19:33:57 +0000
commit1124889094be65fda1e6843f81b19f36fd2df211 (patch)
tree6777cf4fe790bc66db25e4f539d8f4cb7d53fbcf
parent7bdbf1bd9a6f983a3b7431c0e84b79d6120a24f9 (diff)
(top_srcdirinc, srcdirinc): New variables.
(CPPFLAGS): Use new vars $(top_srcdirinc) and $(srcdirinc) to avoid ugly duplication of `.' and `..' in compile lines when possible.
-rw-r--r--Makeconf12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makeconf b/Makeconf
index 15664353..201d205d 100644
--- a/Makeconf
+++ b/Makeconf
@@ -55,7 +55,17 @@ include $(..)config.make
# It is important to have this inclusion first; that picks up our
# library header files locally rather than from installed copies.
# Append to any value set by the specific Makefile or by configure.
-CPPFLAGS += -I. -I$(srcdir) -I.. -I$(top_srcdir)
+ifeq ($(srcdir),.)
+srcdirinc=
+else
+srcdirinc=-I$(srcdir)
+endif
+ifeq ($(top_srcdir),..)
+top_srcdirinc=
+else
+top_srcdirinc=-I$(top_srcdir)
+endif
+CPPFLAGS += -I. $(srcdirinc) -I.. $(top_srcdirinc)
CFLAGS += -Wall
# Decode makemode: