From b8eb6400de68f1c62566d932278d637ea7bf64e3 Mon Sep 17 00:00:00 2001 From: Bryan Henderson Date: Tue, 19 Nov 1996 02:52:21 +0000 Subject: [PATCH] Eliminate mk/ directory. The tyranny of the included make file templates is ended! --- src/mk/postgres.lib.mk | 51 ------------- src/mk/postgres.mk | 148 -------------------------------------- src/mk/postgres.prog.mk | 26 ------- src/mk/postgres.shell.mk | 69 ------------------ src/mk/postgres.subdir.mk | 21 ------ src/mk/postgres.user.mk | 78 -------------------- 6 files changed, 393 deletions(-) delete mode 100644 src/mk/postgres.lib.mk delete mode 100644 src/mk/postgres.mk delete mode 100644 src/mk/postgres.prog.mk delete mode 100644 src/mk/postgres.shell.mk delete mode 100644 src/mk/postgres.subdir.mk delete mode 100644 src/mk/postgres.user.mk diff --git a/src/mk/postgres.lib.mk b/src/mk/postgres.lib.mk deleted file mode 100644 index 1818c57619..0000000000 --- a/src/mk/postgres.lib.mk +++ /dev/null @@ -1,51 +0,0 @@ -#------------------------------------------------------------------------- -# -# postgres.lib.mk-- -# rules for building libraries. To use the rules, set the following -# variables: -# LIBSRCS - source files for objects to be built in the library -# LIB - name of the library (eg. LIB=pq for libpq.a) -# postgres.mk should be included before this file. -# -# Copyright (c) 1994-5, Regents of the University of California -# -# -# IDENTIFICATION -# $Header: /cvsroot/pgsql/src/mk/Attic/postgres.lib.mk,v 1.2 1996/08/13 07:48:29 scrappy Exp $ -# -#------------------------------------------------------------------------- - -LIBOBJS:= $(addsuffix .o, $(basename $(LIBSRCS))) -#LIBSOBJS:= $(addsuffix .so, $(basename $(LIBSRCS))) -lib:= lib$(LIB).a -shlib:= lib$(LIB).so.1 - -ifndef LINUX_ELF -$(lib): $(addprefix $(objdir)/,$(LIBOBJS)) -else -$(lib): $(addprefix $(objdir)/,$(LIBOBJS)) -endif - @rm -f $(objdir)/$(lib) -ifdef MK_NO_LORDER - cd $(objdir); $(AR) $(AROPT) $(lib) $(LIBOBJS); $(RANLIB) $(lib) -else - cd $(objdir); $(AR) $(AROPT) $(lib) `lorder $(LIBOBJS) | tsort`; $(RANLIB) $(lib) -endif - -$(shlib): $(addprefix $(objdir)/,$(LIBOBJS)) - @rm -f $(objdir)/$(shlib) - cd $(objdir); $(CC) $(LDFLAGS) -shared $(LIBOBJS) -o $(shlib) - -CLEANFILES+= $(LIBOBJS) $(lib) $(shlib) - -ifdef LINUX_ELF -install:: localobj $(lib) $(shlib) - $(INSTALL) $(INSTL_LIB_OPTS) $(objdir)/$(lib) $(DESTDIR)$(LIBDIR)/$(lib) - $(INSTALL) $(INSTL_LIB_OPTS) $(objdir)/$(shlib) $(DESTDIR)$(LIBDIR)/$(shlib) -else -install:: localobj $(lib) - $(INSTALL) $(INSTL_LIB_OPTS) $(objdir)/$(lib) $(DESTDIR)$(LIBDIR)/$(lib) -endif -# @cd $(DESTDIR)$(LIBDIR); $(RANLIB) $(lib) - - diff --git a/src/mk/postgres.mk b/src/mk/postgres.mk deleted file mode 100644 index 25f9db90b9..0000000000 --- a/src/mk/postgres.mk +++ /dev/null @@ -1,148 +0,0 @@ -#------------------------------------------------------------------------- -# -# postgres.mk-- -# The master postgres makefile for implicit rules, definitions and -# variables. Every postgres makefile (except those that include -# postgres.subdir.mk only) should include this file. -# -# Copyright (c) 1994-5, Regents of the University of California -# -# -# IDENTIFICATION -# $Header: /cvsroot/pgsql/src/mk/Attic/postgres.mk,v 1.5 1996/10/04 20:20:51 scrappy Exp $ -# -#------------------------------------------------------------------------- - - -############################################################################## -# -# Default first rule (all): -# This is here so that people doing "gmake" without arguments will -# build the program (PROG), shell script (SHPROG) or library (LIB). To -# override this, you could define a rule before including postgres.mk. -# (See .dosomething: for an explanation of its presence.) -# - -ifdef PROG -all: localobj $(PROG) .dosomething -else -ifdef SHPROG -all: localobj $(SHPROG) .dosomething -else -ifdef LIB -#all: localobj lib$(LIB).a install-headers .dosomething -all: localobj lib$(LIB).a -else -# if you don't define PROG, SHPROG or LIB before including this, use :: for -# your all. (this is here so that clean is not the first rule) -all:: localobj -endif -endif -endif - -############################################################################## -# -# Flags for programs (ar, yacc, etc.) -# - -YFLAGS= -d -RANLIB= touch -AROPT= crs -#AROPT= cq -LINTFLAGS = - - -# -# Installation. -# -# This is the default for all platforms. If your platform uses a different -# BSD-style install program, change it in src/mk/port/postgres.mk.$PORTNAME -INSTALL= installbsd - -INSTLOPTS= -c -m 444 -INSTL_EXE_OPTS= -c -m 555 -INSTL_LIB_OPTS= -c -m 664 - -############################################################################## -# -# Canned command sequences -# - -# making partial objects (if BIGOBJS is defined) -define make_partial - $(LD) -r -o $(objdir)/$(@F) $(addprefix $(objdir)/,$(notdir $^)) -endef - -# compiling a .c which is generated (and is in $objdir) -define cc_inobjdir - $(CC) -c $(CFLAGS) $(CPPFLAGS) $(objdir)/$( $(objdir)/$(SHPROG) - -CLEANFILES+= $(SHPROG) - -install: localobj $(SHPROG) - $(INSTALL) $(INSTL_EXE_OPTS) $(objdir)/$(SHPROG) $(DESTDIR)$(BINDIR)/$(SHPROG) - - diff --git a/src/mk/postgres.subdir.mk b/src/mk/postgres.subdir.mk deleted file mode 100644 index 4cd22439e0..0000000000 --- a/src/mk/postgres.subdir.mk +++ /dev/null @@ -1,21 +0,0 @@ -#------------------------------------------------------------------------- -# -# postgres.lib.mk-- -# include this to do recursive make on the subdirectories specified in -# SUBDIR. -# -# Copyright (c) 1994-5, Regents of the University of California -# -# -# IDENTIFICATION -# $Header: /cvsroot/pgsql/src/mk/Attic/postgres.subdir.mk,v 1.1.1.1 1996/07/09 06:22:19 scrappy Exp $ -# -#------------------------------------------------------------------------- - -.PHONY: all - -.DEFAULT all: - @for dir in $(SUBDIR); do \ - echo "===> $$dir"; \ - $(MAKE) -C $$dir --no-print-directory $@; \ - done diff --git a/src/mk/postgres.user.mk b/src/mk/postgres.user.mk deleted file mode 100644 index 8adf9e0517..0000000000 --- a/src/mk/postgres.user.mk +++ /dev/null @@ -1,78 +0,0 @@ -#------------------------------------------------------------------------- -# -# postgres.user.mk-- -# rules for building object/shared libraries used in dynamic loading. -# To use the rules, set the following variables: -# DLOBJS - objects to be linked in dynamically -# This makefile adds the files you need to build to CREATEFILES. -# -# For building user modules (user functions to be loaded in dynamically). -# Make sure the following variables are set properly (You can either -# define them manually or include postgres.mk which defines them.): -# MKDIR - where postgres makefiles are -# includedir - where header files are installed -# PORTNAME - your platform (alpha, sparc, sparc_solaris, etc.) -# objdir - where to put the generated files -# -# An SQL script foo.sql or a shell script foo.sh generated from foo.source. -# Occurrence of the following strings will be replaced with the respective -# values. This is a feeble attempt to provide "portable" scripts. -# _CWD_ - current working directory -# _OBJWD_ - where the generated files (eg. object files) are -# _DLSUFFIX_ - suffix of the dynamic loading -# _USER_ - the login of the user -# -# Copyright (c) 1994-5, Regents of the University of California -# -# -# IDENTIFICATION -# $Header: /cvsroot/pgsql/src/mk/Attic/postgres.user.mk,v 1.2 1996/11/18 06:07:23 momjian Exp $ -# -#------------------------------------------------------------------------- - --include $(MKDIR)/port/postgres.mk.$(PORTNAME) -CFLAGS+= -I$(includedir) $(CFLAGS_SL) - -%.sql: %.source - if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \ - if [ -z "$$USER" ]; then USER=`whoami`; fi; \ - if [ -z "$$USER" ]; then echo 'Cannot deduce $$USER.'; exit 1; fi; \ - rm -f $(objdir)/$*.sql; \ - C=`pwd`; \ - sed -e "s:_CWD_:$$C:g" \ - -e "s:_OBJWD_:$$C/$(objdir):g" \ - -e "s:_DLSUFFIX_:$(DLSUFFIX):g" \ - -e "s/_USER_/$$USER/g" < $*.source > $(objdir)/$*.sql - -#How to create a dynamic lib -%.so.1: %.so - @rm -f $(objdir)/$(@F) - $(CC) -shared $< -o $(objdir)/$(@F) - -%.sh: %.source - if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \ - if [ -z "$$USER" ]; then USER=`whoami`; fi; \ - if [ -z "$$USER" ]; then echo 'Cannot deduce $USER.'; exit 1; fi; \ - rm -f $(objdir)/$*.sh; \ - C="`pwd`/"; \ - sed -e "s:_CWD_:$$C:g" \ - -e "s:_OBJWD_:$$C/$(objdir):g" \ - -e "s:_DLSUFFIX_:$(DLSUFFIX):g" \ - -e "s/_USER_/$$USER/g" < $*.source > $(objdir)/$*.sh - -# -# plus exports files -# -ifdef EXPSUFF -CREATEFILES+= $(DLOBJS:.o=$(EXPSUFF)) -endif - -# -# plus shared libraries -# -ifdef DLSUFFIX -ifneq ($(DLSUFFIX), '.o') -CREATEFILES+= $(DLOBJS:.so=$(DLSUFFIX)) -endif -endif - -- 2.40.0