From 2ab3efff1fc9d4f51076301c52ceeca66e9c8999 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Sat, 17 Aug 1991 04:46:28 +0000
Subject: [PATCH] * M        Makefile * M        Parallell-depend.make * M     
   import.make =====================================================
 Uppsnyggning.

---
 scripts/Makefile              |  1 +
 scripts/Parallell-depend.make | 12 +++----
 scripts/import.make           | 65 +++++++++++------------------------
 3 files changed, 28 insertions(+), 50 deletions(-)

diff --git a/scripts/Makefile b/scripts/Makefile
index b23b3f024..da83a03a3 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -1,6 +1,7 @@
 all:;
 depend:;
 install:;
+	
 
 clean:
 	rm -vf *~ core
diff --git a/scripts/Parallell-depend.make b/scripts/Parallell-depend.make
index b3e9f6af9..7adcc765a 100644
--- a/scripts/Parallell-depend.make
+++ b/scripts/Parallell-depend.make
@@ -3,24 +3,24 @@
 
 depend: temp-A-Makefile
 	rm -f dependencies
-	cat temp-?-Makefile				>dependencies
+	cat temp-?-Makefile >dependencies
 	rm temp-?-Makefile temp-?-files
 	echo depend ready.
 
 temp-A-Makefile: c-indexes specials
-	-$(CC) -M ${TARGET} ${INCLUDES} `cat temp-A-files`     >temp-A-Makefile
+	-$(CC) -M $(CFLAGS) `cat temp-A-files`     >temp-A-Makefile
 
 temp-B-Makefile: c-indexes specials
-	-$(CC) -M ${TARGET} ${INCLUDES} `cat temp-B-files`     >temp-B-Makefile
+	-$(CC) -M ${CFLAGS} `cat temp-B-files`     >temp-B-Makefile
 
 temp-C-Makefile: c-indexes specials
-	-$(CC) -M ${TARGET} ${INCLUDES} `cat temp-C-files`     >temp-C-Makefile
+	-$(CC) -M ${CFLAGS} `cat temp-C-files`     >temp-C-Makefile
 
 temp-D-Makefile: c-indexes specials
-	-$(CC) -M ${TARGET} ${INCLUDES} `cat temp-D-files`     >temp-D-Makefile
+	-$(CC) -M ${CFLAGS} `cat temp-D-files`     >temp-D-Makefile
 
 temp-E-Makefile: c-indexes specials
-	-$(CC) -M ${TARGET} ${INCLUDES} `cat temp-E-files`     >temp-E-Makefile
+	-$(CC) -M ${CFLAGS} `cat temp-E-files`     >temp-E-Makefile
 
 c-indexes: 
 	ls *.c|${AWK} '{ a[i++] = $$1; }				\
diff --git a/scripts/import.make b/scripts/import.make
index 2e39c9213..4264ce428 100644
--- a/scripts/import.make
+++ b/scripts/import.make
@@ -7,61 +7,38 @@
 # ceder is guilty.
 #
 
-ifndef SHELL
 SHELL=/bin/sh
-endif
-
-ifndef INCLUDEDIR
-INCLUDEDIR = $(TOPDIR)/include
-endif
-
-ifndef LIBDIR
-LIBDIR = $(TOPDIR)/lib
-endif
-
-ifndef ANSIDIR
-ANSIDIR = $(INCLUDEDIR)/ansi
-endif
-
-# Used programs.
-
-ifndef AWK
 AWK = gawk
-endif
-
-ifndef SED
 SED = /usr/bin/sed
-endif
-
-ifndef CC
-CC = /usr/gnu/bin/gcc -ansi
-endif
-
-ifndef RM
+CC = gcc -ansi
 RM = /usr/gnu/bin/rm -vf
-endif
 
-# Flags to the C compiler
+INCLUDEDIR	= $(TOPDIR)/include
+LIBDIR		= $(TOPDIR)/lib
+ANSIDIR		= $(INCLUDEDIR)/ansi
 
-ifndef INCLUDES
 INCLUDES = -I$(ANSIDIR) -I$(INCLUDEDIR)
-endif
-
-ifndef OPTIMIZE-FLAGS
 OPTIMIZE-FLAGS = -O
-endif
-
-ifndef MISC-CFLAGS
 MISC-CFLAGS = -g -Wall
-endif
+PIPE = -pipe
 
-ifndef LDFLAGS
 # -h flag makes NULL pointer references generate runtime errors
 LDFLAGS = -h -L$(LIBDIR)
-endif
-
-# Force CFLAGS to always follow the settings of INCLUDES,
-# OPTIMIZE-FLAGS and MISC-CFLAGS.
-# Set PIPE=-pipe if you want to.
 
 CFLAGS =  $(INCLUDES)  $(OPTIMIZE-FLAGS)  $(MISC-CFLAGS) $(PIPE) $(TARGET)
+
+# LysKOM executables that the typical user don't use go here.
+# (The server, dbck, et c)
+
+LYSKOMSYSBIN = /usr/lyskom/bin
+
+# User executables (such as lyskom, kompost et c)
+
+LYSKOMUSRBIN = /usr/local/bin
+
+EXPORT = CC="$CC" SHELL="$SHELL" AWK="$AWK" SED="$SED" CC="$CC" RM="$RM" \
+	INCLUDEDIR="$INCLUDEDIR" LIBDIR="$LIBDIR" ANSIDIR="$ANSIDIR"	\
+	INCLUDES="$INCLUDES" OPTIMIZE-FLAGS="$OPTIMIZE-FLAGS"	 	\
+	MISC-CFLAGS="$MISC-CFLAGS" PIPE="$PIPE" LDFLAGS="$LDFLAGS" 	\
+	CFLAGS="$CFLAGS" LYSKOMSYSBIN="$LYSKOMSYSBIN" 			\
+	LYSKOMUSRBIN="$LYSKOMUSRBIN"
-- 
GitLab