Print this page
687 rpcgen should not generate absolute #includes

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/librpcsvc/Makefile
          +++ new/usr/src/lib/librpcsvc/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 2006 Sun Microsystems, Inc.  All rights reserved.
  23   24  # Use is subject to license terms.
  24   25  #
  25      -# ident "%Z%%M% %I%     %E% SMI"
  26      -#
  27   26  
  28   27  include  ../../Makefile.master
  29   28  
  30      -PROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc
       29 +# Relative path to ensure path to header file is also relative
       30 +HEAD_DIR= ../../head/rpcsvc
       31 +UTS_DIR= ../../uts/common/rpcsvc
       32 +RPC_DIR= ../../uts/common/rpc
  31   33  
  32   34  SUBDIRS=        $(MACH)
  33   35  $(BUILD64)SUBDIRS += $(MACH64)
  34   36  
  35   37  DERIVED_FILES=  \
  36   38          common/bootparam_prot_xdr.c     \
  37   39          common/rstat_xdr.c      \
  38   40          common/rusers_xdr.c     \
  39   41          common/spray_xdr.c      \
  40   42          common/nlm_prot.c       \
↓ open down ↓ 33 lines elided ↑ open up ↑
  74   76  
  75   77  check: $(CHECKHDRS)
  76   78  
  77   79  clean clobber lint: $(SUBDIRS)
  78   80  
  79   81  #
  80   82  # Rules for building the derived files
  81   83  #
  82   84  # Derived files
  83   85  #
  84      -common/bootparam_prot_xdr.c: $(PROTOCOL_DIR)/bootparam_prot.x
  85      -        $(RPCGEN) -c $(PROTOCOL_DIR)/bootparam_prot.x > $@
       86 +common/bootparam_prot_xdr.c: $(HEAD_DIR)/bootparam_prot.x
       87 +        $(RPCGEN) -c $(HEAD_DIR)/bootparam_prot.x > $@
  86   88  
  87      -common/rstat_xdr.c: $(PROTOCOL_DIR)/rstat.x
  88      -        $(RPCGEN) -c $(PROTOCOL_DIR)/rstat.x > $@
       89 +common/rstat_xdr.c: $(HEAD_DIR)/rstat.x
       90 +        $(RPCGEN) -c $(HEAD_DIR)/rstat.x > $@
  89   91  
  90      -common/rusers_xdr.c: $(PROTOCOL_DIR)/rusers.x
  91      -        $(RPCGEN) -c $(PROTOCOL_DIR)/rusers.x > $@
       92 +common/rusers_xdr.c: $(HEAD_DIR)/rusers.x
       93 +        $(RPCGEN) -c $(HEAD_DIR)/rusers.x > $@
  92   94  
  93      -common/sm_inter_xdr.c: $(PROTOCOL_DIR)/sm_inter.x
  94      -        $(RPCGEN) -c $(PROTOCOL_DIR)/sm_inter.x > $@
       95 +common/sm_inter_xdr.c: $(UTS_DIR)/sm_inter.x
       96 +        $(RPCGEN) -c $(UTS_DIR)/sm_inter.x > $@
  95   97  
  96      -common/spray_xdr.c: $(PROTOCOL_DIR)/spray.x
  97      -        $(RPCGEN) -c $(PROTOCOL_DIR)/spray.x > $@
       98 +common/spray_xdr.c: $(HEAD_DIR)/spray.x
       99 +        $(RPCGEN) -c $(HEAD_DIR)/spray.x > $@
  98  100  
  99      -common/nlm_prot.c: $(PROTOCOL_DIR)/nlm_prot.x
 100      -        $(RPCGEN) -c $(PROTOCOL_DIR)/nlm_prot.x > $@
      101 +common/nlm_prot.c: $(UTS_DIR)/nlm_prot.x
      102 +        $(RPCGEN) -c $(UTS_DIR)/nlm_prot.x > $@
 101  103  
 102      -common/mount_xdr.c: $(PROTOCOL_DIR)/mount.x
 103      -        $(RPCGEN) -c $(PROTOCOL_DIR)/mount.x > $@
      104 +common/mount_xdr.c: $(HEAD_DIR)/mount.x
      105 +        $(RPCGEN) -c $(HEAD_DIR)/mount.x > $@
 104  106  
 105      -common/nsm_addr_xdr.c: $(PROTOCOL_DIR)/nsm_addr.x
 106      -        $(RPCGEN) -c $(PROTOCOL_DIR)/nsm_addr.x > $@
      107 +common/nsm_addr_xdr.c: $(UTS_DIR)/nsm_addr.x
      108 +        $(RPCGEN) -c $(UTS_DIR)/nsm_addr.x > $@
 107  109  
 108      -common/rpc_sztypes.c: $(PROTOCOL_DIR)/rpc_sztypes.x
 109      -        $(RPCGEN) -c $(PROTOCOL_DIR)/rpc_sztypes.x > $@
      110 +common/rpc_sztypes.c: $(RPC_DIR)/rpc_sztypes.x
      111 +        $(RPCGEN) -c $(RPC_DIR)/rpc_sztypes.x > $@
 110  112  
 111  113  # include library targets
 112  114  include ../Makefile.targ
 113  115  
 114  116  $(SUBDIRS): FRC
 115  117          @cd $@; pwd; $(MAKE) $(TARGET)
 116  118  
 117  119  FRC:
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX