pmake style
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 6 Jun 1990 01:57:45 +0000 (17:57 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 6 Jun 1990 01:57:45 +0000 (17:57 -0800)
SCCS-vsn: usr.bin/ex/Makefile 7.27

usr/src/usr.bin/ex/Makefile

index fe48935..1ffdef7 100644 (file)
@@ -3,86 +3,49 @@
 # 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    7.26 (Berkeley) %G%
+#      @(#)Makefile    7.27 (Berkeley) %G%
 #
 #
 # Copyright (c) 1980 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
 #
 #
 # Copyright (c) 1980 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
-#      @(#)Makefile    7.26 (Berkeley) %G%
+#      @(#)Makefile    7.27 (Berkeley) %G%
 #
 #
-#
-# Copyright (c) 1987 The Regents of the University of California.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms are permitted
-# provided that the above copyright notice and this paragraph are
-# duplicated in all such forms and that any documentation,
-# advertising materials, and other materials related to such
-# distribution and use acknowledge that the software was developed
-# by the University of California, Berkeley.  The name of the
-# University may not be used to endorse or promote products derived
-# from this software without specific prior written permission.
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-#      @(#)Makefile    7.26 (Berkeley) %G%
-#
-VERSION=3.7
-#
-# Ex skeletal makefile for VAX VM/Unix 4.2BSD
-#
-# Ex is very large - this version will not fit on PDP-11's without overlay
-# software.  Things that can be turned off to save
-# space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL
-# (visual \ nonsense on upper case only terminals), CHDIR (the undocumented
-# chdir command.)  VMUNIX makes ex considerably larger, raising many limits
-# and improving speed and simplicity of maintenance.  It is suitable only
-# for a VAX or other large machine, and then probably only in a paged system.
-#
-# Don't define VFORK unless your system has the VFORK system call,
-# which is like fork but the two processes have only one data space until the
-# child execs. This speeds up ex by saving the memory copy.
-#
-# If your system expands tabs to 4 spaces you should -DTABS=4 below
-#
-BINDIR=                /usr/bin
-LIBDIR=                /usr/libexec
-OPTIONS=       -DLISPCODE -DCHDIR -DUCVISUAL -DVFORK -DVMUNIX \
-               -DFASTTAG -DUNIX_SBRK
-CFLAGS=                -DTABS=8 -O ${OPTIONS}
-LDFLAGS=       -z                              # or -i or -n
-LIBC=          /lib/libc.a
-
-OBJS=  ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_data.o ex_extern.o \
-       ex_get.o ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o ex_tagio.o \
-       ex_temp.o ex_tty.o ex_unix.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o \
-       ex_voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
-       printf.o strings.o
-HDRS=  ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h
-SRCS=  ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c ex_data.c ex_get.c \
-       ex_io.c ex_put.c ex_re.c ex_set.c ex_subr.c ex_tagio.c ex_temp.c \
-       ex_tty.c ex_unix.c ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c \
-       ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c printf.c
-MAN=   ex.0 vi.0
+#      @(#)Makefile    7.27 (Berkeley) %G%
 
 
-.c.o:
-# ifdef VMUNIX
-       ${CC} -E ${CFLAGS} $*.c | xstr -c -
-# else
-#      mkstr - ex${VERSION}strings x $*.c
-#      ${CC} -E ${CFLAGS} x$*.c | xstr -c -
-#      rm -f x$*.c
-# endif
-       @${CC} ${CFLAGS} -c x.c
-       @mv x.o $*.o
-
-all: ex exrecover expreserve
+VERSION=3.7
 
 
-ex: ${OBJS} ${LIBC}
-       ${CC} ${LDFLAGS} -o $@ ${OBJS} -ltermcap
+# Things that can be turned off to save space:
+#      LISPCODE (-l flag, showmatch and lisp options)
+#      UCVISUAL (visual \ nonsense on upper case only terminals)
+#      CHDIR (the undocumented chdir command)
+#      CRYPT includes code to edit encrypted files (the -x option, like ed.)
+#      VMUNIX makes ex considerably larger, raising many limits and
+#              improving speed and simplicity of maintenance.
+#
+# If your system expands tabs to 4 spaces you should -DTABS=4 below.
+#
+PROG=  ex
+SUBDIR=        exrecover expreserve
+CFLAGS+=-DTABS=8 -DCRYPT -DLISPCODE -DCHDIR -DUCVISUAL -DVFORK -DVMUNIX \
+       -DFASTTAG -DUNIX_SBRK
+SRCS=  ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c ex_data.c ex_extern.c \
+       ex_get.c ex_io.c ex_put.c ex_re.c ex_set.c ex_subr.c ex_tagio.c \
+       ex_temp.c ex_tty.c ex_unix.c ex_v.c ex_vadj.c ex_vget.c ex_vmain.c \
+       ex_voper.c ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c \
+       printf.c
+BINMODE=1755
+DPADD= strings.o ${LIBTERMCAP}
+LDADD= strings.o -z -ltermcap
+MAN1=  ex.0 vi.0
+LINKS= ${BINDIR}/ex ${BINDIR}/vi ${BINDIR}/ex ${BINDIR}/view \
+       ${BINDIR}/ex ${BINDIR}/edit
+
+# If we don't have ex we can't make ex_vars.h, so don't remove it!
+CLEANFILES+=   strings
+
+SHAREDSTRINGS= sharedstrings
 
 ex_vars.h: ex_data.c
        csh makeoptions ${CFLAGS}
 
 ex_vars.h: ex_data.c
        csh makeoptions ${CFLAGS}
@@ -91,53 +54,9 @@ ex_vars.h: ex_data.c
 strings.o: strings
        xstr
        ${CC} -c -S xs.c
 strings.o: strings
        xstr
        ${CC} -c -S xs.c
-       ed - <rofix xs.s
+       ed - < ${.CURDIR}/rofix xs.s
        ${AS} -o strings.o xs.s
        rm xs.s
        ${AS} -o strings.o xs.s
        rm xs.s
+       ${CC} -c
 
 
-exrecover: exrecover.o ex_extern.o
-       ${CC} ${CFLAGS} exrecover.o ex_extern.o -o $@
-
-exrecover.o: exrecover.c
-       ${CC} ${CFLAGS} -c -O exrecover.c
-
-expreserve: expreserve.c
-       ${CC} ${CFLAGS} expreserve.c -o $@
-
-expreserve.o: expreserve.c
-       ${CC} ${CFLAGS} -c -O expreserve.c
-
-clean:
-#      If we dont have ex we cant make it so don't rm ex_vars.h
-       rm -f ex exrecover expreserve strings core errs trace
-       rm -f *.o x*.[cs]
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep ${CFLAGS} ${SRCS}
-
-# install in standard place (/usr/ucb)
-install: ${MAN}
-       rm -f ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/vi \
-               ${DESTDIR}/${BINDIR}/view ${DESTDIR}/${BINDIR}/edit
-       install -s -o bin -g bin -m 1755 ex ${DESTDIR}/${BINDIR}/ex
-       install -s -o root -m 4755 exrecover ${DESTDIR}/${LIBDIR}/ex${VERSION}recover
-       install -s -o root -m 4755 expreserve ${DESTDIR}/${LIBDIR}/ex${VERSION}preserve
-#      cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings
-       ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/edit
-       ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/view
-       ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/vi
-       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
-       lint ${CFLAGS} exrecover.c ex_extern.c
-       lint ${CFLAGS} expreserve.c
-
-tags: ${SRCS}
-       ctags ${SRCS}
-       ctags -a exrecover.c
-       ctags -a expreserve.c
-       sort -o tags tags
+.include <bsd.prog.mk>