From a56b9b7f9e11d1108c6f5e88730f4fd167d8ba46 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Thu, 22 Aug 1991 18:27:53 +0000 Subject: [PATCH] Don't pass CC, CFLAGS et c via the environment. General cleanups. --- src/include/Makefile | 49 ++++---------------------------- src/include/server/Makefile | 36 ++--------------------- src/libraries/Makefile | 16 +++++++---- src/libraries/libansi/Makefile | 29 +------------------ src/libraries/libcommon/Makefile | 38 ++----------------------- src/libraries/libmisc/Makefile | 17 +---------- 6 files changed, 23 insertions(+), 162 deletions(-) diff --git a/src/include/Makefile b/src/include/Makefile index 45a810159..9fd49b9da 100644 --- a/src/include/Makefile +++ b/src/include/Makefile @@ -1,35 +1,9 @@ -# Makefile for LysKOM -# -############################################################################### -# -# SPECIAL CONSIDERATIONS: -# -# - Requires GNU make. -# - CC, OPTIMIZE-FLAGS and other make variables are passed down -# in the environment. -# - C compiler must be ANSI conformant. -# -############################################################################### -# -# SPECIAL TARGETS: -############################################################################### - -# Directories that you might want to override via the environment. - -ifndef TOPDIR TOPDIR = /usr/lyskom/src -endif - -ifndef SCRIPTDIR SCRIPTDIR = $(TOPDIR)/scripts -endif - -TARGET = -DCLIENT include $(SCRIPTDIR)/import.make - -# All directories that make should traverse to when doing clean etc. +TARGET = -DCLIENT SUBDIRS = ansi server @@ -39,7 +13,7 @@ all: for i in $(SUBDIRS); \ do \ echo making all in directory $$i; \ - (cd $$i; $(MAKE) all); \ + (cd $$i; $(MAKE) $(EXPORTS) all); \ done @@ -51,26 +25,15 @@ install: for i in $(SUBDIRS); \ do \ echo making install in directory $$i; \ - (cd $$i; $(MAKE) install); \ + (cd $$i; $(MAKE) $(EXPORTS) install); \ done clean: - rm -vf ${OBJECTS} *~ core temp-Makefile Distfile *.o + $(RM) *~ core temp-Makefile Distfile *.o for i in $(SUBDIRS); \ do \ echo making clean in directory $$i; \ - (cd $$i; $(MAKE) clean); \ + (cd $$i; $(MAKE) $(EXPORTS) clean); \ done - -depend: - for i in $(SUBDIRS); \ - do \ - echo making depend in directory $$i; \ - (cd $$i; $(MAKE) depend); \ - done - >dependencies - -specials:; - -include dependencies +depend:; \ No newline at end of file diff --git a/src/include/server/Makefile b/src/include/server/Makefile index 51573620b..bbdceab7d 100644 --- a/src/include/server/Makefile +++ b/src/include/server/Makefile @@ -1,36 +1,9 @@ -# Makefile for LysKOM -# -############################################################################### -# -# SPECIAL CONSIDERATIONS: -# -# - Requires GNU make. -# - CC, OPTIMIZE-FLAGS and other make variables are passed down -# in the environment. -# - C compiler must be ANSI conformant. -# -############################################################################### -# -# SPECIAL TARGETS: -############################################################################### - -# Directories that you might want to override via the environment. - -ifndef TOPDIR TOPDIR = /usr/lyskom/src -endif - -ifndef SCRIPTDIR SCRIPTDIR = $(TOPDIR)/scripts -endif - -TARGET = -DCLIENT include $(SCRIPTDIR)/import.make - -# All directories that make should traverse to when doing clean etc. - +TARGET = -DCLIENT INSTALL-HDRS = smalloc.h @@ -46,9 +19,4 @@ install: clean: rm -vf ${OBJECTS} *~ core temp-Makefile Distfile *.o -depend: - >dependencies - -specials:; - -include dependencies +depend:; diff --git a/src/libraries/Makefile b/src/libraries/Makefile index d69235845..404bb006a 100644 --- a/src/libraries/Makefile +++ b/src/libraries/Makefile @@ -1,3 +1,8 @@ +TOPDIR = /usr/lyskom/src +SCRIPTDIR = $(TOPDIR)/scripts + +include $(SCRIPTDIR)/import.make + # All directories that make should traverse to when doing clean etc. # Note that client-support depends on libmisc. @@ -7,7 +12,7 @@ all: for i in $(SUBDIRS) ; \ do \ echo making all in directory $$i; \ - (cd $$i; $(MAKE) all) \ + (cd $$i; $(MAKE) $(EXPORTS) all) \ done @@ -15,8 +20,7 @@ depend: for i in $(SUBDIRS) ; \ do \ echo making depend in directory $$i; \ - (cd $$i; $(MAKE) depend); \ - echo make depend in directory $$i ready.; \ + (cd $$i; $(MAKE) $(EXPORTS) depend); \ done @@ -24,7 +28,7 @@ install: for i in $(SUBDIRS) ; \ do \ echo making install in directory $$i; \ - (cd $$i; $(MAKE) install) \ + (cd $$i; $(MAKE) $(EXPORTS) install) \ done @@ -32,7 +36,7 @@ install-headers: for i in $(SUBDIRS) ; \ do \ echo making install-headers in directory $$i; \ - (cd $$i; $(MAKE) install-headers) \ + (cd $$i; $(MAKE) $(EXPORTS) install-headers) \ done @@ -41,6 +45,6 @@ clean: for i in $(SUBDIRS); \ do \ echo making clean in directory $$i; \ - (cd $$i; $(MAKE) clean) \ + (cd $$i; $(MAKE) $(EXPORTS) clean) \ done diff --git a/src/libraries/libansi/Makefile b/src/libraries/libansi/Makefile index 3f63c0e25..ffa190241 100644 --- a/src/libraries/libansi/Makefile +++ b/src/libraries/libansi/Makefile @@ -1,36 +1,9 @@ -# Makefile for LysKOM -# -############################################################################### -# -# SPECIAL CONSIDERATIONS: -# -# - Requires GNU make. -# - CC, OPTIMIZE-FLAGS and other make variables are passed down -# in the environment. -# - C compiler must be ANSI conformant. -# -############################################################################### -# -# SPECIAL TARGETS: -############################################################################### - -# Directories that you might want to override via the environment. - -ifndef TOPDIR TOPDIR = /usr/lyskom/src -endif - -ifndef SCRIPTDIR SCRIPTDIR = $(TOPDIR)/scripts -endif - -TARGET = -DCLIENT include $(SCRIPTDIR)/import.make - -# All directories that make should traverse to when doing clean etc. - +TARGET = -DCLIENT LIBNAME = libansi.a diff --git a/src/libraries/libcommon/Makefile b/src/libraries/libcommon/Makefile index ea6bd2331..89e25a79a 100644 --- a/src/libraries/libcommon/Makefile +++ b/src/libraries/libcommon/Makefile @@ -1,36 +1,9 @@ -# Makefile for LysKOM -# -############################################################################### -# -# SPECIAL CONSIDERATIONS: -# -# - Requires GNU make. -# - CC, OPTIMIZE-FLAGS and other make variables are passed down -# in the environment. -# - C compiler must be ANSI conformant. -# -############################################################################### -# -# SPECIAL TARGETS: -############################################################################### - - -# Directories that you might want to override via the environment. - -ifndef TOPDIR TOPDIR = /usr/lyskom/src -endif - -ifndef SCRIPTDIR SCRIPTDIR = $(TOPDIR)/scripts -endif - -TARGET = -DCLIENT include $(SCRIPTDIR)/import.make - -# All directories that make should traverse to when doing clean etc. +TARGET = -DCLIENT LIBOBJS = kom-errno.o misc-parser.o parser.o @@ -51,7 +24,7 @@ server-dir: .PHONY: liblyskom-server.a liblyskom-server.a: server-dir - (cd server-dir; make -f ../Makefile ../$@ TARGET=-DSERVER) + (cd server-dir; make $(EXPORTS) -f ../Makefile ../$@ TARGET=-DSERVER) ranlib $@ @@ -60,7 +33,7 @@ liblyskom-server.a: server-dir .PHONY: liblyskom-client.a liblyskom-client.a: client-dir - (cd client-dir; make -f ../Makefile ../$@ TARGET=-DCLIENT) + (cd client-dir; make $(EXPORTS) -f ../Makefile ../$@ TARGET=-DCLIENT) ranlib $@ @@ -84,11 +57,6 @@ install-headers: tags: etags -t $(INCLUDEDIR)/*.h *.[hc] -#rdist: clean -# echo "(/usr/local/src/2kom/common) -> (nanny.lysator.liu.se)" >Distfile -# echo "install;" >>Distfile -# rdist - # Recreate the Makefile from Makefile include $(SCRIPTDIR)/Parallell-depend.make diff --git a/src/libraries/libmisc/Makefile b/src/libraries/libmisc/Makefile index cba454931..212121f20 100644 --- a/src/libraries/libmisc/Makefile +++ b/src/libraries/libmisc/Makefile @@ -13,24 +13,12 @@ # # SPECIAL TARGETS: ############################################################################### - -# Directories that you might want to override via the environment. - -ifndef TOPDIR TOPDIR = /usr/lyskom/src -endif - -ifndef SCRIPTDIR SCRIPTDIR = $(TOPDIR)/scripts -endif - -TARGET = -DCLIENT include $(SCRIPTDIR)/import.make - -# All directories that make should traverse to when doing clean etc. - +TARGET = -DCLIENT LIBNAME = libmisc.a @@ -38,9 +26,6 @@ LIBOBJS = pom.o s-collat-tabs.o s-string.o zmalloc.o INSTALL-HDRS = pom.h s-collat-tabs.h s-string.h zmalloc.h -#OBJECTS = numlist.o numlist2.o pom.o s-collat-tabs.o s-string.o \ -# testnumlist.o zmalloc.o - all: $(LIBNAME) $(LIBNAME): $(LIBOBJS) -- GitLab