Print this page
5468 Missing dependencies in lib/Makefile

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ypcmd/Makefile
          +++ new/usr/src/cmd/ypcmd/Makefile
↓ open down ↓ 14 lines elided ↑ open up ↑
  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 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
       25 +# Copyright 2015 RackTop Systems.
       26 +#
  25   27  
  26   28  BINPROG = ypmatch ypwhich ypcat
  27   29  SBINPROG = makedbm ypalias ypinit yppoll ypset
  28   30  NETYPPROG = ypbind ypxfr yppush udpublickey mkalias \
  29   31                  multi multi.awk stdethers stdhosts \
  30   32                  ypxfr_1perday ypxfr_1perhour ypxfr_2perday \
  31   33                  ypstart ypstop
  32   34  NIS2LDAPPROG = ypxfrd ypserv ypxfr
  33   35  SVCMETHOD = yp
  34   36  PROG=   $(BINPROG) $(SBINPROG) $(NETYPPROG) $(NIS2LDAPPROG) $(SVCMETHOD)
↓ open down ↓ 7 lines elided ↑ open up ↑
  42   44  # installed directories
  43   45  NETSVC = $(ROOTLIB)/netsvc
  44   46  NETYP = $(NETSVC)/yp
  45   47  
  46   48  ROOTVAR_YP = $(ROOT)/var/yp
  47   49  ROOTBINDING = $(ROOTVAR_YP)/binding
  48   50  ROOTDIRS =      $(ROOT) $(ROOTUSR) $(ROOTLIB) $(ROOTETC) $(ROOTVAR) \
  49   51                  $(NETSVC) $(NETYP) $(ROOTVAR_YP) $(ROOTBINDING) \
  50   52                  $(ROOTUSRSBIN) $(ROOTBIN)
  51   53  
  52      -$(BINPROG) :=   LDLIBS += -lnsl
  53      -$(NETYPPROG) := LDLIBS += -lnsl
  54   54  $(NIS2LDAPPROG) := LDLIBS += -lc -lnsl -lnisdb
  55   55  ypinit :=       LDLIBS += -lnsl
  56   56  yppoll :=       LDLIBS += -lnsl
  57   57  ypset :=        LDLIBS += -lnsl
       58 +ypbind :=       LDLIBS += -lnsl
       59 +ypmatch :=      LDLIBS += -lnsl
       60 +ypwhich :=      LDLIBS += -lnsl
       61 +ypcat :=        LDLIBS += -lnsl
       62 +yppush :=       LDLIBS += -lnsl
       63 +mkalias :=      LDLIBS += -lnsl
       64 +stdhosts :=     LDLIBS += -lnsl
       65 +stdethers :=    LDLIBS += -lsocket
  58   66  makedbm :=      MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
  59   67  makedbm :=      LDFLAGS += $(MAPFILES:%=-M%)
  60   68  
  61   69  $(ROOTVAR_YP)/aliases :=        FILEMODE=555
  62   70  
  63   71  YPFILES = Makefile aliases nicknames updaters
  64   72  ETCFILES =  publickey
  65   73  ROOTYPFILES= $(YPFILES:%=$(ROOTVAR_YP)/%)
  66   74  ROOTETCFILE= $(ETCFILES:%=$(ROOTETC)/%)
  67   75  
  68   76  TXTS=   $(ETCFILES:%=net_files/%) $(YPFILES:%=net_files/%)
  69   77  SUBDIRS = yppasswd mknetid revnetgroup ypupdated yp2lscripts
  70   78  
  71      -YPBINDOBJ= yp_b_svc.o yp_b_subr.o rpc_bootstrap.o getlist.o
  72   79  #
  73   80  # Some sort of obsolete idea of common files which are only now used by a 
  74   81  # few minor utilities
  75   82  #
  76   83  COMMONOBJ= getlist.o yp_getalias.o 
  77   84  
  78   85  #
  79   86  # Objects shared between all the major components
  80   87  #
  81   88  SHARED_DIR= ./shared
  82   89  SHAREDOBJ= $(SHARED_DIR)/utils.o $(SHARED_DIR)/lockmap.o $(SHARED_DIR)/ancil.o
  83      -SHARESRC = $(SHAREOBJ:.o=.c)
       90 +SHAREDSRC = $(SHAREDOBJ:%.o=%.c)
  84   91  
       92 +YPBINDOBJ= yp_b_svc.o yp_b_subr.o rpc_bootstrap.o getlist.o
  85   93  YPXFROBJ = ypxfr.o ypxfrd_client.o ypxfrd_xdr.o
  86   94  YPMATOBJ = ypmatch.o nick.o
  87   95  YPWHIOBJ = ypwhich.o nick.o
  88   96  YPCATOBJ = ypcat.o nick.o
       97 +MAKEDBMOBJ = makedbm.o
       98 +YPALIASOBJ = ypalias.o
  89   99  UDPUBLICKEYOBJ = udpublickey.o
  90  100  MKALIASOBJ = mkalias.o
  91  101  STDETHERSOBJ = stdethers.o
  92  102  STDHOSTSOBJ = stdhosts.o
  93      -#COMMONCLNTOBJ =        clnt_create_rsvd.o
  94  103  YPSERVOBJ = ypserv.o ypserv_map.o \
  95  104                  ypserv_proc.o ypserv_ancil.o \
  96  105                  ypserv_resolv.o ypserv_resolv_common.o \
  97  106                  ypv1_xdr.o ypserv_net_secure.o
  98  107  YPPUSHOBJ = yppush.o
  99  108  YPXFRDOBJ = ypxfrd_svc.o ypxfrd_xdr.o ypxfrd_server.o \
 100  109                  ypserv_net_secure.o
 101  110  
 102  111  NETYPOBJ = $(YPXFROBJ) $(YPXFRDOBJ) $(YPSERVOBJ) $(YPPUSHOBJ) \
 103  112                  $(YPBINDOBJ) $(UDPUBLICKEYOBJ)
 104  113  OBJS = $(NETYPOBJ) $(MKALIASOBJ) $(COMMONOBJ) $(SHAREDOBJ) \
 105  114          $(YPPUSHOBJ) $(YPMATOBJ) $(YPWHIOBJ) $(YPCATOBJ) \
 106      -        $(STDETHERSOBJ) $(STDHOSTSOBJ) makedbm.o ypalias.o pong.o
 107      -
 108      -BINSRC = $(BINPROG:=.c)
 109      -
 110      -SBINSRC = $(SBINPROG:=.c)
 111      -
 112      -NETYPSRC = $(NETYPOBJ:.o=.c)
 113      -
 114      -YPBINDSRC = $(YPBINSOBJ:.o=.c)
 115      -
 116      -YPXFRSRC =      $(YPXFROBJ:.o=.c)
      115 +        $(STDETHERSOBJ) $(STDHOSTSOBJ) $(MAKEDBMOBJ) $(YPALIASOBJ)
 117  116  
 118      -YPSERVSRC =     $(YPSERVOBJ:.o=.c)
 119      -
 120      -YPPUSHSRC =     $(YPPUSHOBJ:.o=.c)
 121      -
 122      -YPXFRDSRC =     $(YPXFRDOBJ:.o=.c)
 123      -
 124      -YPMASTERSRC =   $(YPMASTEROBJ:.o=.c)
 125      -
 126      -YPALLSRC =      $(YPALLOBJ:.o=.c)
 127      -
 128      -COMMONSRC =     $(COMMONOBJ:.o=.c)
 129      -
 130      -#COMMONCLNTSRC =        $(COMMONCLNTOBJ:.o=.c)
      117 +BINSRC =        $(BINPROG:%=%.c)
      118 +SBINSRC =       $(SBINPROG:%=%.c)
      119 +NETYPSRC =      $(NETYPOBJ:%.o=%.c)
      120 +YPBINDSRC =     $(YPBINSOBJ:%.o=%.c)
      121 +YPXFRSRC =      $(YPXFROBJ:%.o=%.c)
      122 +YPMATSRC =      $(YPMATOBJ:%.o=%.c)
      123 +YPWHISRC =      $(YPWHIOBJ:%.o=%.c)
      124 +YPCATSRC =      $(YPCATOBJ:%.o=%.c)
      125 +MAKEDBMSRC =    $(MAKEDBMOBJ:%.o=%.c)
      126 +YPALIASSRC =    $(YPALIASOBJ:%.o=%.c)
      127 +UDPUBLICKEYSRC =        $(UDPUBLICKEYOBJ:%.o=%.c)
      128 +MKALIASSRC =    $(MKALIASOBJ:%.o=%.c)
      129 +STDETHERSSRC =  $(STDETHERSOBJ:%.o=%.c)
      130 +STDHOSTSSRC =   $(STDHOSTSOBJ:%.o=%.c)
      131 +YPSERVSRC =     $(YPSERVOBJ:%.o=%.c)
      132 +YPPUSHSRC =     $(YPPUSHOBJ:%.o=%.c)
      133 +YPXFRDSRC =     $(YPXFRDOBJ:%.o=%.c)
      134 +YPALLSRC =      $(YPALLOBJ:%.o=%.c)
      135 +COMMONSRC =     $(COMMONOBJ:%.o=%.c)
 131  136  
 132  137  SRCS = $(BINSRC) $(SBINSRC) $(NETYPSRC) \
 133  138          $(COMMONSRC) $(SHAREDSRC)
 134  139  
 135  140  CLEANFILES =    ypxfrd.h ypxfrd_xdr.c 
 136  141  
 137  142  IBINPROG=               $(BINPROG:%=$(ROOTBIN)/%)
 138  143  ISBINPROG=              $(SBINPROG:%=$(ROOTUSRSBIN)/%)
 139  144  INETYPPROG=             $(NETYPPROG:%=$(NETYP)/%)
 140  145  INIS2LDAPPROG =         $(NIS2LDAPPROG:%=$(NETYP)/%)
