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

@@ -20,52 +20,59 @@
 #
 #
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2014 Andrew Stormont.
+#
 
 PROG=           rm
-XPG4PROG=       rm
+HASPROG=        $(PROG:%=%.has)
 RMOBJ1=         rm.o
 RMOBJ=          $(RMOBJ1) getresponse.o
-XPG4RMOBJ=      $(RMOBJ:%.o=xpg4_%.o)
+HASRMOBJ=       $(RMOBJ:%.o=has_%.o)
 SRCS=           $(RMOBJ1:%.o=%.c) $(SRC)/common/util/getresponse.c
 
 include ../Makefile.cmd
 
 CFLAGS += $(CCVERBOSE)
 CERRWARN += -_gcc=-Wno-parentheses
-$(XPG4) := CFLAGS += -DXPG4
+$(HASPROG) := CFLAGS += -DSUS
 CPPFLAGS += -D_FILE_OFFSET_BITS=64  -I $(SRC)/common/util
 LINTFLAGS += -u
 .KEEP_STATE:
 
-all: $(PROG) $(XPG4)
+all: $(PROG) $(HASPROG)
 
-install: all $(ROOTPROG) $(ROOTXPG4PROG)
+install: all $(ROOTPROG) $(ROOTHASBINPROG)
 
 $(PROG): $(RMOBJ) 
         $(LINK.c) $(RMOBJ) -o $@ $(LDLIBS)
         $(POST_PROCESS)
 
-$(XPG4): $(XPG4RMOBJ)
-        $(LINK.c) $(XPG4RMOBJ) -o $@ $(LDLIBS)
+$(HASPROG): $(HASRMOBJ)
+        $(LINK.c) $(HASRMOBJ) -o $@ $(LDLIBS)
         $(POST_PROCESS)
 
 %.o:    $(SRC)/common/util/%.c
         $(COMPILE.c) $(OUTPUT_OPTION) $<
         $(POST_PROCESS_O)
 
-xpg4_%.o:       %.c
+has_%.o:        %.c
         $(COMPILE.c) -o $@ $<
         $(POST_PROCESS_O)
 
-xpg4_%.o:       $(SRC)/common/util/%.c
+has_%.o:        $(SRC)/common/util/%.c
         $(COMPILE.c) -o $@ $<
         $(POST_PROCESS_O)
 
 clean:
-        $(RM) $(RMOBJ) $(XPG4RMOBJ)
+        $(RM) $(RMOBJ) $(HASRMOBJ) $(HASPROG)
 
 lint:   lint_SRCS
 
+$(ROOTHASBIN)/%: %.has
+        $(INS.rename)
+
+FRC:
+
 include ../Makefile.targ