Commit Graph

42 Commits

Author SHA1 Message Date
ru
8d9d8a63e3 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
2004-03-18 10:55:47 +00:00
johan
17313dcc19 style.Makefile:
Use WARNS?= instead of WARNS=
2004-02-23 20:05:14 +00:00
ru
4c72afa60b Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
ru
aa5b6de2eb Removed duplicate y.tab.h from SRCS and CLEANFILES. 2004-01-20 13:13:40 +00:00
obrien
cabf352139 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.
2003-05-02 06:24:51 +00:00
mux
5fd634a9db It is now safe to remove WARNS=0 and WFORMAT=0.
Tested on:	alpha, i386, sparc64
2002-10-01 12:12:45 +00:00
tjr
9b6089541b Add back WARNS=0 and WFORMAT=0; gcc is finding nonexistent format string
errors with %qd formats.
2002-10-01 08:55:28 +00:00
tjr
b8677b7601 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.
2002-10-01 07:26:35 +00:00
kris
5e9114e650 Lock down with WFORMAT=1 except those directories with unfixed warnings.
Tested on i386 and alpha.
2002-02-04 02:49:19 +00:00
obrien
3e1e2dd6aa Default to WARNS=2. Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by:	mike
2001-12-04 01:57:47 +00:00
knu
cd72183126 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.
2001-11-20 18:33:59 +00:00
knu
2eed238068 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)
2001-11-17 19:10:11 +00:00
sheldonh
f106663eef 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
1999-09-08 15:40:46 +00:00
peter
3b7c52fb9a $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
bde
44bb68bb37 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.
1998-07-07 01:06:58 +00:00
bde
c284bdb175 Backed out previous backout. Put y.tab.h back in SRCS. 1998-05-06 15:33:59 +00:00
bde
ec2ee14ca6 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.
1998-05-05 07:36:55 +00:00
bde
6a77e9f036 Fixed races in `make -jN' using new yacc rules. 1998-05-04 20:09:06 +00:00
bde
906bdd2538 Backed out most of rev.1.19 (explicit dependencies of object files
on generated headers).  This is now handled generally in bsd.prog.mk.
1998-04-26 16:12:23 +00:00
jkh
068b44c29a 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>
1997-10-05 09:40:24 +00:00
bde
0eb66ca5d4 Restored clobbered parts of rev.1.15 (build intermediate object files
for tools).
1997-08-25 19:50:01 +00:00
steve
de0e0cfad3 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>
1997-05-21 03:23:23 +00:00
steve
1c5ad8bff5 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.
1997-05-19 00:29:29 +00:00
steve
b52f00b73c Miscellaneous sorting and addition of rules for object files that
depend on generated headers.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
1997-05-19 00:16:27 +00:00
steve
313e34c452 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
1997-04-28 03:03:23 +00:00
peter
34fd560164 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
jkh
9c0cd3f9df 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.
1997-01-14 07:20:47 +00:00
bde
0369029705 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.
1996-10-25 14:49:24 +00:00
peter
cf52863d71 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..
1996-09-01 10:27:49 +00:00
peter
db1e9c387e 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
1996-09-01 10:22:36 +00:00
jkh
e693c16dd8 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.
1996-06-24 04:26:21 +00:00
phk
166aa207ac Backup yacc changes. 1996-06-02 17:06:40 +00:00
phk
39936ba9bb Use new yacc rules. (I'm fixing the tree as fast as I can :-) 1996-05-30 20:52:26 +00:00
joerg
36d37235bb 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. :-/
1996-02-03 13:27:55 +00:00
joerg
48a19ede59 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)
1995-08-27 20:26:44 +00:00
ache
fb5df4e7c6 libcompat removed 1994-10-02 01:36:03 +00:00
dg
00eb2a4dc0 Added $Id$ 1994-09-24 02:59:15 +00:00
bde
b1f1422cba 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.
1994-08-28 18:49:06 +00:00
bde
b5cb754048 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...
1994-08-21 10:44:51 +00:00
rgrimes
b8dbcb3015 Need ${LDFLAGS} one more place. 1994-05-30 13:59:50 +00:00
rgrimes
98c9ded959 Need to sue ${LDFLAGS} when building local binaries so they get built
static if ${NOSHARED}==YES.  This makes it easier to bootstrap a system.
1994-05-29 12:43:06 +00:00
rgrimes
e3cfc8ce61 BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00