Print this page
    
NEX-5202 krb5 must make sure local db headers precede any possible system db headers
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com
          +++ new/usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com
   1    1  #
   2    2  # CDDL HEADER START
   3    3  #
   4    4  # The contents of this file are subject to the terms of the
   5    5  # Common Development and Distribution License (the "License").
   6    6  # You may not use this file except in compliance with the License.
   7    7  #
   8    8  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9  # or http://www.opensolaris.org/os/licensing.
  10   10  # See the License for the specific language governing permissions
  11   11  # and limitations under the License.
  12   12  #
  13   13  # When distributing Covered Code, include this CDDL HEADER in each
  14   14  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15  # If applicable, add the following below this CDDL HEADER, with the
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  #
  22   22  # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
  25   25  
  26   26  LIBRARY= libdb2.a
  27   27  VERS= .1
  28   28  
  29   29  # btree  
  30   30  BTREE_OBJS= \
  31   31          bt_close.o \
  32   32          bt_conv.o \
  33   33          bt_debug.o \
  34   34          bt_delete.o \
  35   35          bt_get.o \
  36   36          bt_open.o \
  37   37          bt_overflow.o \
  38   38          bt_page.o \
  39   39          bt_put.o \
  40   40          bt_search.o \
  41   41          bt_seq.o \
  42   42          bt_split.o \
  43   43          bt_utils.o 
  44   44   
  45   45  # db 
  46   46  DB_OBJS= db.o
  47   47  
  48   48  # hash
  49   49  HASH_OBJS= \
  50   50          hash.o \
  51   51          hash_bigkey.o \
  52   52          hash_func.o \
  53   53          hash_log2.o \
  54   54          hash_page.o \
  55   55          hsearch.o \
  56   56          dbm.o
  57   57  
  58   58  # mpool
  59   59  MPOOL_OBJS= mpool.o
  60   60  
  61   61  # recno
  62   62  RECNO_OBJS= \
  63   63          rec_close.o \
  64   64          rec_delete.o \
  65   65          rec_get.o \
  66   66          rec_open.o \
  67   67          rec_put.o \
  68   68          rec_search.o \
  69   69          rec_seq.o \
  70   70          rec_utils.o
  71   71  
  72   72  OBJECTS= \
  73   73          $(BTREE_OBJS) $(DB_OBJS) $(HASH_OBJS) $(MPOOL_OBJS) $(RECNO_OBJS)
  74   74  
  75   75  # include library definitions
  76   76  include $(SRC)/lib/krb5/Makefile.lib
  77   77  
  78   78  SRCS=   $(BTREE_OBJS:%.o=../btree/%.c) \
  79   79          $(DB_OBJS:%.o=../db/%.c) \
  80   80          $(HASH_OBJS:%.o=../hash/%.c) \
  81   81          $(MPOOL_OBJS:%.o=../mpool/%.c) \
  82   82          $(RECNO_OBJS:%.o=../recno/%.c)
  83   83  
  
    | 
      ↓ open down ↓ | 
    83 lines elided | 
    
      ↑ open up ↑ | 
  
  84   84  LIBS=           $(DYNLIB)
  85   85  
  86   86  include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  87   87  
  88   88  POFILE = $(LIBRARY:%.a=%.po)
  89   89  POFILES = generic.po
  90   90  
  91   91  #override liblink
  92   92  INS.liblink=    -$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
  93   93  
  94      -CPPFLAGS +=     -DHAVE_CONFIG_H \
       94 +# We need to ensure we find our own libdb2, not any that happen to be on the system
       95 +CPPFLAGS.first += -DHAVE_CONFIG_H \
  95   96                  -I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/mpool \
  96   97                  -I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/db \
  97   98                  -I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/hash \
  98   99                  -I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/btree \
  99  100                  -I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/recno \
 100  101                  -I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/include \
 101  102                  -I$(SRC)/lib/gss_mechs/mech_krb5/include  #for db-ndbm.h
 102  103  
 103  104  CFLAGS +=       $(CCVERBOSE) -I..
 104  105  CERRWARN +=     -_gcc=-Wno-uninitialized
 105  106  LDLIBS +=       -lc
 106  107  
 107  108  # Identify that this library is an interposer (on dbm_ routines from libc.so.1).
 108  109  # This identification insures runtime symbol lookup resolves to this library
 109  110  # (before libc.so.1) regardless of dependency link order.
 110  111  DYNFLAGS +=     $(ZINTERPOSE)
 111  112  
 112  113  .KEEP_STATE:
 113  114  
 114  115  all:    $(LIBS)
 115  116  
 116  117  lint:   lintcheck
 117  118  
 118  119  # include library targets
 119  120  include $(SRC)/lib/krb5/Makefile.targ
 120  121  
 121  122  pics/%.o: ../btree/%.c
 122  123          $(COMPILE.c)  -o $@ $<
 123  124          $(POST_PROCESS_O)
 124  125  
 125  126  pics/%.o: ../db/%.c
 126  127          $(COMPILE.c)  -o $@ $<
 127  128          $(POST_PROCESS_O)
 128  129  
 129  130  pics/%.o: ../hash/%.c
 130  131          $(COMPILE.c)  -o $@ $<
 131  132          $(POST_PROCESS_O)
 132  133  
 133  134  pics/%.o: ../mpool/%.c
 134  135          $(COMPILE.c)  -o $@ $<
 135  136          $(POST_PROCESS_O)
 136  137  
 137  138  pics/%.o: ../recno/%.c
 138  139          $(COMPILE.c)  -o $@ $<
 139  140          $(POST_PROCESS_O)
 140  141  
 141  142  FRC:
 142  143  
 143  144  generic.po: FRC
 144  145          $(RM) messages.po
 145  146          $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../hash/*.[ch]`
 146  147          $(SED) "/^domain/d" messages.po > $@
 147  148          $(RM) messages.po
  
    | 
      ↓ open down ↓ | 
    43 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX