fix up make of fmt
[unix-history] / usr / src / usr.bin / mail / Makefile
index 2672a29..50ba282 100644 (file)
@@ -3,7 +3,7 @@
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
-#      @(#)Makefile    5.2 (Berkeley) %G%
+#      @(#)Makefile    5.3 (Berkeley) %G%
 #
 # Berkeley Mail
 #
 #
 # Berkeley Mail
 #
@@ -64,17 +64,25 @@ tags:       $(SRCS)
 
 clean:
        $(RM) -f *.o
 
 clean:
        $(RM) -f *.o
-       rm -f Mail a.out fmt x.c xs.c tags core
+       rm -f Mail a.out fmt x.c xs.c tags core xhead.c
        cp /dev/null strings
 
 lint:
        lint $(CFLAGS) $(SRCS)
 
        cp /dev/null strings
 
 lint:
        lint $(CFLAGS) $(SRCS)
 
-fmt:   fmt.c head.c
-       $(CC) fmt.c head.c -o fmt
-       $(RM) fmt.o head.o
+fmt:   fmt.o xhead.o
+       $(CC) $(CFLAGS) fmt.o xhead.o -o fmt
        size fmt
 
        size fmt
 
+fmt.o: fmt.c
+       $(CC) $(CFLAGS) -c fmt.c
+
+xhead.c:
+       ln -s head.c xhead.c
+
+xhead.o: xhead.c
+       $(CC) $(CFLAGS) -c xhead.c
+
 str.o: strings
        $(XSTR)
        $(CC) -R -c xs.c
 str.o: strings
        $(XSTR)
        $(CC) -R -c xs.c