Print this page
5840 cmd/ypcmd build failed without usr/lib/libsocket.so on build host

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ypcmd/Makefile
          +++ new/usr/src/cmd/ypcmd/Makefile
↓ open down ↓ 11 lines elided ↑ open up ↑
  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 +# Copyright 2015 Gary Mills
  22   23  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   24  # Use is subject to license terms.
  24   25  #
  25   26  
  26   27  BINPROG = ypmatch ypwhich ypcat
  27   28  SBINPROG = makedbm ypalias ypinit yppoll ypset
  28   29  NETYPPROG = ypbind ypxfr yppush udpublickey mkalias \
  29   30                  multi multi.awk stdethers stdhosts \
  30   31                  ypxfr_1perday ypxfr_1perhour ypxfr_2perday \
  31   32                  ypstart ypstop
  32   33  NIS2LDAPPROG = ypxfrd ypserv ypxfr
  33   34  SVCMETHOD = yp
  34   35  PROG=   $(BINPROG) $(SBINPROG) $(NETYPPROG) $(NIS2LDAPPROG) $(SVCMETHOD)
  35   36  
  36   37  MANIFEST = server.xml client.xml xfr.xml
  37   38  
       39 +# These only need -lnsl
       40 +LNSLPROG = ypmatch ypwhich ypcat yppoll ypset \
       41 +        ypbind ypxfr yppush mkalias stdhosts
       42 +
  38   43  include ../Makefile.cmd
  39   44  
  40   45  ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
  41   46  
  42   47  # installed directories
  43   48  NETSVC = $(ROOTLIB)/netsvc
  44   49  NETYP = $(NETSVC)/yp
  45   50  
  46   51  ROOTVAR_YP = $(ROOT)/var/yp
  47   52  ROOTBINDING = $(ROOTVAR_YP)/binding
  48   53  ROOTDIRS =      $(ROOT) $(ROOTUSR) $(ROOTLIB) $(ROOTETC) $(ROOTVAR) \
  49   54                  $(NETSVC) $(NETYP) $(ROOTVAR_YP) $(ROOTBINDING) \
  50   55                  $(ROOTUSRSBIN) $(ROOTBIN)
  51   56  
  52      -$(BINPROG) :=   LDLIBS += -lnsl
  53      -$(NETYPPROG) := LDLIBS += -lnsl
       57 +$(LNSLPROG) :=  LDLIBS += -lnsl
  54   58  $(NIS2LDAPPROG) := LDLIBS += -lc -lnsl -lnisdb
  55      -ypinit :=       LDLIBS += -lnsl
  56      -yppoll :=       LDLIBS += -lnsl
  57      -ypset :=        LDLIBS += -lnsl
       59 +stdethers :=    LDLIBS += -lsocket
  58   60  makedbm :=      MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
  59   61  makedbm :=      LDFLAGS += $(MAPFILES:%=-M%)
  60   62  
  61   63  $(ROOTVAR_YP)/aliases :=        FILEMODE=555
  62   64  
  63   65  YPFILES = Makefile aliases nicknames updaters
  64   66  ETCFILES =  publickey
  65   67  ROOTYPFILES= $(YPFILES:%=$(ROOTVAR_YP)/%)
  66   68  ROOTETCFILE= $(ETCFILES:%=$(ROOTETC)/%)
  67   69  
↓ open down ↓ 168 lines elided ↑ open up ↑
 236  238  ypserv: $(YPSERVOBJ) $(COMMONOBJ) $(SHAREDOBJ)
 237  239          $(LINK.cc) $(YPSERVOBJ) $(COMMONOBJ) \
 238  240                  $(SHAREDOBJ) -o $@ $(LDLIBS)
 239  241          $(POST_PROCESS)
 240  242  
 241  243  yppush: $(YPPUSHOBJ) $(COMMONOBJ)
 242  244          $(LINK.c) $(YPPUSHOBJ) $(COMMONOBJ) -o $@ $(LDLIBS)
 243  245          $(POST_PROCESS)
 244  246  
 245  247  udpublickey: $(UDPUBLICKEYOBJ)
 246      -        $(LINK.c) $(UDPUBLICKEYOBJ) -o $@
      248 +        $(LINK.c) $(UDPUBLICKEYOBJ) -o $@ $(LDLIBS)
 247  249          $(POST_PROCESS)
 248  250  
 249  251  mkalias: $(MKALIASOBJ)
 250      -        $(LINK.c) $(MKALIASOBJ) -o $@ -lnsl
      252 +        $(LINK.c) $(MKALIASOBJ) -o $@ $(LDLIBS)
 251  253          $(POST_PROCESS)
 252  254  
 253  255  stdethers: $(STDETHERSOBJ)
 254      -        $(LINK.c) $(STDETHERSOBJ) -o $@ -lsocket
      256 +        $(LINK.c) $(STDETHERSOBJ) -o $@ $(LDLIBS)
 255  257          $(POST_PROCESS)
 256  258  
 257  259  stdhosts: $(STDHOSTSOBJ)
 258  260          $(LINK.c) $(STDHOSTSOBJ) -o $@ $(LDLIBS)
 259  261          $(POST_PROCESS)
 260  262  
 261  263  install: all $(PROG) $(ROOTDIRS) $(ROOTETCFILE) $(ROOTYPFILES) $(IBINPROG) \
 262  264          $(ISBINPROG) $(INETYPPROG) $(INIS2LDAPPROG) $(SUBDIRS) $(ROOTMANIFEST) \
 263  265          $(ROOTSVCMETHOD)
 264  266  
↓ open down ↓ 45 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX