summaryrefslogtreecommitdiffstats
path: root/bin/sh/Makefile
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-09-01 10:22:36 +0000
committerpeter <peter@FreeBSD.org>1996-09-01 10:22:36 +0000
commit5195be912eb257c05a0c97e561e72f01af2583ff (patch)
treee47ab3981b495c675a987dd1e943d1f4c823f314 /bin/sh/Makefile
parent2fc7d7d1fa299368ccdddede67b31695266698bd (diff)
downloadFreeBSD-src-5195be912eb257c05a0c97e561e72f01af2583ff.zip
FreeBSD-src-5195be912eb257c05a0c97e561e72f01af2583ff.tar.gz
Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a
merge of parallel duplicate work by Steve Price and myself. :-] There are some changes to the build that are my fault... mkinit.c was trying (poorly) to duplicate some of the work that make(1) is designed to do. The Makefile hackery is my fault too, the depend list was incomplete because of some explicit OBJS+= entries, so mkdep wasn't picking up their source file #includes. This closes a pile of /bin/sh PR's, but not all of them.. Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter
Diffstat (limited to 'bin/sh/Makefile')
-rw-r--r--bin/sh/Makefile64
1 files changed, 26 insertions, 38 deletions
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index cacba41..ca5b779 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -1,57 +1,45 @@
-# @(#)Makefile 8.1 (Berkeley) 6/8/93
-# $Id: Makefile,v 1.11 1996/06/02 17:06:39 phk Exp $
+# @(#)Makefile 8.4 (Berkeley) 5/5/95
+# $Id: Makefile,v 1.12 1996/06/24 04:22:21 jkh Exp $
PROG= sh
-SRCS= alias.c builtins.c cd.c echo.c error.c eval.c exec.c expand.c \
+SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
- mystring.c nodes.c options.c parser.c printf.c redir.c show.c \
- signames.c syntax.c trap.c output.c var.c
-OBJS+= init.o arith.o arith_lex.o
-DPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
-LDADD= -ll -ledit -ltermcap
+ mystring.c options.c parser.c printf.c redir.c show.c \
+ trap.c output.c var.c
+
+GENSRCS=arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
+
+SRCS= ${GENSRCS} ${SHSRCS}
+
+DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
+LDADD+= -ll -ledit -ltermcap
+
LFLAGS= -8 # 8-bit lex scanner for arithmetic
CFLAGS+=-DSHELL -I. -I${.CURDIR}
-# for debugging:
-#CFLAGS+=-g -DDEBUG=2
+
.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
-CLEANFILES+=\
- builtins.c builtins.h init.c mkinit mknodes mksignames mksyntax \
- nodes.c nodes.h signames.c signames.h syntax.c syntax.h token.def \
- y.tab.h
-.depend parser.o: token.def
-token.def: mktokens
- sh ${.CURDIR}/mktokens
+CLEANFILES+= builtins.h mkinit mknodes mksyntax \
+ nodes.h syntax.h token.h y.tab.h
+CLEANFILES+= ${GENSRCS}
-${.CURDIR}/builtins:
- # just override the default rule
+beforedepend: token.h
-builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins
- cd ${.CURDIR} && env OBJDIR=${.OBJDIR} sh mkbuiltins
+token.h: mktokens
+ sh ${.CURDIR}/mktokens
-init.c: mkinit ${SRCS}
- ./mkinit '${CC} -c ${CFLAGS} ${LDFLAGS} init.c' ${.ALLSRC}
- touch ${.TARGET}
+builtins.h builtins.c: mkbuiltins builtins.def
+ cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
-mkinit: ${.CURDIR}/mkinit.c
- ${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mkinit.c -o $@
+init.c: mkinit ${SHSRCS}
+ ./mkinit ${.ALLSRC:S/^mkinit$//}
-nodes.c nodes.h: mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
+nodes.c nodes.h: mknodes nodetypes nodes.c.pat
./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
-mknodes: ${.CURDIR}/mknodes.c
- ${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mknodes.c -o $@
-
-signames.c signames.h: mksignames
- ./mksignames
-
-mksignames: ${.CURDIR}/mksignames.c
- ${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mksignames.c -o $@
-
syntax.c syntax.h: mksyntax
./mksyntax
-mksyntax: ${.CURDIR}/mksyntax.c ${.CURDIR}/parser.h
- ${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mksyntax.c -o $@
+parser.o: token.h
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud