Print this page
4815 Want rm support for -v option
4816 rm does not print error messages when -f is used

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/rm/Makefile
          +++ new/usr/src/cmd/rm/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 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
       25 +# Copyright 2014 Andrew Stormont.
       26 +#
  25   27  
  26   28  PROG=           rm
  27      -XPG4PROG=       rm
       29 +HASPROG=        $(PROG:%=%.has)
  28   30  RMOBJ1=         rm.o
  29   31  RMOBJ=          $(RMOBJ1) getresponse.o
  30      -XPG4RMOBJ=      $(RMOBJ:%.o=xpg4_%.o)
       32 +HASRMOBJ=       $(RMOBJ:%.o=has_%.o)
  31   33  SRCS=           $(RMOBJ1:%.o=%.c) $(SRC)/common/util/getresponse.c
  32   34  
  33   35  include ../Makefile.cmd
  34   36  
  35   37  CFLAGS += $(CCVERBOSE)
  36   38  CERRWARN += -_gcc=-Wno-parentheses
  37      -$(XPG4) := CFLAGS += -DXPG4
       39 +$(HASPROG) := CFLAGS += -DSUS
  38   40  CPPFLAGS += -D_FILE_OFFSET_BITS=64  -I $(SRC)/common/util
  39   41  LINTFLAGS += -u
  40   42  .KEEP_STATE:
  41   43  
  42      -all: $(PROG) $(XPG4)
       44 +all: $(PROG) $(HASPROG)
  43   45  
  44      -install: all $(ROOTPROG) $(ROOTXPG4PROG)
       46 +install: all $(ROOTPROG) $(ROOTHASBINPROG)
  45   47  
  46   48  $(PROG): $(RMOBJ) 
  47   49          $(LINK.c) $(RMOBJ) -o $@ $(LDLIBS)
  48   50          $(POST_PROCESS)
  49   51  
  50      -$(XPG4): $(XPG4RMOBJ)
  51      -        $(LINK.c) $(XPG4RMOBJ) -o $@ $(LDLIBS)
       52 +$(HASPROG): $(HASRMOBJ)
       53 +        $(LINK.c) $(HASRMOBJ) -o $@ $(LDLIBS)
  52   54          $(POST_PROCESS)
  53   55  
  54   56  %.o:    $(SRC)/common/util/%.c
  55   57          $(COMPILE.c) $(OUTPUT_OPTION) $<
  56   58          $(POST_PROCESS_O)
  57   59  
  58      -xpg4_%.o:       %.c
       60 +has_%.o:        %.c
  59   61          $(COMPILE.c) -o $@ $<
  60   62          $(POST_PROCESS_O)
  61   63  
  62      -xpg4_%.o:       $(SRC)/common/util/%.c
       64 +has_%.o:        $(SRC)/common/util/%.c
  63   65          $(COMPILE.c) -o $@ $<
  64   66          $(POST_PROCESS_O)
  65   67  
  66   68  clean:
  67      -        $(RM) $(RMOBJ) $(XPG4RMOBJ)
       69 +        $(RM) $(RMOBJ) $(HASRMOBJ) $(HASPROG)
  68   70  
  69   71  lint:   lint_SRCS
  70   72  
       73 +$(ROOTHASBIN)/%: %.has
       74 +        $(INS.rename)
       75 +
       76 +FRC:
       77 +
  71   78  include ../Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX