Commit Graph

41 Commits

Author SHA1 Message Date
Warner Losh
73f7ff91b2 Implement gawk multiple-arg extension to and, or, and xor.
gawk allows multiple arguemnts to bit-wiste and, or and xor
functions. Implement an arbitrary number of arguments for these
functions. Also, use NULL in preference to 0 to match rest of file.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12361
2017-09-14 05:48:23 +00:00
Baptiste Daroussin
e1fe74ad7c Import the awk(1) manpage from OpenBSD
As discussed during AsiaBSDcon devsummit, import the manpage from OpenBSD which
is has been rewritten in mdoc(7) format making it readable by default with
mandoc, it also has been extended by OpenBSD to cover all awk(1) options

Obtained from:	OpenBSD
MFH:		1 week
2017-03-09 03:27:53 +00:00
Enji Cooper
272a2acfef Use SRCTOP to refer to awk source in contrib/awk and remove unnecessary AWKSRC prefix
for maketab.c

The former simplifies pathing in make/displayed output, whereas the latter was just
unnecessarily superfluous since .PATH referenced the path to maketab.c earlier on in
the Makefile.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-11 20:27:06 +00:00
Bryan Drewery
384850e063 WITH_META_MODE: Fix rebuilding maketab outside of build-tools.
The bsd.dep.mk yacc targets rely on only the .c file getting a .meta
file.  However the previous code here relying on only the .h file meant
that it would be generated with a .meta file.  r301285 made it so that
the .h file is never expected to get a .meta file.  To keep this
restriction in place add in an extra dependency on the .c file so that
it is generated at this time.  It's a hack but the best for the patterns
we have at the moment for handling build-tools and side-effect-generated
files.

Reported by:	Mark Millard
Approved by:	re (implicit)
Sponsored by:	EMC / Isilon Storage Division
2016-06-14 16:20:05 +00:00
Bryan Drewery
29df9f6b75 DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.
This avoids running target binaries.

Sponsored by:	EMC / Isilon Storage Division
2016-05-09 22:21:09 +00:00
Bryan Drewery
d1dd034d07 META_MODE: Don't rebuild build-tools targets during normal build.
This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build.  Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.

Sponsored by:	EMC / Isilon Storage Division
2016-04-14 21:06:10 +00:00
Bryan Drewery
bd18fd57db DIRDEPS_BUILD: Regenerate without local dependencies.
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:20:11 +00:00
Bryan Drewery
b791fbe630 META MODE: Don't create .meta files when symlinking sources into the obj directory.
Tracking these leads to situations where meta mode will consider the
file to be out of date if /bin/sh or /bin/ln are newer than the source
file.  There's no reason for meta mode to do this as make is already
handling the rebuild dependency fine.

Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:43 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin
3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ruslan Ermilov
d98dd8e5f9 Apply patches directly to sources. Their effect is as follows:
- Make one-true-awk respect locale's collating order in [a-z]
  bracket expressions, until a more complete fix (like handing
  BREs) is ready.

- Don't require a space between -[fv] and its argument.
2010-01-10 08:02:07 +00:00
Ruslan Ermilov
bd0e3681f9 Regen diffs. 2010-01-09 23:34:45 +00:00
Ruslan Ermilov
91217c1c70 Update to a 26-Nov-2009 release. 2010-01-09 23:19:01 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
John Birrell
d97cdd3349 Allow awk (the one true one!) to handle 64 files instead of just 20.
The current FreeBSD syscall generation script uses all 20 and I need
another open file.

It's a shame that something named as the 'one-true-awk' is so limited
by an old denition like FOPEN_MAX when it could just make the file
handling dynamic.

This is done to avoid touching contrib sources on a vendor branch.
2008-03-27 01:33:26 +00:00
David E. O'Brien
62f261e751 Now that we're way past our conversion from GNU awk to BWK awk, we don't
need to primarily install as a non-conflicting name.
2008-02-28 16:41:51 +00:00
David E. O'Brien
149d554ac8 The AWK 23-Oct-2007 release includes fixes for FreeBSD PR's bin/104795
and bin/100443.
2007-10-25 12:43:22 +00:00
Xin LI
4f68049e7b Increase inputFS buffer. awk will not accept some old scripts
otherwise.
2007-06-08 05:44:12 +00:00
Rong-En Fan
202819e1e6 - Update for 2007/05/01 import
Approved by:	delphij (mentor)
Nodded by:	ru
Tested by:	make universe
2007-06-05 15:35:05 +00:00
Ruslan Ermilov
324ef9892d Fix a bug converting a variable from the numeric type to a string.
PR:		bin/104795
MFC after:	3 days
2006-10-25 21:23:20 +00:00
Ruslan Ermilov
8a70619712 Initial memory allocation for fields was off-by-one.
PR:		bin/100443
MFC after:	3 days
2006-09-15 13:33:32 +00:00
Ruslan Ermilov
1007c98db6 Don't require a space between -[fv] and its argument.
PR:		bin/86514
MFC after:	3 days
2006-09-15 13:28:10 +00:00
Ruslan Ermilov
f9fe4d605f Add temporary patches to make one-true-awk respect locale's collating order
in [a-z] bracket expressions, until a more complete fix (like handing BREs)
is ready.

Prodded by:	ache
OK'ed by:	tjr
2005-05-17 14:54:33 +00:00
Jun Kuriyama
3a624f5e23 Use
cat ${.ALLSRC} > ${.TARGET}
rather than
	ln -sf ${.ALLSRC} ${.TARGET}
not to depends on absolute-path of symbolic links.

Commented by:  marcel, obrien, bde
2003-06-06 13:46:55 +00:00
David E. O'Brien
82e3b82014 For the bwk_20030314 version, we have to -DHAS_ISBLANK now.
Oh how I wish the author had accepted my "#ifndef isblank" patch instead.
2003-03-17 08:07:54 +00:00
David E. O'Brien
498e57a7a4 BWK awk appears to work for world builds just fine now. We want to make
sparc64 the same as the other platforms -- so do it by moving the other
platforms toward the sparc64.
2002-05-10 20:36:21 +00:00
David E. O'Brien
259b7fa9b9 Style. 2002-04-10 03:10:03 +00:00
Ruslan Ermilov
8b04285f30 Style. 2002-04-09 07:05:24 +00:00
Ruslan Ermilov
498e32cef0 Make this compile in a standalone environment.
Tidy up CLEANFILES.
Use built-in rules for building "maketab".
2002-04-09 07:03:32 +00:00
David E. O'Brien
2fe5bfd7a1 Use our auto-YACC'ing rules to do most of the work.
Submitted by:	bde
2002-03-23 04:49:43 +00:00
David E. O'Brien
a370851f6e To quote BDE: "the k part of awk should understand the ctype macros and not
need the -funsigned-char hack."

Also add needed CLEANSFILE.
2002-03-06 18:37:26 +00:00
David E. O'Brien
da2af9ad11 Simpler way to handling the names needed on the various platforms. 2002-03-06 18:06:39 +00:00
David E. O'Brien
a04eff5a87 On the sparc64 platform we install the `1 true AWK' as "awk". On all other
platforms we install as "nawk".

At the moment Gawk is borked on sparc64, however BWK AWK works fine.
2002-03-05 19:37:12 +00:00
David E. O'Brien
43cfcf106d Switch to the One True AWK from Bell-Labs, away from GNU AWK. 2001-10-30 08:56:50 +00:00