mirror of
https://github.com/postgres/postgres.git
synced 2026-06-04 06:45:49 -04:00
ca5db6cab1
does 2 things:
1) Make it hard to not notice the make failed. (As you recall, someone on
the mailing list had this problem. I've had it to some extent myself).
The 1.02 make files continue with the next subdirectory when a make
in a subdirectory fails. The patch makes the make stop in the
conventional way when a submake fails. It also adds a reassuring message
when the make succeeds and adds a note to the INSTALL file to expect it.
2) Include loader flags on all invocations of the linker.
The 1.02 make files omit the $(LDFLAGS) on some of the linker invocations.
On my system, I need one of those flags just to make it invoke the proper
version of the compiler/linker, so LDFLAGS has to be everywhere.
Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
52 lines
1.6 KiB
Makefile
52 lines
1.6 KiB
Makefile
#-------------------------------------------------------------------------
|
|
#
|
|
# 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)
|
|
|
|
|