head	1.58;
access;
symbols
	RELENG_8_4:1.58.0.2
	RELENG_9_1_0_RELEASE:1.56.2.1.4.2
	RELENG_9_1:1.56.2.1.0.4
	RELENG_9_1_BP:1.56.2.1
	RELENG_8_3_0_RELEASE:1.47.2.4.4.1
	RELENG_8_3:1.47.2.4.0.4
	RELENG_8_3_BP:1.47.2.4
	RELENG_9_0_0_RELEASE:1.56.2.1.2.1
	RELENG_9_0:1.56.2.1.0.2
	RELENG_9_0_BP:1.56.2.1
	RELENG_9:1.56.0.2
	RELENG_9_BP:1.56
	RELENG_7_4_0_RELEASE:1.46.2.3.2.1
	RELENG_8_2_0_RELEASE:1.47.2.4.2.1
	RELENG_7_4:1.46.2.3.0.2
	RELENG_7_4_BP:1.46.2.3
	RELENG_8_2:1.47.2.4.0.2
	RELENG_8_2_BP:1.47.2.4
	RELENG_8_1_0_RELEASE:1.47.2.1.4.1
	RELENG_8_1:1.47.2.1.0.4
	RELENG_8_1_BP:1.47.2.1
	RELENG_7_3_0_RELEASE:1.46.2.1.2.1
	RELENG_7_3:1.46.2.1.0.2
	RELENG_7_3_BP:1.46.2.1
	RELENG_8_0_0_RELEASE:1.47.2.1.2.1
	RELENG_8_0:1.47.2.1.0.2
	RELENG_8_0_BP:1.47.2.1
	RELENG_8:1.47.0.2
	RELENG_8_BP:1.47
	RELENG_7_2_0_RELEASE:1.46.8.1
	RELENG_7_2:1.46.0.8
	RELENG_7_2_BP:1.46
	RELENG_7_1_0_RELEASE:1.46.6.1
	RELENG_6_4_0_RELEASE:1.44.8.1.8.1
	RELENG_7_1:1.46.0.6
	RELENG_7_1_BP:1.46
	RELENG_6_4:1.44.8.1.0.8
	RELENG_6_4_BP:1.44.8.1
	RELENG_7_0_0_RELEASE:1.46
	RELENG_6_3_0_RELEASE:1.44.8.1
	RELENG_7_0:1.46.0.4
	RELENG_7_0_BP:1.46
	RELENG_6_3:1.44.8.1.0.6
	RELENG_6_3_BP:1.44.8.1
	RELENG_7:1.46.0.2
	RELENG_7_BP:1.46
	RELENG_6_2_0_RELEASE:1.44.8.1
	RELENG_6_2:1.44.8.1.0.4
	RELENG_6_2_BP:1.44.8.1
	RELENG_5_5_0_RELEASE:1.44
	RELENG_5_5:1.44.0.12
	RELENG_5_5_BP:1.44
	RELENG_6_1_0_RELEASE:1.44.8.1
	RELENG_6_1:1.44.8.1.0.2
	RELENG_6_1_BP:1.44.8.1
	RELENG_6_0_0_RELEASE:1.44
	RELENG_6_0:1.44.0.10
	RELENG_6_0_BP:1.44
	RELENG_6:1.44.0.8
	RELENG_6_BP:1.44
	RELENG_5_4_0_RELEASE:1.44
	RELENG_5_4:1.44.0.6
	RELENG_5_4_BP:1.44
	RELENG_4_11_0_RELEASE:1.30.2.2
	RELENG_4_11:1.30.2.2.0.4
	RELENG_4_11_BP:1.30.2.2
	RELENG_5_3_0_RELEASE:1.44
	RELENG_5_3:1.44.0.4
	RELENG_5_3_BP:1.44
	RELENG_5:1.44.0.2
	RELENG_5_BP:1.44
	RELENG_4_10_0_RELEASE:1.30.2.2
	RELENG_4_10:1.30.2.2.0.2
	RELENG_4_10_BP:1.30.2.2
	RELENG_5_2_1_RELEASE:1.40.4.1
	RELENG_5_2_0_RELEASE:1.40.4.1
	RELENG_5_2:1.40.0.4
	RELENG_5_2_BP:1.40
	RELENG_4_9_0_RELEASE:1.30.2.1
	RELENG_4_9:1.30.2.1.0.10
	RELENG_4_9_BP:1.30.2.1
	RELENG_5_1_0_RELEASE:1.40
	RELENG_5_1:1.40.0.2
	RELENG_5_1_BP:1.40
	RELENG_4_8_0_RELEASE:1.30.2.1
	RELENG_4_8:1.30.2.1.0.8
	RELENG_4_8_BP:1.30.2.1
	RELENG_5_0_0_RELEASE:1.38
	RELENG_5_0:1.38.0.2
	RELENG_5_0_BP:1.38
	RELENG_4_7_0_RELEASE:1.30.2.1
	RELENG_4_7:1.30.2.1.0.6
	RELENG_4_7_BP:1.30.2.1
	RELENG_4_6_2_RELEASE:1.30.2.1
	RELENG_4_6_1_RELEASE:1.30.2.1
	RELENG_4_6_0_RELEASE:1.30.2.1
	RELENG_4_6:1.30.2.1.0.4
	RELENG_4_6_BP:1.30.2.1
	RELENG_4_5_0_RELEASE:1.30.2.1
	RELENG_4_5:1.30.2.1.0.2
	RELENG_4_5_BP:1.30.2.1
	RELENG_4_4_0_RELEASE:1.30
	RELENG_4_4:1.30.0.6
	RELENG_4_4_BP:1.30
	RELENG_4_3_0_RELEASE:1.30
	RELENG_4_3:1.30.0.4
	RELENG_4_3_BP:1.30
	RELENG_4_2_0_RELEASE:1.30
	RELENG_4_1_1_RELEASE:1.30
	PRE_SMPNG:1.30
	RELENG_4_1_0_RELEASE:1.30
	RELENG_3_5_0_RELEASE:1.28.2.2
	RELENG_4_0_0_RELEASE:1.30
	RELENG_4:1.30.0.2
	RELENG_4_BP:1.30
	RELENG_3_4_0_RELEASE:1.28.2.2
	RELENG_3_3_0_RELEASE:1.28.2.1
	RELENG_3_2_PAO:1.28.0.4
	RELENG_3_2_PAO_BP:1.28
	RELENG_3_2_0_RELEASE:1.28
	RELENG_3_1_0_RELEASE:1.28
	RELENG_3:1.28.0.2
	RELENG_3_BP:1.28
	RELENG_2_2_8_RELEASE:1.15.2.3
	RELENG_3_0_0_RELEASE:1.28
	RELENG_2_2_7_RELEASE:1.15.2.3
	RELENG_2_2_6_RELEASE:1.15.2.3
	RELENG_2_2_5_RELEASE:1.15.2.2
	RELENG_2_2_2_RELEASE:1.15
	RELENG_2_2_1_RELEASE:1.15
	RELENG_2_2_0_RELEASE:1.15
	RELENG_2_1_7_RELEASE:1.7.6.4
	RELENG_2_1_6_1_RELEASE:1.7.6.4
	RELENG_2_1_6_RELEASE:1.7.6.4
	RELENG_2_2:1.15.0.2
	RELENG_2_2_BP:1.15
	RELENG_2_1_5_RELEASE:1.7.6.4
	bsd_44_lite_2:1.1.1.2
	RELENG_2_1_0_RELEASE:1.7
	RELENG_2_1_0:1.7.0.6
	RELENG_2_1_0_BP:1.7
	RELENG_2_0_5_RELEASE:1.7
	RELENG_2_0_5:1.7.0.4
	RELENG_2_0_5_BP:1.7
	RELENG_2_0_5_ALPHA:1.7
	RELEASE_2_0:1.7
	BETA_2_0:1.7
	ALPHA_2_0:1.7.0.2
	bsd_44_lite:1.1.1.1
	CSRG:1.1.1;
locks; strict;
comment	@# @;


1.58
date	2012.11.17.01.48.31;	author svnexp;	state Exp;
branches
	1.58.2.1;
next	1.57;

1.57
date	2012.05.24.19.48.15;	author marcel;	state Exp;
branches;
next	1.56;

1.56
date	2011.02.08.23.18.06;	author jilles;	state Exp;
branches
	1.56.2.1;
next	1.55;

1.55
date	2010.12.21.22.47.34;	author jilles;	state Exp;
branches;
next	1.54;

1.54
date	2010.11.19.12.56.13;	author jilles;	state Exp;
branches;
next	1.53;

1.53
date	2010.10.13.23.31.17;	author obrien;	state Exp;
branches;
next	1.52;

1.52
date	2010.10.13.22.18.03;	author obrien;	state Exp;
branches;
next	1.51;

1.51
date	2010.10.13.18.23.43;	author obrien;	state Exp;
branches;
next	1.50;

1.50
date	2010.10.13.13.17.38;	author jhb;	state Exp;
branches;
next	1.49;

1.49
date	2010.10.12.19.24.41;	author obrien;	state Exp;
branches;
next	1.48;

1.48
date	2010.10.12.18.20.38;	author obrien;	state Exp;
branches;
next	1.47;

1.47
date	2007.11.18.01.53.07;	author jb;	state Exp;
branches
	1.47.2.1;
next	1.46;

1.46
date	2006.04.17.17.55.11;	author schweikh;	state Exp;
branches
	1.46.2.1
	1.46.6.1
	1.46.8.1;
next	1.45;

1.45
date	2005.08.14.07.46.56;	author stefanf;	state Exp;
branches;
next	1.44;

1.44
date	2004.03.18.10.55.47;	author ru;	state Exp;
branches
	1.44.8.1;
next	1.43;

1.43
date	2004.02.23.20.05.14;	author johan;	state Exp;
branches;
next	1.42;

1.42
date	2004.02.05.22.44.20;	author ru;	state Exp;
branches;
next	1.41;

1.41
date	2004.01.20.13.13.40;	author ru;	state Exp;
branches;
next	1.40;

1.40
date	2003.05.02.06.26.32;	author obrien;	state Exp;
branches
	1.40.4.1;
next	1.39;

1.39
date	2003.05.02.06.24.51;	author obrien;	state Exp;
branches;
next	1.38;

1.38
date	2002.10.01.12.12.45;	author mux;	state Exp;
branches;
next	1.37;

1.37
date	2002.10.01.08.55.28;	author tjr;	state Exp;
branches;
next	1.36;

1.36
date	2002.10.01.07.26.35;	author tjr;	state Exp;
branches;
next	1.35;

1.35
date	2002.02.04.02.49.19;	author kris;	state Exp;
branches;
next	1.34;

1.34
date	2001.12.04.01.57.46;	author obrien;	state Exp;
branches;
next	1.33;

1.33
date	2001.11.20.18.41.01;	author knu;	state Exp;
branches;
next	1.32;

1.32
date	2001.11.20.18.33.58;	author knu;	state Exp;
branches;
next	1.31;

1.31
date	2001.11.17.19.10.10;	author knu;	state Exp;
branches;
next	1.30;

1.30
date	99.09.08.15.40.43;	author sheldonh;	state Exp;
branches
	1.30.2.1;
next	1.29;

1.29
date	99.08.27.23.15.06;	author peter;	state Exp;
branches;
next	1.28;

1.28
date	98.07.07.01.06.58;	author bde;	state Exp;
branches
	1.28.2.1;
next	1.27;

1.27
date	98.05.06.15.33.59;	author bde;	state Exp;
branches;
next	1.26;

1.26
date	98.05.05.07.36.55;	author bde;	state Exp;
branches;
next	1.25;

1.25
date	98.05.04.20.09.00;	author bde;	state Exp;
branches;
next	1.24;

1.24
date	98.04.26.16.12.23;	author bde;	state Exp;
branches;
next	1.23;

1.23
date	97.10.05.09.38.43;	author jkh;	state Exp;
branches;
next	1.22;

1.22
date	97.08.25.19.50.01;	author bde;	state Exp;
branches;
next	1.21;

1.21
date	97.05.21.03.23.23;	author steve;	state Exp;
branches;
next	1.20;

1.20
date	97.05.19.00.29.29;	author steve;	state Exp;
branches;
next	1.19;

1.19
date	97.05.19.00.16.27;	author steve;	state Exp;
branches;
next	1.18;

1.18
date	97.04.28.03.03.23;	author steve;	state Exp;
branches;
next	1.17;

1.17
date	97.02.22.13.58.19;	author peter;	state Exp;
branches;
next	1.16;

1.16
date	97.01.14.05.32.47;	author jkh;	state Exp;
branches;
next	1.15;

1.15
date	96.10.25.14.49.24;	author bde;	state Exp;
branches
	1.15.2.1;
next	1.14;

1.14
date	96.09.01.10.27.49;	author peter;	state Exp;
branches;
next	1.13;

1.13
date	96.09.01.10.19.18;	author peter;	state Exp;
branches;
next	1.12;

1.12
date	96.06.24.04.22.21;	author jkh;	state Exp;
branches;
next	1.11;

1.11
date	96.06.02.17.06.39;	author phk;	state Exp;
branches;
next	1.10;

1.10
date	96.05.30.20.52.24;	author phk;	state Exp;
branches;
next	1.9;

1.9
date	96.02.03.13.27.54;	author joerg;	state Exp;
branches;
next	1.8;

1.8
date	95.08.27.20.26.40;	author joerg;	state Exp;
branches;
next	1.7;

1.7
date	94.10.02.01.36.03;	author ache;	state Exp;
branches
	1.7.6.1;
next	1.6;

1.6
date	94.09.24.02.57.18;	author davidg;	state Exp;
branches;
next	1.5;

1.5
date	94.08.28.18.47.22;	author bde;	state Exp;
branches;
next	1.4;

1.4
date	94.08.21.10.44.51;	author bde;	state Exp;
branches;
next	1.3;

1.3
date	94.05.30.13.59.50;	author rgrimes;	state Exp;
branches;
next	1.2;

1.2
date	94.05.29.12.43.06;	author rgrimes;	state Exp;
branches;
next	1.1;

1.1
date	94.05.26.06.18.39;	author rgrimes;	state Exp;
branches
	1.1.1.1;
next	;

1.58.2.1
date	2012.11.17.01.48.31;	author svnexp;	state dead;
branches;
next	1.58.2.2;

1.58.2.2
date	2013.03.28.13.00.05;	author svnexp;	state Exp;
branches;
next	;

1.56.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.56.2.1.2.1
	1.56.2.1.4.1;
next	1.56.2.2;

1.56.2.2
date	2012.11.17.11.36.04;	author svnexp;	state Exp;
branches;
next	;

1.56.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.56.2.1.2.2;

1.56.2.1.2.2
date	2012.11.17.08.36.05;	author svnexp;	state Exp;
branches;
next	;

1.56.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.56.2.1.4.2;

1.56.2.1.4.2
date	2012.11.17.08.46.53;	author svnexp;	state Exp;
branches;
next	;

1.47.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.47.2.1.2.1
	1.47.2.1.4.1;
next	1.47.2.2;

1.47.2.2
date	2010.10.19.23.57.34;	author obrien;	state Exp;
branches;
next	1.47.2.3;

1.47.2.3
date	2010.10.20.07.32.25;	author obrien;	state Exp;
branches;
next	1.47.2.4;

1.47.2.4
date	2010.10.20.07.54.43;	author obrien;	state Exp;
branches
	1.47.2.4.2.1
	1.47.2.4.4.1;
next	1.47.2.5;

1.47.2.5
date	2012.11.17.10.35.49;	author svnexp;	state Exp;
branches;
next	;

1.47.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.47.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.47.2.4.2.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.47.2.4.4.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.47.2.4.4.2;

1.47.2.4.4.2
date	2012.11.17.08.24.31;	author svnexp;	state Exp;
branches;
next	;

1.46.2.1
date	2009.06.09.14.07.29;	author des;	state Exp;
branches
	1.46.2.1.2.1;
next	1.46.2.2;

1.46.2.2
date	2010.10.22.17.49.11;	author obrien;	state Exp;
branches;
next	1.46.2.3;

1.46.2.3
date	2010.10.22.23.12.45;	author obrien;	state Exp;
branches
	1.46.2.3.2.1;
next	1.46.2.4;

1.46.2.4
date	2012.11.17.08.00.49;	author svnexp;	state Exp;
branches;
next	;

1.46.2.1.2.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.46.2.3.2.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.46.2.3.2.2;

1.46.2.3.2.2
date	2012.11.17.08.16.32;	author svnexp;	state Exp;
branches;
next	;

1.46.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.46.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.44.8.1
date	2005.11.06.20.39.47;	author stefanf;	state Exp;
branches
	1.44.8.1.8.1;
next	1.44.8.2;

1.44.8.2
date	2012.11.17.07.38.37;	author svnexp;	state Exp;
branches;
next	;

1.44.8.1.8.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.40.4.1
date	2003.12.07.04.03.59;	author scottl;	state Exp;
branches;
next	;

1.30.2.1
date	2001.12.15.10.05.18;	author knu;	state Exp;
branches;
next	1.30.2.2;

1.30.2.2
date	2004.03.22.07.40.12;	author ru;	state Exp;
branches;
next	1.30.2.3;

1.30.2.3
date	2012.11.17.07.22.04;	author svnexp;	state Exp;
branches;
next	;

1.28.2.1
date	99.08.29.14.13.35;	author peter;	state Exp;
branches;
next	1.28.2.2;

1.28.2.2
date	99.12.10.13.03.01;	author sheldonh;	state Exp;
branches;
next	;

1.15.2.1
date	97.08.25.09.09.28;	author jkh;	state Exp;
branches;
next	1.15.2.2;

1.15.2.2
date	97.08.25.21.16.13;	author jkh;	state Exp;
branches;
next	1.15.2.3;

1.15.2.3
date	97.10.26.22.46.55;	author jkh;	state Exp;
branches;
next	1.15.2.4;

1.15.2.4
date	99.09.05.10.59.52;	author peter;	state Exp;
branches;
next	;

1.7.6.1
date	95.12.11.23.04.38;	author joerg;	state Exp;
branches;
next	1.7.6.2;

1.7.6.2
date	96.05.29.22.20.55;	author jkh;	state Exp;
branches;
next	1.7.6.3;

1.7.6.3
date	96.06.05.02.36.21;	author jkh;	state Exp;
branches;
next	1.7.6.4;

1.7.6.4
date	96.06.25.14.37.44;	author joerg;	state Exp;
branches;
next	1.7.6.5;

1.7.6.5
date	99.09.05.11.01.44;	author peter;	state Exp;
branches;
next	;

1.1.1.1
date	94.05.26.06.18.40;	author rgrimes;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	96.05.27.01.40.26;	author peter;	state Exp;
branches;
next	;


desc
@@


1.58
log
@Switching exporter and resync
@
text
@#	@@(#)Makefile	8.4 (Berkeley) 5/5/95
# $FreeBSD: head/bin/sh/Makefile 235927 2012-05-24 19:48:15Z marcel $

PROG=	sh
INSTALLFLAGS= -S
SHSRCS=	alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
	exec.c expand.c \
	histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
	mystring.c options.c output.c parser.c printf.c redir.c show.c \
	test.c trap.c var.c
GENSRCS= builtins.c init.c nodes.c syntax.c
GENHDRS= builtins.h nodes.h syntax.h token.h
SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}

# MLINKS for Shell built in commands for which there are no userland
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.

DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcap

CFLAGS+=-DSHELL -I. -I${.CURDIR}
# for debug:
# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
WARNS?=	2
WFORMAT=0

.PATH:	${.CURDIR}/bltin \
	${.CURDIR}/../kill \
	${.CURDIR}/../test \
	${.CURDIR}/../../usr.bin/printf

CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
	mksyntax mksyntax.o
CLEANFILES+= ${GENSRCS} ${GENHDRS}

build-tools: mkinit mknodes mksyntax

.ORDER: builtins.c builtins.h
builtins.c builtins.h: mkbuiltins builtins.def
	sh ${.CURDIR}/mkbuiltins ${.CURDIR}

init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
	redir.c trap.c var.c
	./mkinit ${.ALLSRC:S/^mkinit$//}

# XXX this is just to stop the default .c rule being used, so that the
# intermediate object has a fixed name.
# XXX we have a default .c rule, but no default .o rule.
.o:
	${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
mkinit: mkinit.o
mknodes: mknodes.o
mksyntax: mksyntax.o

.ORDER: nodes.c nodes.h
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
	./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat

.ORDER: syntax.c syntax.h
syntax.c syntax.h: mksyntax
	./mksyntax

token.h: mktokens
	sh ${.CURDIR}/mktokens

regress:
	cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh

.include <bsd.prog.mk>
@


1.58.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:00:05 +0000
@
text
@d1 70
@


1.58.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 68
#	@@(#)Makefile	8.4 (Berkeley) 5/5/95
# $FreeBSD: releng/8.4/bin/sh/Makefile 214104 2010-10-20 07:54:43Z obrien $

PROG=	sh
INSTALLFLAGS= -S
SHSRCS=	alias.c arith.y arith_lex.l 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 options.c output.c parser.c redir.c show.c \
	test.c trap.c var.c
GENSRCS= builtins.c init.c nodes.c syntax.c
GENHDRS= builtins.h nodes.h syntax.h token.h
SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} y.tab.h

# MLINKS for Shell built in commands for which there are no userland
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.

DPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ll -ledit -ltermcap

LFLAGS= -8	# 8-bit lex scanner for arithmetic
CFLAGS+=-DSHELL -I. -I${.CURDIR}
# for debug:
# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
WARNS?=	2
WFORMAT=0

.PATH:	${.CURDIR}/bltin \
	${.CURDIR}/../test

CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
	mksyntax mksyntax.o
CLEANFILES+= ${GENSRCS} ${GENHDRS}

build-tools: mkinit mknodes mksyntax

.ORDER: builtins.c builtins.h
builtins.c builtins.h: mkbuiltins builtins.def
	cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}

init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
	redir.c trap.c var.c
	./mkinit ${.ALLSRC:S/^mkinit$//}

# XXX this is just to stop the default .c rule being used, so that the
# intermediate object has a fixed name.
# XXX we have a default .c rule, but no default .o rule.
.o:
	${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
mkinit: mkinit.o
mknodes: mknodes.o
mksyntax: mksyntax.o

.ORDER: nodes.c nodes.h
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
	./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat

.ORDER: syntax.c syntax.h
syntax.c syntax.h: mksyntax
	./mksyntax

token.h: mktokens
	sh ${.CURDIR}/mktokens

regress:
	cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh

.include <bsd.prog.mk>
@


1.57
log
@SVN rev 235927 on 2012-05-24 19:48:15Z by marcel

Work better with how make/bmake works:
1.  Avoid a cd back into ${.CURDIR} to run mkbuiltins when we know make
    will first cd into ${.OBJDIR}. Keep the cwd to what make sets it to.
2.  Don't tell mkbuiltins where to write to (= ${.OBJDIR}), but where to
    get sources from (= ${.CURDIR}). This to compensate for point 1.

This fixes a problem with bmake's mk files that optimize ${.OBJDIR} to
expand to "." after changing cwd, not taking into account that the
target is pretty much undoing that and not getting the full path to the
object tree anymore.
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.56
log
@SVN rev 218466 on 2011-02-08 23:18:06Z by jilles

sh: Import arithmetic expression code from dash.

New features:
* proper lazy evaluation of || and &&
* ?: ternary operator
* executable is considerably smaller (8K on i386) because lex and yacc are
  no longer used

Differences from dash:
* arith_t instead of intmax_t
* imaxdiv() not used
* unset or null variables default to 0
* let/exp builtin (undocumented, will probably be removed later)

Obtained from:	dash
@
text
@d41 1
a41 1
	cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
@


1.56.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.56.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/9/bin/sh/Makefile 218466 2011-02-08 23:18:06Z jilles $
@


1.56.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.56.2.1.4.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.1/bin/sh/Makefile 218466 2011-02-08 23:18:06Z jilles $
@


1.56.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.56.2.1.2.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.0/bin/sh/Makefile 218466 2011-02-08 23:18:06Z jilles $
@


1.55
log
@SVN rev 216629 on 2010-12-21 22:47:34Z by jilles

sh: Add kill builtin.

This allows specifying a %job (which is equivalent to the corresponding
process group).

Additionally, it improves reliability of kill from sh in high-load
situations and ensures "kill" finds the correct utility regardless of PATH,
as required by POSIX (unless the undocumented %builtin mechanism is used).

Side effect: fatal errors (any error other than kill(2) failure) now return
exit status 2 instead of 1. (This is consistent with other sh builtins, but
not in NetBSD.)

Code size increases about 1K on i386.

Obtained from:	NetBSD
@
text
@d6 2
a7 1
SHSRCS=	alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \
d13 1
a13 1
SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} y.tab.h
d19 2
a20 2
DPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ll -ledit -ltermcap
a21 1
LFLAGS= -8	# 8-bit lex scanner for arithmetic
@


1.54
log
@SVN rev 215520 on 2010-11-19 12:56:13Z by jilles

sh: Add printf builtin.

This was removed in 2001 but I think it is appropriate to add it back:
* I do not want to encourage people to write fragile and non-portable echo
  commands by making printf much slower than echo.
* Recent versions of Autoconf use it a lot.
* Almost no software still wants to support systems that do not have
  printf(1) at all.
* In many other shells printf is already a builtin.

Side effect: printf is now always the builtin version (which behaves
identically to /usr/bin/printf) and cannot be overridden via PATH (except
via the undocumented %builtin mechanism).

Code size increases about 5K on i386. Embedded folks might want to replace
/usr/bin/printf with a hard link to /usr/bin/alias.
@
text
@d7 1
a7 1
	histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
d29 1
@


1.53
log
@SVN rev 213815 on 2010-10-13 23:31:17Z by obrien

We only need to look as far as '..' to find 'test/'.
@
text
@d8 1
a8 1
	mystring.c options.c output.c parser.c redir.c show.c \
d29 2
a30 1
	${.CURDIR}/../test
@


1.52
log
@SVN rev 213811 on 2010-10-13 22:18:03Z by obrien

In the spirit of r90111, depend on c89 and remove the "STATIC" macro
and its usage.
@
text
@d29 1
a29 1
	${.CURDIR}/../../bin/test
@


1.51
log
@SVN rev 213798 on 2010-10-13 18:23:43Z by obrien

If one wishes to set breakpoints of static the functions here, they
cannot be inlined.

Submitted by:	jhb
@
text
@d24 1
a24 1
# DEBUG_FLAGS+= -g -DDEBUG=3 -fno-inline
@


1.50
log
@SVN rev 213774 on 2010-10-13 13:17:38Z by jhb

Suggest that DEBUG_FLAGS be used to enable extra debugging rather than
frobbing CFLAGS directly.  DEBUG_FLAGS is something that can be specified
on the make command line without having to edit the Makefile directly.

Submitted by:	Garrett Cooper
@
text
@d24 1
a24 1
# DEBUG_FLAGS+= -g -DDEBUG=3
@


1.49
log
@SVN rev 213744 on 2010-10-12 19:24:41Z by obrien

If DEBUG is 3 or greater, disable STATICization of functions.
Also correct the documented location of the trace file.
@
text
@d24 1
a24 1
# CFLAGS+= -g -DDEBUG=3
@


1.48
log
@SVN rev 213738 on 2010-10-12 18:20:38Z by obrien

Allow one to regression test 'sh' changes without having to install
a potentially bad /bin/sh first.
@
text
@d24 1
a24 1
# CFLAGS+= -g -DDEBUG=2
@


1.47
log
@Reduce the WARNS level to avoid a compiler warning about a variable
possibly being clobbered by a longjmp or a fork with gcc4.
@
text
@d65 3
@


1.47.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.47.2.2
log
@SVN rev 214088 on 2010-10-19 23:57:34Z by obrien

MFC r213738: allow one to regression test 'sh' changes without having to
             install a potentially bad /bin/sh first.
@
text
@a64 3
regress:
	cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh

@


1.47.2.3
log
@SVN rev 214100 on 2010-10-20 07:32:25Z by obrien

MFC r213815: only need to look as far as '..' to find 'test/'
@
text
@d29 1
a29 1
	${.CURDIR}/../test
@


1.47.2.4
log
@SVN rev 214104 on 2010-10-20 07:54:43Z by obrien

MFC:
  r213774: DEBUG_FLAGS should be used to enable extra debugging rather than
           frobbing CFLAGS directly.
  r213798: do not inline static functions if debugging
@
text
@d24 1
a24 1
# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
@


1.47.2.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/8/bin/sh/Makefile 214104 2010-10-20 07:54:43Z obrien $
@


1.47.2.4.4.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.47.2.4.4.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/8.3/bin/sh/Makefile 214104 2010-10-20 07:54:43Z obrien $
@


1.47.2.4.2.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.47.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.47.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.46
log
@Whitespace nits.
@
text
@d25 1
a25 1
WARNS?=	3
@


1.46.2.1
log
@SVN rev 193831 on 2009-06-09 14:07:29Z by des

merge r173718: reduce WARNS due to too many "variable might be clobbered
by longjmp" false positives.
@
text
@d25 1
a25 1
WARNS?=	2
@


1.46.2.2
log
@SVN rev 214208 on 2010-10-22 17:49:11Z by obrien

MFC
  r212243: improve comments in expand.c
  r214100: MFC r213815: only need to look as far as '..' to find 'test/'
  r214104:
    r213774: DEBUG_FLAGS should be used to enable extra debugging rather than
             frobbing CFLAGS directly.
    r213798: do not inline static functions if debugging
@
text
@d24 1
a24 1
# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
d29 1
a29 1
	${.CURDIR}/../test
@


1.46.2.3
log
@SVN rev 214230 on 2010-10-22 23:12:45Z by obrien

MFC
  r213738: allow one to regression test 'sh' changes without having to
           install a potentially bad /bin/sh first.
  r213903: default to 'sh' from PATH if 'SH' env is not set.
@
text
@a64 3
regress:
	cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh

@


1.46.2.4
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/7/bin/sh/Makefile 214230 2010-10-22 23:12:45Z obrien $
@


1.46.2.3.2.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.46.2.3.2.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/7.4/bin/sh/Makefile 214230 2010-10-22 23:12:45Z obrien $
@


1.46.2.1.2.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.46.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.46.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.45
log
@Recent cleanups made it possible to bump WARNS to 3.
@
text
@d16 1
a16 1
# builtin.1 in share/man/man1/.  
@


1.44
log
@Install /bin/sh safely.  This allows a shell script to be used
to strip binaries by specifying it in the STRIPBIN environment
variable honoured by install(1).

MFC after:	3 days
@
text
@d25 1
a25 1
WARNS?=	0
@


1.44.8.1
log
@Sync with HEAD's code:
- Support for command -v and -V.
- Fixes for the errexit option.
- A fix for a crash caused by SIGINT.
- POSIX compliant set +o ouput.
- A fix for unalias' exit code.
- Man page updates.
- Code cleanups, WARNS 3.
@
text
@d25 1
a25 1
WARNS?=	3
@


1.44.8.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/6/bin/sh/Makefile 152141 2005-11-06 20:39:48Z stefanf $
@


1.44.8.1.8.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.43
log
@style.Makefile:
	Use WARNS?= instead of WARNS=
@
text
@d5 1
@


1.42
log
@Fixed style of DPADD and LDADD assignments as per style.Makefile(5).
@
text
@d24 1
a24 1
WARNS=	0
@


1.41
log
@Removed duplicate y.tab.h from SRCS and CLEANFILES.
@
text
@d17 2
a18 2
DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
LDADD+= -ll -ledit -ltermcap
@


1.40
log
@[Grrr, editor exited too early]
Rev 1.39 sets WARNS=WFORMAT=0 because of the explanation given.
@
text
@d10 1
a10 1
GENHDRS= builtins.h nodes.h syntax.h token.h y.tab.h
@


1.40.4.1
log
@Fix up sh(1) for the release.
@
text
@a11 1
NOSHARED?= yes
@


1.39
log
@The is_name and is_in_name macros are FUBAR'ed.
Due to the use of signed vs. unsigned chars on our various platforms, one gets
"warning: comparison is always true due to limited range of data type"
from GCC 3.3.
@
text
@@


1.38
log
@It is now safe to remove WARNS=0 and WFORMAT=0.

Tested on:	alpha, i386, sparc64
@
text
@d24 2
@


1.37
log
@Add back WARNS=0 and WFORMAT=0; gcc is finding nonexistent format string
errors with %qd formats.
@
text
@a23 2
WARNS=	0
WFORMAT=0
@


1.36
log
@Remove WARNS=0 and WFORMAT=0. The shell compiles cleanly at WARNS=2
on at least i386. If there are warnings on other archs, I'd rather hear
about them than pretend they didn't exist.
@
text
@d24 2
@


1.35
log
@Lock down with WFORMAT=1 except those directories with unfixed warnings.
Tested on i386 and alpha.
@
text
@a23 2
WARNS=	0
WFORMAT=0
@


1.34
log
@Default to WARNS=2.  Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by:	mike
@
text
@d25 1
@


1.33
log
@(null commit to correct the previous log message)

Now that all the printf invocations from within the system startup
scripts *have been replaced with equivalent handmade functions*, we
can safely remove it.

Please steal the technique from src/etc/MAKEDEV when you want to use
printf(1) functionality from within the system rc scripts.
@
text
@d24 1
@


1.32
log
@Remove the printf builtin command from sh(1), which command is not
used so often that it's worth keeping it as a builtin.

Now that all the printf invocations from within the system startup
scripts, we can safely remove it.

Urged by:	sheldonh  :)

No MFC is planned so far because it may break compatibility and
violate POLA.
@
text
@@


1.31
log
@Make test(1) a builtin command of our sh(1) for efficiency.  The
binary size increase is 3,784 bytes (about 0.6%).

I don't drop the printf builtin while I'm here because some /etc/rc.*
scripts seem to use it before mounting /usr where printf(1) resides.

Reviewed by:	arch (sheldonh)
Inspired by:	NetBSD, ksh
Clued by:	ume (on how the printf builtin is used)
@
text
@d7 1
a7 1
	mystring.c options.c output.c parser.c printf.c redir.c show.c \
d26 1
a26 2
	${.CURDIR}/../../bin/test \
	${.CURDIR}/../../usr.bin/printf
@


1.30
log
@Improve shell documentation:

* Consistently misspell built-in as builtin.

* Add a builtin(1) manpage and create builtin(1) MLINKS for all shell
  builtin commands for which no standalone utility exists.  These MLINKS
  replace those that were created for csh(1).

* Add appropriate xrefs for builtin(1) to the csh(1) and sh(1) manpages,
  as well as to the manpages of standalone utilities which are supported
  as shell builtin commands in at least one of the shells. In such
  manpages, explain that similar functionality may be provided as a
  shell builtin command.

* Improve sh(1)'s description of the cd builtin command. Csh(1) already
  describes it adequately. Replace the cd(1) manpage with a builtin(1)
  MLINKS link.

* Clean up some mdoc problems: use Xr instead of literal "foo(n)"; use
  Ic instead of Xr for shell builtin commands.

* Undo English contractions.

Reviewed by:	mpp, rgrimes
@
text
@d2 1
a2 1
# $FreeBSD: src/bin/sh/Makefile,v 1.29 1999/08/27 23:15:06 peter Exp $
d8 1
a8 1
	trap.c var.c
d25 3
a27 1
.PATH:	${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
@


1.30.2.1
log
@MFC: Make test(1) a builtin command of sh(1).

bin/sh/Makefile          rev. 1.31
bin/sh/builtins.def      rev. 1.8
  - Add test as builtin.

share/man/man1/builtin.1 rev. 1.14-1.15
bin/sh/sh.1              rev. 1.56
  - Add proper cross references.

bin/test/test.c          rev. 1.32-1.35
  - Fix style bugs I found, and add a comment.
  - Do not reference argv[1] if no argument is given.
  - Call error() instead of errx() if compiled as sh(1) builtin.
@
text
@d2 1
a2 1
# $FreeBSD$
d8 1
a8 1
	test.c trap.c var.c
d25 1
a25 3
.PATH:	${.CURDIR}/bltin \
	${.CURDIR}/../../usr.bin/printf \
	${.CURDIR}/../../bin/test
@


1.30.2.2
log
@MFC: install /bin/sh in safe mode thus allowing the use of
shell scripts to strip binaries during installworld.
@
text
@a4 1
INSTALLFLAGS= -S
@


1.30.2.3
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/4/bin/sh/Makefile 127296 2004-03-22 07:40:12Z ru $
@


1.29
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
d12 4
@


1.28
log
@Added a `build-tools' target for internal tools.

Removed explicit dependencies of foo.o on foo.c.  These were mainly
placeholders for comments about missing dependencies of tools objects
on headers.  This problem needs to be handled more generally.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.27 1998/05/06 15:33:59 bde Exp $
@


1.28.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.28.2.2
log
@MFC: Incorporate the builtin.1 manpage and its MLINKS.
     Remove the cd(1) and wait(1) manual pages (for which MLINKS are
	created instead.
     Fix some mark-up issues in csh(1) and add a builtin(1) xref to
	csh.1.
@
text
@d2 1
a2 1
# $FreeBSD: src/bin/sh/Makefile,v 1.28.2.1 1999/08/29 14:13:35 peter Exp $
a11 4

# MLINKS for Shell built in commands for which there are no userland
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.  
@


1.27
log
@Backed out previous backout.  Put y.tab.h back in SRCS.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.26 1998/05/05 07:36:55 bde Exp $
d27 2
a42 1
mkinit.o: mkinit.c		# XXX and many headers
a43 1
mknodes.o: mknodes.c		# XXX and many headers
a44 1
mksyntax.o: mksyntax.c		# XXX and many headers
@


1.26
log
@Backed out previous commit.  It was tested, but not for the case where
a separate object tree doesn't exist.  Crufty makefiles will have to
put y.tab.h in SRCS so that we know not to create foo.h from foo.y.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.25 1998/05/04 20:09:00 bde Exp $
d5 1
a5 1
SHSRCS=	alias.c cd.c echo.c error.c eval.c exec.c expand.c \
d9 3
a11 3
GENSRCS= arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
GENHDRS= builtins.h nodes.h syntax.h token.h
SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
d24 1
a24 2
	mksyntax mksyntax.o \
	y.tab.h
a26 1

a56 2

y.tab.h: arith.c
@


1.25
log
@Fixed races in `make -jN' using new yacc rules.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.24 1998/04/26 16:12:23 bde Exp $
d5 1
a5 1
SHSRCS=	alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \
d9 1
a9 1
GENSRCS= builtins.c init.c nodes.c syntax.c
d24 2
a25 1
	mksyntax mksyntax.o
d28 1
d59 2
@


1.24
log
@Backed out most of rev.1.19 (explicit dependencies of object files
on generated headers).  This is now handled generally in bsd.prog.mk.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.23 1997/10/05 09:38:43 jkh Exp $
d5 1
a5 1
SHSRCS=	alias.c cd.c echo.c error.c eval.c exec.c expand.c \
d9 1
a9 1
GENSRCS= arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
d24 1
a24 2
	mksyntax mksyntax.o \
	y.tab.h
a26 1

a56 2

y.tab.h: arith.c
@


1.23
log
@Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@@nnd.itfs.nsk.su>
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.22 1997/08/25 19:50:01 bde Exp $
a60 18

# Rules for object files that rely on generated headers.
arith_lex.o: y.tab.h
cd.o: nodes.h
eval.o: builtins.h nodes.h syntax.h
exec.o: builtins.h nodes.h syntax.h
expand.o: nodes.h syntax.h
input.o: syntax.h
jobs.o: nodes.h syntax.h
main.o: nodes.h
mystring.o: syntax.h
options.o: nodes.h
output.o: syntax.h
parser.o: nodes.h syntax.h token.h
redir.o: nodes.h
show.o: nodes.h
trap.o: nodes.h syntax.h
var.o: nodes.h syntax.h
@


1.22
log
@Restored clobbered parts of rev.1.15 (build intermediate object files
for tools).
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.21 1997/05/21 03:23:23 steve Exp $
d10 2
a11 1
SRCS=	${SHSRCS} ${GENSRCS}
d23 1
a23 1
CLEANFILES+= builtins.h mkinit mkinit.o mknodes mknodes.o \
d25 2
a26 2
	nodes.h syntax.h token.h y.tab.h
CLEANFILES+= ${GENSRCS}
a27 1
beforedepend: builtins.h nodes.h syntax.h token.h
d29 1
d49 1
d53 1
@


1.21
log
@Remove y.tab.h from the beforedepend target.  Also add a
rule that shows the dependency of arith_lex.[co] on y.tab.h.

Suggested by: Bruce Evans <bde@@zeta.org.au>
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.20 1997/05/19 00:29:29 steve Exp $
d10 1
a10 1
SRCS= ${SHSRCS} ${GENSRCS}
d35 12
@


1.20
log
@Add explicit y.tab.h rule so that 'make depend clean all' does
not fail with an "don't know how to make y.tab.h" error.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.19 1997/05/19 00:16:27 steve Exp $
d27 1
a27 1
beforedepend: builtins.h nodes.h syntax.h token.h y.tab.h
d48 1
@


1.19
log
@Miscellaneous sorting and addition of rules for object files that
depend on generated headers.

Reviewed by:	Bruce Evans <bde@@zeta.org.au>
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.18 1997/04/28 03:03:23 steve Exp $
d27 1
a27 1
beforedepend: builtins.h nodes.h syntax.h token.h
d44 2
@


1.18
log
@Shamelessly pilfer most of NetBSD's Makefile so that the
problem with 'make -j n' and no .depend file goes away.
I think Bruce mentioned this somewhere on one of the
mailing lists.

Obtained from: NetBSD
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.17 1997/02/22 13:58:19 peter Exp $
d12 1
a13 1
DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
d27 1
a27 4
beforedepend: token.h

token.h: mktokens
	sh ${.CURDIR}/mktokens
d29 1
a29 1
builtins.h builtins.c: mkbuiltins builtins.def
d32 2
a33 1
init.c: mkinit ${SHSRCS}
d42 19
a60 1
parser.o: token.h
a62 2

${OBJS}: builtins.h nodes.h syntax.h
@


1.17
log
@Revert $FreeBSD$ to $Id$
@
text
@d2 1
a2 1
#	$Id$
d7 4
a10 6
	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}
d12 1
a13 1
LDADD+= -ll -ledit -ltermcap
d22 4
a25 4
CLEANFILES+=	builtins.h mkinit mkinit.o mknodes mknodes.o \
		mksyntax mksyntax.o \
		nodes.h syntax.h token.h y.tab.h
CLEANFILES+=	${GENSRCS}
d29 3
a37 12
# XXX this is just to stop the default .c rule being used, so that the
# intermediate object has a fixed name.
# XXX we have a default .c rule, but no default .o rule.
.o:
	${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
mkinit: mkinit.o
mkinit.o: mkinit.c		# XXX and many headers
mknodes: mknodes.o
mknodes.o: mknodes.c		# XXX and many headers
mksyntax: mksyntax.o
mksyntax.o: mksyntax.c		# XXX and many headers

a40 2
parser.o: token.h

d44 1
a44 2
token.h: mktokens
	sh ${.CURDIR}/mktokens
d47 2
@


1.16
log
@Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
@
text
@d2 1
a2 1
#	$FreeBSD$
@


1.15
log
@Build intermediate object files for mkinit, mknodes and mksyntax
so that simple regresssion tests based on `cmp' work.  mkdep still
doesn't work right for these tools.  They should probably be in
separate directories.

Sorted dependencies.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.14 1996/09/01 10:27:49 peter Exp $
@


1.15.2.1
log
@MFC: Almost too much to mention.  Lots of housecleaning merged over.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.15 1996/10/25 14:49:24 bde Exp $
d7 6
a12 4
	mystring.c options.c output.c parser.c printf.c redir.c show.c \
	trap.c var.c
GENSRCS= arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
SRCS= ${SHSRCS} ${GENSRCS}
d24 4
a27 4
CLEANFILES+= builtins.h mkinit mkinit.o mknodes mknodes.o \
	mksyntax mksyntax.o \
	nodes.h syntax.h token.h y.tab.h
CLEANFILES+= ${GENSRCS}
d29 1
a29 1
beforedepend: builtins.h nodes.h syntax.h token.h
d31 1
a31 1
builtins.c builtins.h: mkbuiltins builtins.def
d34 1
a34 2
init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
	redir.c trap.c var.c
d37 12
d52 2
a58 20

y.tab.h: arith.c

# Rules for object files that rely on generated headers.
arith_lex.o: y.tab.h
cd.o: nodes.h
eval.o: builtins.h nodes.h syntax.h
exec.o: builtins.h nodes.h syntax.h
expand.o: nodes.h syntax.h
input.o: syntax.h
jobs.o: nodes.h syntax.h
main.o: nodes.h
mystring.o: syntax.h
options.o: nodes.h
output.o: syntax.h
parser.o: nodes.h syntax.h token.h
redir.o: nodes.h
show.o: nodes.h
trap.o: nodes.h syntax.h
var.o: nodes.h syntax.h
@


1.15.2.2
log
@MFC: smashed Makefile changes resurrected.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.15.2.1 1997/08/25 09:09:28 jkh Exp $
d10 1
a10 1
SRCS=	${SHSRCS} ${GENSRCS}
a34 12

# XXX this is just to stop the default .c rule being used, so that the
# intermediate object has a fixed name.
# XXX we have a default .c rule, but no default .o rule.
.o:
	${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
mkinit: mkinit.o
mkinit.o: mkinit.c		# XXX and many headers
mknodes: mknodes.o
mknodes.o: mknodes.c		# XXX and many headers
mksyntax: mksyntax.o
mksyntax.o: mksyntax.c		# XXX and many headers
@


1.15.2.3
log
@MFC: parallelize
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.15.2.2 1997/08/25 21:16:13 jkh Exp $
d10 1
a10 2
GENHDRS= builtins.h nodes.h syntax.h token.h
SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
d22 1
a22 1
CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
d24 2
a25 2
	y.tab.h
CLEANFILES+= ${GENSRCS} ${GENHDRS}
d27 1
a28 1
.ORDER: builtins.c builtins.h
a47 1
.ORDER: nodes.c nodes.h
a50 1
.ORDER: syntax.c syntax.h
@


1.15.2.4
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.14
log
@oops, I didn't mean for the unconditional DEBUG code to go in, it's been
off in FreeBSD for some time.  I realised this a few seconds after the
commit started..
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.13 1996/09/01 10:19:18 peter Exp $
d24 2
a25 1
CLEANFILES+=	builtins.h mkinit mknodes mksyntax \
a30 3
token.h: mktokens
	sh ${.CURDIR}/mktokens

d37 12
d52 2
d57 2
a58 1
parser.o: token.h
@


1.13
log
@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
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.12 1996/06/24 04:22:21 jkh Exp $
d19 2
@


1.12
log
@Bring in my changes for removing the pestilent obj links (unless you
really want them) from /usr/src.  This is the final version of the
patches, incorporating the feedback I've received from -current.
@
text
@d1 2
a2 2
#	@@(#)Makefile	8.1 (Berkeley) 6/8/93
#	$Id: Makefile,v 1.11 1996/06/02 17:06:39 phk Exp $
d5 1
a5 1
SRCS=	alias.c builtins.c cd.c echo.c error.c eval.c exec.c expand.c \
d7 10
a16 5
	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
d19 1
a19 2
# for debugging:
#CFLAGS+=-g -DDEBUG=2
a20 4
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
d22 3
a24 3
.depend parser.o: token.def
token.def: mktokens
	sh ${.CURDIR}/mktokens
d26 1
a26 2
${.CURDIR}/builtins:
	# just override the default rule
d28 2
a29 2
builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins
	cd ${.CURDIR} && env OBJDIR=${.OBJDIR} sh mkbuiltins
d31 2
a32 3
init.c: mkinit ${SRCS}
	./mkinit '${CC} -c ${CFLAGS} ${LDFLAGS} init.c' ${.ALLSRC}
	touch ${.TARGET}
d34 2
a35 2
mkinit: ${.CURDIR}/mkinit.c
	${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mkinit.c -o $@@
d37 1
a37 1
nodes.c nodes.h: mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
a39 9
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 $@@

d43 1
a43 2
mksyntax: ${.CURDIR}/mksyntax.c ${.CURDIR}/parser.h
	${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mksyntax.c -o $@@
@


1.11
log
@Backup yacc changes.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.9 1996/02/03 13:27:54 joerg Exp $
d30 1
a30 1
	cd ${.CURDIR}; sh mkbuiltins
@


1.10
log
@Use new yacc rules. (I'm fixing the tree as fast as I can :-)
@
text
@d5 1
a5 2
SRCS=	alias.c arith.y arith_lex.l builtins.c cd.c echo.c error.c eval.c \
	exec.c expand.c \
d9 1
a9 1
OBJS+=	init.o
d20 1
a20 1
	arith.tab.h
@


1.9
log
@Fix the borokeness that crept in with rev 1.10 of parser.c, the sh
didn't correctly start background jobs anymore.  Strange that nobody
was complaining...

Add a dummy target for `builtins' in the Makefile, to prevent it
from attempting to build this file by compiling builtins.c. :-/
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.8 1995/08/27 20:26:40 joerg Exp $
d5 2
a6 1
SRCS=	alias.c builtins.c cd.c echo.c error.c eval.c exec.c expand.c \
d10 1
a10 1
OBJS+=	init.o arith.o arith_lex.o
d21 1
a21 1
	y.tab.h
@


1.8
log
@Make the shell handle a null command in a &&/|| sequence correctly.
The && and || tokens do also terminate a command, not only the
newline.

While i was at it, disabled trace code by default, it served no good
purpose since it required the use of a debugger anyway to be turned
on.  Instead, placed a hint in the Makefile on how to turn it on.

This makes the shell ~ 10 % faster and ~ 4 KB smaller. :)

Pointed out by:  jan@@physik.TU-Berlin.DE (Jan Riedinger)
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.7 1994/10/02 01:36:03 ache Exp $
d25 3
@


1.7
log
@libcompat removed
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.6 1994/09/24 02:57:18 davidg Exp $
d14 2
@


1.7.6.1
log
@Move all known fixes from 2.2-current into the 2.1 branch, with the
minor exception of rev 1.10 of parser.c (where i'd like to see if any
ill side-effects might show up).
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.8 1995/08/27 20:26:40 joerg Exp $
a13 2
# for debugging:
#CFLAGS+=-g -DDEBUG=2
@


1.7.6.2
log
@Merge from HEAD, except:

	Clients that used gnumalloc still do, despite the merge.  We're not
	bringing phkmalloc over.

	Thread stuff left out.

	PCCARD support left out.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.7.6.1 1995/12/11 23:04:38 joerg Exp $
a24 3

${.CURDIR}/builtins:
	# just override the default rule
@


1.7.6.3
log
@This 3rd mega-commit should hopefully bring us back to where we were.
I can get it to `make world' succesfully, anyway!
@
text
@d26 3
@


1.7.6.4
log
@Merge the fixes for rev 1.9 and 1.10 of parser.c, and
1.9 of Makefile
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.7.6.3 1996/06/05 02:36:21 jkh Exp $
a24 3

${.CURDIR}/builtins:
	# just override the default rule
@


1.7.6.5
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.6
log
@Added $Id$
@
text
@d2 1
a2 1
#	$Id$
d10 2
a11 2
DPADD=	${LIBL} ${LIBEDIT} ${LIBTERMCAP} ${LIBCOMPAT}
LDADD=	-ll -ledit -ltermcap -lcompat
@


1.5
log
@Add dependencies on libraries to DPADD.  Someday this should be done
automagically.  -lfoo has to be right to work, but ${LIBFO0} is too
easy to forget or misspell; nothing checks it and it should be
different for shared libraries.
@
text
@d2 1
@


1.4
log
@Touch init.c after making it in case mkinit refused to touch it after not
changing it.  mkinit's attempted smartness about timestamps is mismatched
with the makefile.  init.o is compiled _twice_ the first time it is made...
@
text
@d9 1
@


1.3
log
@Need ${LDFLAGS} one more place.
@
text
@d27 1
@


1.2
log
@Need to sue ${LDFLAGS} when building local binaries so they get built
static if ${NOSHARED}==YES.  This makes it easier to bootstrap a system.
@
text
@d26 1
a26 1
	./mkinit '${CC} -c ${CFLAGS} init.c' ${.ALLSRC}
@


1.1
log
@Initial revision
@
text
@d29 1
a29 1
	${CC} ${CFLAGS} ${.CURDIR}/mkinit.c -o $@@
d35 1
a35 1
	${CC} ${CFLAGS} ${.CURDIR}/mknodes.c -o $@@
d41 1
a41 1
	${CC} ${CFLAGS} ${.CURDIR}/mksignames.c -o $@@
d47 1
a47 1
	${CC} ${CFLAGS} ${.CURDIR}/mksyntax.c -o $@@
@


1.1.1.1
log
@BSD 4.4 Lite bin Sources
@
text
@@


1.1.1.2
log
@Import the 4.4BSD-Lite2 /bin/sh sources

Requested by: joerg

(Note, this is mostly going to be conflicts, which is expected.  Our entire
 sh source has a mainline, so this should not change anything except for
 a few new files appearing.  I dont think they are a problem)
@
text
@d1 1
a1 1
#	@@(#)Makefile	8.4 (Berkeley) 5/5/95
d6 2
a7 2
	mystring.c nodes.c options.c parser.c redir.c show.c syntax.c \
	trap.c output.c var.c
d9 1
a9 1
LDADD+=	-ll -ledit -ltermcap
d14 3
a16 2
	builtins.c builtins.h init.c mkinit mknodes mksyntax \
	nodes.c nodes.h printf.o syntax.c syntax.h token.def y.tab.h
d22 2
a23 2
builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins.def
	cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
d26 1
a26 1
	./mkinit '${CC} -c ${CFLAGS} init.c' ${.ALLSRC:S/^mkinit$//}
d36 6
@