↓ open down ↓ 4 lines elided ↑ open up ↑
 145  150  CERRWARN +=     -_gcc=-Wno-parentheses
 146  151  CERRWARN +=     -_gcc=-Wno-unused-variable
 147  152  CERRWARN +=     -_gcc=-Wno-uninitialized
 148  153  CERRWARN +=     -_gcc=-Wno-switch
 149  154  CERRWARN +=     -_gcc=-Wno-extra
 150  155  CERRWARN +=     -_gcc=-Wno-unused-label
 151  156  CERRWARN +=     -_gcc=-Wno-address
 152  157  CERRWARN +=     -_gcc=-Wno-unused-function
 153  158  
 154  159  #conditional assignments
 155      -ypalias.o :=    CPPFLAGS= -DMAIN $(CPPFLAGS.master)
 156      -makedbm.o :=    CPPFLAGS= $(CPPFLAGS.master)
 157      -yp_b_svc.o :=   CPPFLAGS += -DINIT_DEFAULT
      160 +$(YPALIASOBJ) :=        CPPFLAGS= -DMAIN $(CPPFLAGS.master)
      161 +$(MAKEDBMOBJ) :=        CPPFLAGS= $(CPPFLAGS.master)
      162 +$(YPBINDOBJ) := CPPFLAGS += -DINIT_DEFAULT
 158  163  ypxfrd_svc.o := CPPFLAGS += -Dmain=_main
 159      -ypxfr.o := CPPFLAGS += $(NIS2LDAPINC)
 160      -yppush.o := CPPFLAGS += $(NIS2LDAPINC)
      164 +$(YPXFROBJ) := CPPFLAGS += $(NIS2LDAPINC)
      165 +$(YPPUSHOBJ) := CPPFLAGS += $(NIS2LDAPINC)
 161  166  $(NIS2LDAPPROG) := CPPFLAGS += $(NIS2LDAPINC)
 162  167  $(SHAREDOBJ) := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
 163  168  $(ROOTVAR_YP)/Makefile := FILEMODE= 555
 164  169  $(ROOTVAR_YP)/nicknames := FILEMODE= 644
 165  170  $(ROOTVAR_YP)/updaters := FILEMODE= 500
 166  171  $(ROOTETC)/publickey := FILEMODE= 644
 167  172  # non-default file attributes to avoid conflict with rpcsrc
 168  173  NETYP =         $(NETSVC)/yp
 169  174  
 170  175  
 171  176  all:=           TARGET= all
 172  177  install:=       TARGET= install
 173  178  clean:=         TARGET= clean
 174  179  clobber:=       TARGET= clobber
 175  180  lint:=          TARGET= lint
 176  181  cstyle :=       TARGET= cstyle
 177  182  
 178      -all: $(SHAREDOBJ) $(SUBDIRS) $(PROG) $(TXTS) 
      183 +all: $(SHAREDOBJ) .WAIT $(SUBDIRS) $(PROG) $(TXTS)
 179  184  
 180  185  # install rules
 181  186  $(ROOTVAR_YP)/% \
 182  187  $(ROOTETC)/%: net_files/%
 183  188          $(INS.file)
 184  189  
 185  190  $(ROOTVAR_YP)/% : net_files/%
 186  191          $(INS.file)
 187  192  
 188  193  $(NETYP)/%: %
 189  194          $(INS.file)
 190  195  
 191  196  .KEEP_STATE:
 192  197  
 193      -$(SHAREDOBJ): $(SHAREDSRC)
 194      -        $(COMPILE.c) $(SHAREDSRC) -o $@ $<
      198 +$(SHARED_DIR)/%.o: $(SHARED_DIR)/%.c
      199 +        $(COMPILE.c) -o $@ $<
 195  200  
 196  201  ypbind: $(YPBINDOBJ)
 197  202          $(LINK.c) $(YPBINDOBJ) -o $@ $(LDLIBS)
 198  203          $(POST_PROCESS)
 199  204  
 200  205  makedbm ypalias: $$@.o $(COMMONOBJ) $$(MAPFILES)
 201  206          $(LINK.c) -o $@ $@.o $(COMMONOBJ) $(LDLIBS)
 202  207          $(POST_PROCESS)
 203  208  
 204  209  ypmatch: $(YPMATOBJ)
↓ open down ↓ 9 lines elided ↑ open up ↑
 214  219          $(POST_PROCESS)
 215  220  
 216  221  ypxfrd_xdr.c: ypxfrd.x
 217  222          $(RM) ypxfrd_xdr.c; $(RPCGEN) -C -c ypxfrd.x -o ypxfrd_xdr.c
 218  223  
 219  224  ypxfrd.h: ypxfrd.x
 220  225          $(RM) ypxfrd.h; $(RPCGEN) -C -h ypxfrd.x -o ypxfrd.h
 221  226  
 222  227  ypxfrd_xdr.o ypxfrd_client.o: ypxfrd.h
 223  228  
 224      -#clnt_create_rsvd.o ypxfr.o: clnt_create_rsvd.h
 225      -
 226  229  ypxfrd: $(YPXFRDOBJ) $(SHAREDOBJ)
 227      -        $(LINK.cc) $(YPXFRDOBJ) $(SHAREDOBJ) \
 228      -        -o $@ $(LDLIBS) -lc
      230 +        $(LINK.cc) $(YPXFRDOBJ) $(SHAREDOBJ) -o $@ $(LDLIBS)
 229  231          $(POST_PROCESS)
 230  232  
 231      -ypxfr: $(YPXFROBJ) $(COMMONOBJ) $(YPMASTEROBJ) $(SHAREDOBJ)
 232      -        $(LINK.cc) -o $@ $(YPXFROBJ) $(YPMASTEROBJ) $(COMMONOBJ) \
 233      -                $(SHAREDOBJ) $(LDLIBS)
      233 +ypxfr: $(YPXFROBJ) $(COMMONOBJ) $(SHAREDOBJ)
      234 +        $(LINK.cc) -o $@ $(YPXFROBJ) $(COMMONOBJ) $(SHAREDOBJ) $(LDLIBS)
 234  235          $(POST_PROCESS)
 235  236  
 236  237  ypserv: $(YPSERVOBJ) $(COMMONOBJ) $(SHAREDOBJ)
 237      -        $(LINK.cc) $(YPSERVOBJ) $(COMMONOBJ) \
 238      -                $(SHAREDOBJ) -o $@ $(LDLIBS)
      238 +        $(LINK.cc) $(YPSERVOBJ) $(COMMONOBJ) $(SHAREDOBJ) -o $@ $(LDLIBS)
 239  239          $(POST_PROCESS)
 240  240  
 241  241  yppush: $(YPPUSHOBJ) $(COMMONOBJ)
 242  242          $(LINK.c) $(YPPUSHOBJ) $(COMMONOBJ) -o $@ $(LDLIBS)
 243  243          $(POST_PROCESS)
 244  244  
 245  245  udpublickey: $(UDPUBLICKEYOBJ)
 246      -        $(LINK.c) $(UDPUBLICKEYOBJ) -o $@
      246 +        $(LINK.c) $(UDPUBLICKEYOBJ) -o $@ $(LDLIBS)
 247  247          $(POST_PROCESS)
 248  248  
 249  249  mkalias: $(MKALIASOBJ)
 250      -        $(LINK.c) $(MKALIASOBJ) -o $@ -lnsl
      250 +        $(LINK.c) $(MKALIASOBJ) -o $@ $(LDLIBS)
 251  251          $(POST_PROCESS)
 252  252  
 253  253  stdethers: $(STDETHERSOBJ)
 254      -        $(LINK.c) $(STDETHERSOBJ) -o $@ -lsocket
      254 +        $(LINK.c) $(STDETHERSOBJ) -o $@ $(LDLIBS)
 255  255          $(POST_PROCESS)
 256  256  
 257  257  stdhosts: $(STDHOSTSOBJ)
 258  258          $(LINK.c) $(STDHOSTSOBJ) -o $@ $(LDLIBS)
 259  259          $(POST_PROCESS)
 260  260  
 261  261  install: all $(PROG) $(ROOTDIRS) $(ROOTETCFILE) $(ROOTYPFILES) $(IBINPROG) \
 262  262          $(ISBINPROG) $(INETYPPROG) $(INIS2LDAPPROG) $(SUBDIRS) $(ROOTMANIFEST) \
 263  263          $(ROOTSVCMETHOD)
 264  264  
 265  265  $(ROOTDIRS):
 266  266          $(INS.dir)
 267  267  
 268  268  $(SUBDIRS): FRC
 269  269          @cd $@; pwd; $(MAKE) $(TARGET)
 270  270  
 271  271  lint := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
 272  272  
 273  273  lint:   $(SUBDIRS)
 274      -        $(LINT.c) ypmatch.c nick.c -lnsl
 275      -        $(LINT.c) ypwhich.c nick.c -lnsl
 276      -        $(LINT.c) ypcat.c nick.c -lnsl
 277      -        $(LINT.c) makedbm.c getlist.c yp_getalias.c
 278      -        $(LINT.c) ypalias.c getlist.c yp_getalias.c
 279      -        $(LINT.c) yp_b_svc.c yp_b_subr.c rpc_bootstrap.c getlist.c -lnsl
 280      -        $(LINT.c) ypxfr.c ypxfrd_client.c ypxfrd_xdr.c getlist.c yp_getalias.c \
 281      -                ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c -lnsl
 282      -        $(LINT.c) yppush.c getlist.c yp_getalias.c -lnsl
 283      -        $(LINT.c) udpublickey.c
 284      -        $(LINT.c) mkalias.c -lnsl
 285      -        $(LINT.c) stdethers.c -lsocket
 286      -        $(LINT.c) stdhosts.c -lnsl
 287      -        $(LINT.c) ypxfrd_svc.c ypxfrd_xdr.c ypxfrd_server.c \
 288      -                ypserv_net_secure.c \
 289      -                ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c \
 290      -                -lnsl -lnisdb
 291      -        $(LINT.c) ypserv.c ypserv_map.c ypserv_proc.c ypserv_ancil.c \
 292      -                ypserv_resolv.c ypserv_resolv_common.c ypv1_xdr.c \
 293      -                ypserv_net_secure.c getlist.c yp_getalias.c \
 294      -                ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c \
 295      -                -lnsl -lnisdb
      274 +        $(LINT.c) $(UDPUBLICKEYSRC) $(LDLIBS)
      275 +        $(LINT.c) $(MAKEDBMSRC) $(COMMONSRC) $(LDLIBS)
      276 +        $(LINT.c) $(YPALIASSRC) $(COMMONSRC) $(LDLIBS)
      277 +        $(LINT.c) $(YPMATSRC) $(LDLIBS) -lnsl
      278 +        $(LINT.c) $(YPWHISRC) $(LDLIBS) -lnsl
      279 +        $(LINT.c) $(YPCATSRC) $(LDLIBS) -lnsl
      280 +        $(LINT.c) $(YPBINDSRC) $(LDLIBS) -lnsl
      281 +        $(LINT.c) $(MKALIASSRC) $(LDLIBS) -lnsl
      282 +        $(LINT.c) $(STDHOSTSSRC) $(LDLIBS) -lnsl
      283 +        $(LINT.c) $(STDETHERSSRC) $(LDLIBS) -lsocket
      284 +        $(LINT.c) $(YPPUSHSRC) $(COMMONSRC) $(LDLIBS) -lnsl
      285 +        $(LINT.c) $(YPXFRSRC) $(COMMONSRC) $(SHAREDSRC) $(LDLIBS) -lnsl -lnisdb
      286 +        $(LINT.c) $(YPSERVSRC) $(COMMONSRC) $(SHAREDSRC) $(LDLIBS) -lnsl -lnisdb
 296  287  
 297  288  check: $(CHKMANIFEST)
 298  289  
 299  290  cstyle: $(SUBDIRS)
 300  291          ${CSTYLE} `echo $(SRCS) | sed 's/ypinit.c//'`
 301  292  
 302  293  clean:  $(SUBDIRS)
 303  294          $(RM) $(OBJS) $(CLEANFILES)
 304  295  
 305  296  clobber: clean $(SUBDIRS)
 306  297  
 307  298  FRC:
 308  299  
 309  300  include ../Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX