8000 This commit represents a clean compile with the new templates under · postgrespro/postgres_cluster@c7b40e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit c7b40e6

Browse files
committed
This commit represents a clean compile with the new templates under
FreeBSD The Makefile(s) have all been cleaned up such that there is a single LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE. The Makefile(s) should be alot more straightforward then they were before...and consistent
1 parent e292a9d commit c7b40e6

File tree

21 files changed

+228
-261
lines changed
  • optimizer/geqo
  • parser
  • tcop
  • bin
  • interfaces
  • template
  • test/examples
  • 21 files changed

    +228
    -261
    lines changed

    src/Makefile.global.in

    Lines changed: 7 additions & 41 deletions
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@
    77
    #
    88
    #
    99
    # IDENTIFICATION
    10-
    # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.17 1997/04/04 07:57:45 scrappy Exp $
    10+
    # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.18 1997/04/04 10:38:23 scrappy Exp $
    1111
    #
    1212
    # NOTES
    1313
    # Essentially all Postgres make files include this file and use the
    @@ -249,12 +249,9 @@ endif
    249249
    CC= @CC@
    250250
    LEX= @LEX@
    251251
    AROPT= @AROPT@
    252-
    CFLAGS= @CPPFLAGS@ @ALL@
    253-
    CFLAGS_SL= @SHARED_LIBS@
    254-
    CFLAGS_BE= @BACKEND@
    255-
    LDFLAGS= @LDFLAGS@
    256-
    LDADD_BE= @LIBS@
    257-
    LD_ADD= $(LDADD_BE)
    252+
    CFLAGS= @CPPFLAGS@ @CFLAGS@
    253+
    CFLAGS_SL= @SHARED_LIB@
    254+
    LDFLAGS= @LDFLAGS@ @LIBS@
    258255
    DLSUFFIX= @DLSUFFIX@
    259256

    260257
    #----------------------------------------------------------------------
    @@ -360,15 +357,15 @@ ifeq ($(PORTNAME), irix5)
    360357
    RANLIB= touch
    361358

    362359
    %.so: %.o
    363-
    $(LD) -G -Bdynamic -o $@ $< $(LD_ADD)
    360+
    $(LD) -G -Bdynamic -o $@ $< $(LDFLAGS)
    364361

    365362
    endif
    366363

    367364
    #---------------------------------------------------------------------------
    368365

    369366
    ifeq ($(PORTNAME), linux)
    370367
    ifdef LINUX_ELF
    371-
    LDFLAGS_BE= -rdynamic
    368+
    LDFLAGS+= -rdynamic
    372369
    endif
    373370
    MK_NO_LORDER= true
    374371

    @@ -402,8 +399,7 @@ YACC= bison -y
    402399
    # symbol names to tell them what to export/import.
    403400
    MAKE_EXPORTS= true
    404401

    405-
    LDADD_BE+= /usr/ucblib/libucb.a
    406-
    LDFLAGS_BE= -LD-Blargedynsym
    402+
    LDFLAGS+= /usr/ucblib/libucb.a -LD-Blargedynsym
    407403

    408404
    %.so: %.o
    409405
    $(LD) -G -Bdynamic -o $@ $<
    @@ -426,12 +422,6 @@ endif
    426422
    ifeq ($(PORTNAME), univel)
    427423
    YACC= bison -y
    428424

    429-
    #
    430-
    # Some of the Makefiles use LDADD, others use LD_ADD.
    431-
    # This makes them the same.
    432-
    #
    433-
    LDADD= $(LD_ADD)
    434-
    435425
    # MAKE_EXPORTS is required for svr4 loaders that want a file of
    436426
    # symbol names to tell them what to export/import.
    437427
    #MAKE_EXPORTS= true
    @@ -483,32 +473,14 @@ endif
    483473

    484474
    ifneq ($(CUSTOM_COPT),)
    485475
    COPT= $(CUSTOM_COPT)
    486-
    else
    487-
    ifeq ($(CC), gcc)
    488-
    COPT= -O2 -Werror
    489-
    else
    490-
    COPT= -O
    491-
    endif
    492476
    endif
    493477

    494-
    495478
    ifeq ($(CC), gcc)
    496-
    # Some flags only gcc recognizes...
    497-
    # PostgreSQL should *always* compile with these enabled
    498479
    CFLAGS+= -Wall -Wmissing-prototypes
    499480
    endif
    500481

    501-
    # Globally pass debugging/optimization/profiling flags based
    502-
    # on the options selected above.
    503-
    504-
    505482
    ifdef COPT
    506483
    CFLAGS+= $(COPT)
    507-
    else
    508-
    ifndef CFLAGS_OPT
    509-
    CFLAGS_OPT= -O
    510-
    endif
    511-
    CFLAGS+= $(CFLAGS_OPT)
    512484
    endif
    513485

    514486
    ifndef CASSERT
    @@ -517,13 +489,7 @@ endif
    517489

    518490
    ifdef PROFILE
    519491
    CFLAGS+= $(PROFILE)
    520-
    LDFLAGS+= $(PROFILE)
    521492
    endif
    522493

    523494
    # Globally pass PORTNAME
    524495
    CFLAGS+= -D$(PORTNAME)
    525-
    526-
    # include port-specific flags
    527-
    CFLAGS+= $(CFLAGS_BE)
    528-
    LDFLAGS+= $(LDFLAGS_BE)
    529-

    src/backend/Makefile

    Lines changed: 4 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -34,7 +34,7 @@
    3434
    #
    3535
    #
    3636
    # IDENTIFICATION
    37-
    # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.22 1997/04/02 00:34:23 scrappy Exp $
    37+
    # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.23 1997/04/04 10:38:49 scrappy Exp $
    3838
    #
    3939
    #-------------------------------------------------------------------------
    4040

    @@ -60,7 +60,7 @@ endif
    6060
    all: postgres $(EXP) global1.bki.source local1_template1.bki.source
    6161

    6262
    postgres: $(OBJS) ../utils/version.o
    63-
    $(CC) -o postgres $(LDFLAGS) $(OBJS) ../utils/version.o $(LD_ADD)
    63+
    $(CC) -o postgres $(OBJS) ../utils/version.o $(LDFLAGS)
    6464

    6565
    $(OBJS): $(DIRS:%=%.dir)
    6666

    @@ -79,7 +79,7 @@ catalog/global1.bki.source catalog/local1_template1.bki.source:
    7979
    # The postgres.o target is needed by the rule in Makefile.global that
    8080
    # creates the exports file when MAKE_EXPORTS = true.
    8181
    postgres.o: $(OBJS)
    82-
    $(CC) $(LDFLAGS) -r -o postgres.o $(OBJS) $(LD_ADD)
    82+
    $(CC) -r -o postgres.o $(OBJS) $(LDFLAGS)
    8383

    8484

    8585
    ############################################################################
    @@ -150,7 +150,7 @@ $(BINDIR) $(LIBDIR) $(HEADERDIR):
    150150
    # are up to date. It saves the time of doing all the submakes.
    151151
    .PHONY: quick
    152152
    quick: $(OBJS)
    153-
    $(CC) $(LDFLAGS) -o postgres $(OBJS) $(LD_ADD)
    153+
    $(CC) -o postgres $(OBJS) $(LDFLAGS)
    154154

    155155
    #
    156156
    # Build the file, "./ID", used by the "gid" (grep-for-identifier) tool

    src/backend/bootstrap/Makefile

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,7 +4,7 @@
    44
    # Makefile for the bootstrap module
    55
    #
    66
    # IDENTIFICATION
    7-
    # $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.5 1997/04/02 18:10:46 scrappy Exp $
    7+
    # $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.6 1997/04/04 10:38:58 scrappy Exp $
    88
    #
    99
    #
    1010
    # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
    @@ -25,7 +25,7 @@ INCLUDE_OPT= -I.. \
    2525
    -I../port/$(PORTNAME) \
    2626
    -I../../include
    2727

    28-
    CFLAGS+= $(INCLUDE_OPT)
    28+
    CFLAGS+= $(INCLUDE_OPT) -Wno-error
    2929

    3030
    BOOTYACCS= bootstrap_tokens.h bootparse.c
    3131

    src/backend/libpq/Makefile

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,7 +4,7 @@
    44
    # Makefile for libpq subsystem (backend half of libpq interface)
    55
    #
    66
    # IDENTIFICATION
    7-
    # $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.6 1997/03/18 20:14:32 scrappy Exp $
    7+
    # $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.7 1997/04/04 10:39:19 scrappy Exp $
    88
    #
    99
    #-------------------------------------------------------------------------
    1010

    @@ -20,7 +20,7 @@ CFLAGS+=$(INCLUDE_OPT)
    2020
    # kerberos flags
    2121
    ifdef KRBVERS
    2222
    CFLAGS+= $(KRBFLAGS)
    23-
    LDADD+= $(KRBLIBS)
    23+
    LDFLAGS+= $(KRBLIBS)
    2424
    endif
    2525

    2626
    OBJS = be-dumpdata.o be-fsstubs.o be-pqexec.o pqcomprim.o\

    src/backend/optimizer/geqo/Makefile

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -5,7 +5,7 @@
    55
    #
    66
    # Copyright (c) 1994, Regents of the University of California
    77
    #
    8-
    # $Id: Makefile,v 1.4 1997/04/02 18:11:49 scrappy Exp $
    8+
    # $Id: Makefile,v 1.5 1997/04/04 10:39:50 scrappy Exp $
    99
    #
    1010
    #-------------------------------------------------------------------------
    1111

    @@ -16,7 +16,7 @@ INCLUDE_OPT = -I../.. \
    1616
    -I../../port/$(PORTNAME) \
    1717
    -I../../../include
    1818

    19-
    CFLAGS+=$(INCLUDE_OPT)
    19+
    CFLAGS+=$(INCLUDE_OPT) -Wno-error
    2020

    2121
    OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \
    2222
    geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \

    src/backend/parser/Makefile

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,7 +4,7 @@
    44
    # Makefile for parser
    55
    #
    66
    # IDENTIFICATION
    7-
    # $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.5 1997/04/02 18:12:14 scrappy Exp $
    7+
    # $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.6 1997/04/04 10:40:11 scrappy Exp $
    88
    #
    99
    #-------------------------------------------------------------------------
    1010

    @@ -15,7 +15,7 @@ INCLUDE_OPT= -I.. \
    1515
    -I../port/$(PORTNAME) \
    1616
    -I../../include
    1717

    18-
    CFLAGS+= $(INCLUDE_OPT)
    18+
    CFLAGS+= $(INCLUDE_OPT) -Wno-error
    1919

    2020
    OBJS= analyze.o catalog_utils.o dbcommands.o gram.o \
    2121
    keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o

    src/backend/tcop/Makefile

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,7 +4,7 @@
    44
    # Makefile for tcop
    55
    #
    66
    # IDENTIFICATION
    7-
    # $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.10 1997/04/02 18:13:01 scrappy Exp $
    7+
    # $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.11 1997/04/04 10:40:34 scrappy Exp $
    88
    #
    99
    #-------------------------------------------------------------------------
    1010

    @@ -15,7 +15,7 @@ INCLUDE_OPT= -I.. \
    1515
    -I../port/$(PORTNAME) \
    1616
    -I../../include
    1717

    18-
    CFLAGS+= $(INCLUDE_OPT)
    18+
    CFLAGS+= $(INCLUDE_OPT) -Wno-error
    1919

    2020
    OBJS= aclchk.o dest.o fastpath.o postgres.o pquery.o utility.o variable.o
    2121

    src/bin/Makefile.global

    Lines changed: 2 additions & 5 deletions
    Original file line numberDiff line numberDiff line change
    @@ -7,20 +7,17 @@
    77
    #
    88
    #
    99
    # IDENTIFICATION
    10-
    # $Header: /cvsroot/pgsql/src/bin/Attic/Makefile.global,v 1.13 1997/01/15 05:58:47 scrappy Exp $
    10+
    # $Header: /cvsroot/pgsql/src/bin/Attic/Makefile.global,v 1.14 1997/04/04 10:40:56 scrappy Exp $
    1111
    #
    1212
    #-------------------------------------------------------------------------
    1313

    1414
    LIBPQDIR:= $(SRCDIR)/libpq
    1515

    16-
    #LD_ADD+= -L$(SRCDIR)/libpq -lpq
    17-
    #DPADD+= -L$(SRCDIR)/libpq -lpq
    18-
    1916
    #
    2017
    # And where libpq goes, so goes the authentication stuff...
    2118
    #
    2219
    ifdef KRBVERS
    23-
    LD_ADD+= $(KRBLIBS)
    20+
    LDFLAGS+= $(KRBLIBS)
    2421
    CFLAGS+= $(KRBFLAGS)
    2522
    endif
    2623

    src/bin/pg_dump/Makefile.in

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@
    77
    #
    88
    #
    99
    # IDENTIFICATION
    10-
    # $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.1 1997/02/09 03:23:23 scrappy Exp $
    10+
    # $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.2 1997/04/04 10:41:17 scrappy Exp $
    1111
    #
    1212
    #-------------------------------------------------------------------------
    1313

    @@ -20,7 +20,7 @@ OBJS= pg_dump.o common.o @STRDUP@
    2020
    all: submake pg_dump
    2121

    2222
    pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a
    23-
    $(CC) $(LDFLAGS) -o pg_dump -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
    23+
    $(CC) -o pg_dump -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS)
    2424

    2525
    ../../utils/strdup.o:
    2626
    $(MAKE) -C ../../utils strdup.o

    src/bin/pg_id/Makefile

    Lines changed: 2 additions & 2 deletions
    C2EE
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@
    77
    #
    88
    #
    99
    # IDENTIFICATION
    10-
    # $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.4 1997/02/06 02:31:25 momjian Exp $
    10+
    # $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.5 1997/04/04 10:41:26 scrappy Exp $
    1111
    #
    1212
    #-------------------------------------------------------------------------
    1313

    @@ -20,7 +20,7 @@ OBJS= pg_id.o
    2020
    all: pg_id
    2121

    2222
    pg_id: $(OBJS) $(LIBPQDIR)/libpq.a
    23-
    $(CC) $(LDFLAGS) -o pg_id -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
    23+
    $(CC) -o pg_id -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS)
    2424

    2525
    $(LIBPQDIR)/libpq.a:
    2626
    $(MAKE) -C $(LIBPQDIR) libpq.a

    src/bin/pg_version/Makefile

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@
    77
    #
    88
    #
    99
    # IDENTIFICATION
    10-
    # $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile,v 1.3 1997/02/06 02:31:52 momjian Exp $
    10+
    # $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile,v 1.4 1997/04/04 10:41:37 scrappy Exp $
    1111
    #
    1212
    #-------------------------------------------------------------------------
    1313

    @@ -20,7 +20,7 @@ OBJS= pg_version.o ../../utils/version.o
    2020
    all: pg_version
    2121

    2222
    pg_version: submake $(OBJS)
    23-
    $(CC) $(LDFLAGS) -o pg_version $(OBJS) $(LD_ADD)
    23+
    $(CC) -o pg_version $(OBJS) $(LDFLAGS)
    2424

    2525
    .PHONY: submake
    2626
    submake:

    src/bin/pgtclsh/Makefile

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@
    77
    #
    88
    #
    99
    # IDENTIFICATION
    10-
    # $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.5 1997/01/21 05:16:38 bryanh Exp $
    10+
    # $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.6 1997/04/04 10:42:11 scrappy Exp $
    1111
    #
    1212
    #-------------------------------------------------------------------------
    1313

    @@ -25,12 +25,12 @@ all: pgtclsh pgtksh
    2525

    2626
    pgtclsh: pgtclAppInit.o
    2727
    $(CC) $(CFLAGS) -o $@ pgtclAppInit.o \
    28-
    $(LIBPGTCL) $(LIBPQ) -L$(TCL_LIBDIR) $(TCL_LIB) -lm $(LD_ADD)
    28+
    $(LIBPGTCL) $(LIBPQ) -L E9B1 $(TCL_LIBDIR) $(TCL_LIB) -lm $(LDFLAGS)
    2929

    3030
    pgtksh: pgtkAppInit.o
    3131
    $(CC) $(CFLAGS) -o $@ pgtkAppInit.o \
    3232
    $(LIBPGTCL) $(LIBPQ) -L$(TCL_LIBDIR) -L$(TK_LIBDIR) -L$(X11_LIBDIR) \
    33-
    $(TK_LIB) $(TCL_LIB) -lX11 -lm $(LD_ADD)
    33+
    $(TK_LIB) $(TCL_LIB) -lX11 -lm $(LDFLAGS)
    3434

    3535
    install: pgtclsh pgtksh
    3636
    $(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(DESTDIR)$(BINDIR)/pgtclsh

    src/bin/psql/Makefile.in

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@
    77
    #
    88
    #
    99
    # IDENTIFICATION
    10-
    # $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.3 1997/02/09 03:23:52 scrappy Exp $
    10+
    # $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.4 1997/04/04 10:42:23 scrappy Exp $
    1111
    #
    1212
    #-------------------------------------------------------------------------
    1313

    @@ -24,7 +24,7 @@ OBJS= psql.o stringutils.o @STRDUP@
    2424
    all: submake psql
    2525

    2626
    psql: $(OBJS) $(LIBPQDIR)/libpq.a
    27-
    $(CC) $(LDFLAGS) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
    27+
    $(CC) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LDFLAGS)
    2828

    2929
    ../../utils/strdup.o:
    3030
    $(MAKE) -C ../../utils strdup.o

    0 commit comments

    Comments
     (0)
    0