Bring Gawk back. There just isn't any other POSIX compliant AWK out there.
The biggest thing missing from Bell-Labs AWK is the character class regexes.
This commit is contained in:
parent
4443a773d6
commit
2f863af288
32
gnu/usr.bin/awk/Makefile
Normal file
32
gnu/usr.bin/awk/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
# Makefile copyright James Raynard (jraynard@freebsd.org) 1997
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
.include "${.CURDIR}/../Makefile.inc"
|
||||
|
||||
.PATH: ${.CURDIR}/../../../contrib/awk
|
||||
|
||||
PROG= awk
|
||||
SRCS= array.c awktab.y builtin.c eval.c field.c gawkmisc.c io.c main.c \
|
||||
msg.c node.c re.c version.c dfa.c getopt.c getopt1.c
|
||||
MAN= doc/gawk.1
|
||||
MLINKS= gawk.1 awk.1
|
||||
|
||||
YFLAGS=
|
||||
|
||||
# Important for ctype macros!
|
||||
CFLAGS+= -funsigned-char
|
||||
|
||||
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../../contrib/awk
|
||||
CFLAGS+= -DHAVE_CONFIG_H -DGAWK -DDEFPATH=\".\"
|
||||
CLEANFILES= awktab.y
|
||||
|
||||
SUBDIR+= doc
|
||||
|
||||
DPADD+= ${LIBGNUREGEX} ${LIBM}
|
||||
LDADD+= -lgnuregex -lm
|
||||
|
||||
awktab.y: awk.y
|
||||
ln -fs ${.ALLSRC} ${.TARGET}
|
||||
|
||||
.include <bsd.prog.mk>
|
230
gnu/usr.bin/awk/config.h
Normal file
230
gnu/usr.bin/awk/config.h
Normal file
@ -0,0 +1,230 @@
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* configh.in. Generated automatically from configure.in by autoheader. */
|
||||
/*
|
||||
* acconfig.h -- configuration definitions for gawk.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995-2000 the Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GAWK, the GNU implementation of the
|
||||
* AWK Programming Language.
|
||||
*
|
||||
* GAWK is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GAWK is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* #undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define if type char is unsigned and you are not using gcc. */
|
||||
#ifndef __CHAR_UNSIGNED__
|
||||
/* #undef __CHAR_UNSIGNED__ */
|
||||
#endif
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
||||
This function is required for alloca.c support on those systems. */
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to the type of elements in the array set by `getgroups'.
|
||||
Usually this is either `int' or `gid_t'. */
|
||||
#define GETGROUPS_T gid_t
|
||||
|
||||
/* Define if the `getpgrp' function takes no argument. */
|
||||
#define GETPGRP_VOID 1
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef gid_t */
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
#define HAVE_MMAP 1
|
||||
|
||||
/* Define if your struct stat has st_blksize. */
|
||||
#define HAVE_ST_BLKSIZE 1
|
||||
|
||||
/* Define if you have the ANSI # stringizing operator in cpp. */
|
||||
#define HAVE_STRINGIZE 1
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
|
||||
/* Define if your struct tm has tm_zone. */
|
||||
#define HAVE_TM_ZONE 1
|
||||
|
||||
/* Define if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
/* #undef HAVE_TZNAME */
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except
|
||||
with this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if your <sys/time.h> declares struct tm. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef uid_t */
|
||||
|
||||
#define HAVE_STRINGIZE 1 /* can use ANSI # operator in cpp */
|
||||
#define REGEX_MALLOC 1 /* use malloc instead of alloca in regex.c */
|
||||
#define SPRINTF_RET int /* return type of sprintf */
|
||||
/* #undef BITOPS */ /* bitwise ops (undocumented feature) */
|
||||
/* #undef NONDECDATA */ /* non-decimal input data (undocumented feature) */
|
||||
/* #undef _FILE_OFFSET_BITS */ /* bits in a file offset, where this matters */
|
||||
/* #undef _LARGEFILE_SOURCE */ /* makes fseeko etc. visible on some hosts */
|
||||
/* #undef _LARGE_FILES */ /* emables large files on AIX-style hosts */
|
||||
|
||||
/* Define if you have the fmod function. */
|
||||
#define HAVE_FMOD 1
|
||||
|
||||
/* Define if you have the getpagesize function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define if you have the madvise function. */
|
||||
#define HAVE_MADVISE 1
|
||||
|
||||
/* Define if you have the memcmp function. */
|
||||
#define HAVE_MEMCMP 1
|
||||
|
||||
/* Define if you have the memcpy function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define if you have the memset function. */
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
/* Define if you have the setlocale function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define if you have the strchr function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define if you have the strncasecmp function. */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
|
||||
/* Define if you have the strtod function. */
|
||||
#define HAVE_STRTOD 1
|
||||
|
||||
/* Define if you have the system function. */
|
||||
#define HAVE_SYSTEM 1
|
||||
|
||||
/* Define if you have the tzset function. */
|
||||
#define HAVE_TZSET 1
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the <signum.h> header file. */
|
||||
/* #undef HAVE_SIGNUM_H */
|
||||
|
||||
/* Define if you have the <stdarg.h> header file. */
|
||||
#define HAVE_STDARG_H 1
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
/* #undef HAVE_STRINGS_H */
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if you have the m library (-lm). */
|
||||
#define HAVE_LIBM 1
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define to make ftello visible on some hosts (e.g. HP-UX 10.20). */
|
||||
/* #undef _LARGEFILE_SOURCE */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* Define to make ftello visible on some hosts (e.g. glibc 2.1.3). */
|
||||
/* #undef _XOPEN_SOURCE */
|
||||
|
||||
|
||||
#include <custom.h> /* overrides for stuff autoconf can't deal with */
|
11
gnu/usr.bin/awk/doc/Makefile
Normal file
11
gnu/usr.bin/awk/doc/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# Makefile copyright James Raynard (jraynard@freebsd.org) 1997
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${.CURDIR}/../../../../contrib/awk/doc
|
||||
|
||||
INFO = gawk
|
||||
INFOSECTION= "System Utilities"
|
||||
INFOENTRY_gawk= "* GAWK: (gawk). The GNU AWK language interpreter manual."
|
||||
|
||||
.include <bsd.info.mk>
|
Loading…
Reference in New Issue
Block a user