first pass for new make
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 12 May 1990 06:11:08 +0000 (22:11 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 12 May 1990 06:11:08 +0000 (22:11 -0800)
SCCS-vsn: usr.bin/graph/Makefile 4.6
SCCS-vsn: usr.bin/from/Makefile 5.3
SCCS-vsn: usr.bin/fold/Makefile 5.3
SCCS-vsn: usr.bin/expand/Makefile 5.4
SCCS-vsn: old/eqn/checkeq/Makefile 5.2
SCCS-vsn: old/eqn/neqn/Makefile 5.4
SCCS-vsn: old/eqn/eqn/Makefile 5.4
SCCS-vsn: old/eqn/Makefile 5.3

usr/src/old/eqn/Makefile
usr/src/old/eqn/checkeq/Makefile
usr/src/old/eqn/eqn/Makefile
usr/src/old/eqn/neqn/Makefile
usr/src/usr.bin/expand/Makefile
usr/src/usr.bin/fold/Makefile
usr/src/usr.bin/from/Makefile
usr/src/usr.bin/graph/Makefile

index 186f068..f285d1a 100644 (file)
@@ -1,28 +1,5 @@
-#
-# Copyright (c) 1988 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    5.2 (Berkeley) %G%
-#
-SUBDIR=        checkeq eqn neqn
-
-all depend clean cleandir install lint tags: FRC
-       for i in ${SUBDIR}; do \
-               (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} $@); done
+#      @(#)Makefile    5.3 (Berkeley) %G%
 
 
-${SUBDIR}: FRC
-       cd $@; make ${MFLAGS} DESTDIR=${DESTDIR}
+SUBDIR=        checkeq eqn neqn
 
 
-FRC:
+.include <bsd.subdir.mk>
index d36e8cb..16d664f 100644 (file)
@@ -1,47 +1,6 @@
-#
-# Copyright (c) 1988 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 redistribution 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 5.1 (Berkeley) %G%
-#
+#      @(#)Makefile    5.2 (Berkeley) %G%
 
 
-CFLAGS=        -O
-LIBC=  /lib/libc.a
-SRCS=  checkeq.c
-OBJS=
-MAN=
+PROG=  checkeq
+NOMAN= noman
 
 
-all: checkeq
-
-checkeq: ${LIBC}
-       ${CC} -o $@ ${CFLAGS} $@.c
-
-clean:
-       rm -f ${OBJS} core checkeq
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep -p ${CFLAGS} ${SRCS}
-
-install: ${MAN}
-       install -s -o bin -g bin -m 755 checkeq ${DESTDIR}/usr/bin
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
-
-tags: ${SRCS}
-       ctags ${SRCS}
+.include <bsd.prog.mk>
index b3a120f..101cc23 100644 (file)
@@ -1,66 +1,22 @@
-#
-# 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    5.3 (Berkeley) %G%
-#
-COMMON=        ../common_source
-CFLAGS=        -O -I. -I${COMMON}
-YFLAGS=        -d
-VPATH= ${COMMON}
-LIBC=  /lib/libc.a
-SRCS=  e.c diacrit.c eqnbox.c font.c fromto.c funny.c glob.c integral.c \
-       io.c lex.c lookup.c mark.c matrix.c move.c over.c paren.c pile.c \
-       shift.c size.c sqrt.c text.c
-OBJS=  e.o diacrit.o eqnbox.o font.o fromto.o funny.o glob.o integral.o \
-       io.o lex.o lookup.o mark.o matrix.o move.o over.o paren.o pile.o \
-       shift.o size.o sqrt.o text.o
-MAN=   eqn.0
-
-all: eqn
-
-eqn: ${OBJS} ${LIBC}
-       ${CC} -o $@ ${CFLAGS} ${OBJS}
-
-eqn.0:
-       eqn eqn.1 | nroff -h -man > $@
-
-e.c: ${COMMON}/e.y
-       ${YACC} ${YFLAGS} ${COMMON}/e.y
-       mv y.tab.h e.def
+#      @(#)Makefile    5.4 (Berkeley) %G%
+
+PROG=  eqn
+CFLAGS+=-I. -I${.CURDIR}/../common_source
+SRCS=  diacrit.c eqnbox.c font.c fromto.c funny.c glob.c integral.c io.c \
+       lex.c lookup.c mark.c matrix.c move.c over.c paren.c pile.c shift.c \
+       size.c sqrt.c text.c
+OBJS+= e.o
+.PATH: ${.CURDIR}/../common_source
+YFLAGS+=-d
+MLINKS=        eqn.1 checkeq.1 eqn.1 neqn.1
+CLEANFILES+=e.c y.tab.h
+
+e.c:
+       ${YACC} ${YFLAGS} ${.CURDIR}/../common_source/e.y
        mv y.tab.c e.c
        mv y.tab.c e.c
+       mv y.tab.h e.def
 
 
-clean:
-       rm -f ${OBJS} core e.def e.c eqn
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep ${CFLAGS} ${SRCS}
-
-install: ${MAN}
-       install -s -o bin -g bin -m 755 eqn ${DESTDIR}/usr/bin
-       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
-       rm -f ${DESTDIR}/usr/man/cat1/checkeq.0
-       rm -f ${DESTDIR}/usr/man/cat1/neqn.0
-       ln ${DESTDIR}/usr/man/cat1/eqn.0 ${DESTDIR}/usr/man/cat1/checkeq.0
-       ln ${DESTDIR}/usr/man/cat1/eqn.0 ${DESTDIR}/usr/man/cat1/neqn.0
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
+eqn.0:
+       eqn ${.CURDIR}/eqn.1 | nroff -h -man > ${.TARGET}
 
 
-tags: ${SRCS}
-       ctags ${SRCS}
+.include <bsd.prog.mk>
index f8b861e..f67666a 100644 (file)
@@ -1,57 +1,19 @@
-#
-# 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    5.3 (Berkeley) %G%
-#
-COMMON=        ../common_source
-CFLAGS=        -O -DNEQN -I. -I${COMMON}
-YFLAGS=        -d
-VPATH= ${COMMON}
-LIBC=  /lib/libc.a
-SRCS=  e.c diacrit.c eqnbox.c font.c fromto.c funny.c glob.c integral.c \
-       io.c lex.c lookup.c mark.c matrix.c move.c over.c paren.c pile.c \
-       shift.c size.c sqrt.c text.c
-OBJS=  e.o diacrit.o eqnbox.o font.o fromto.o funny.o glob.o integral.o \
-       io.o lex.o lookup.o mark.o matrix.o move.o over.o paren.o pile.o \
-       shift.o size.o sqrt.o text.o
-
-all: neqn
-
-neqn: ${OBJS} ${LIBC}
-       ${CC} -o $@ ${CFLAGS} ${OBJS}
+#      @(#)Makefile    5.4 (Berkeley) %G%
 
 
-e.c: ${COMMON}/e.y
-       ${YACC} ${YFLAGS} ${COMMON}/e.y
-       mv y.tab.h e.def
+PROG=  neqn
+CFLAGS+=-DNEQN -I. -I${.CURDIR}/../common_source
+YFLAGS=        -d
+SRCS=  diacrit.c eqnbox.c font.c fromto.c funny.c glob.c integral.c io.c \
+       lex.c lookup.c mark.c matrix.c move.c over.c paren.c pile.c shift.c \
+       size.c sqrt.c text.c
+OBJS+= e.o
+NOMAN= noman
+.PATH: ${.CURDIR}/../common_source
+CLEANFILES+=e.c y.tab.h
+
+e.c:
+       ${YACC} ${YFLAGS} ${.CURDIR}/../common_source/e.y
        mv y.tab.c e.c
        mv y.tab.c e.c
+       mv y.tab.h e.def
 
 
-clean:
-       rm -f ${OBJS} core neqn e.c e.def
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep ${CFLAGS} ${SRCS}
-
-install: ${MAN}
-       install -s -o bin -g bin -m 755 neqn ${DESTDIR}/usr/bin
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
-
-tags: ${SRCS}
-       ctags ${SRCS}
+.include <bsd.prog.mk>
index 96657f1..783cf0a 100644 (file)
@@ -1,50 +1,6 @@
-#
-# Copyright (c) 1988 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 redistribution 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 5.3 (Berkeley) %G%
-#
+#      @(#)Makefile    5.4 (Berkeley) %G%
 
 
-CFLAGS=        -O
-LIBC=  /lib/libc.a
-SRCS=  expand.c unexpand.c
-OBJS=
-MAN=   expand.0
+PROG=  expand
+MLINKS=        expand.1 unexpand.1
 
 
-all: expand unexpand
-
-expand unexpand: ${LIBC}
-       ${CC} -o $@ ${CFLAGS} $@.c
-
-clean:
-       rm -f ${OBJS} core expand unexpand
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep -p ${CFLAGS} ${SRCS}
-
-install: ${MAN}
-       install -s -o bin -g bin -m 755 expand unexpand ${DESTDIR}/usr/bin
-       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
-       rm -f ${DESTDIR}/usr/man/cat1/unexpand.0
-       ln ${DESTDIR}/usr/man/cat1/expand.0 ${DESTDIR}/usr/man/cat1/unexpand.0
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
-
-tags: ${SRCS}
-       ctags ${SRCS}
+.include <bsd.prog.mk>
index 23ebc0c..7662427 100644 (file)
@@ -1,48 +1,5 @@
-#
-# Copyright (c) 1988 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 redistribution 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 5.2 (Berkeley) %G%
-#
+#      @(#)Makefile    5.3 (Berkeley) %G%
 
 
-CFLAGS=        -O
-LIBC=  /lib/libc.a
-SRCS=  fold.c
-OBJS=
-MAN=   fold.0
+PROG=  fold
 
 
-all: fold
-
-fold: ${LIBC}
-       ${CC} -o $@ ${CFLAGS} $@.c
-
-clean:
-       rm -f ${OBJS} core fold
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep -p ${CFLAGS} ${SRCS}
-
-install: ${MAN}
-       install -s -o bin -g bin -m 755 fold ${DESTDIR}/usr/bin
-       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
-
-tags: ${SRCS}
-       ctags ${SRCS}
+.include <bsd.prog.mk>
index 4dee3b1..18dbf5f 100644 (file)
@@ -1,48 +1,5 @@
-#
-# Copyright (c) 1988 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 redistribution 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 5.2 (Berkeley) %G%
-#
+#      @(#)Makefile    5.3 (Berkeley) %G%
 
 
-CFLAGS=        -O
-LIBC=  /lib/libc.a
-SRCS=  from.c
-OBJS=
-MAN=   from.0
+PROG=  from
 
 
-all: from
-
-from: ${LIBC}
-       ${CC} -o $@ ${CFLAGS} $@.c
-
-clean:
-       rm -f ${OBJS} core from
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep -p ${CFLAGS} ${SRCS}
-
-install: ${MAN}
-       install -s -o bin -g bin -m 755 from ${DESTDIR}/usr/bin
-       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
-
-tags: ${SRCS}
-       ctags ${SRCS}
+.include <bsd.prog.mk>
index 658d315..0cdcaa6 100644 (file)
@@ -1,47 +1,7 @@
-#
-# 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    4.5 (Berkeley) %G%
-#
-CFLAGS=        -O
-LIBC=  /lib/libc.a
-SRCS=  graph.c
-OBJS=
-MAN=   graph.0
+#      @(#)Makefile    4.6 (Berkeley) %G%
 
 
-all: graph
+PROG=  graph
+DPADD= ${LIBM} ${LIBPLOT}
+LDADD= -lplot -lm
 
 
-graph: ${SRCS} ${LIBC}
-       ${CC} -o $@ ${CFLAGS} $@.c -lplot -lm
-
-clean:
-       rm -f ${OBJS} core graph
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep -p ${CFLAGS} ${SRCS}
-
-install: ${MAN}
-       install -s -o bin -g bin -m 755 graph ${DESTDIR}/usr/bin
-       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
-
-tags: ${SRCS}
-       ctags ${SRCS}
+.include <bsd.prog.mk>