diff options
Diffstat (limited to 'awklib')
-rw-r--r-- | awklib/.gitignore | 8 | ||||
-rw-r--r-- | awklib/ChangeLog | 9 | ||||
-rw-r--r-- | awklib/Makefile.am | 5 | ||||
-rw-r--r-- | awklib/Makefile.in | 18 | ||||
-rw-r--r-- | awklib/eg/lib/gettime.awk | 4 | ||||
-rw-r--r-- | awklib/eg/lib/inplace.awk | 14 | ||||
-rw-r--r-- | awklib/eg/prog/alarm.awk | 4 |
7 files changed, 52 insertions, 10 deletions
diff --git a/awklib/.gitignore b/awklib/.gitignore new file mode 100644 index 00000000..b46084d4 --- /dev/null +++ b/awklib/.gitignore @@ -0,0 +1,8 @@ +# Ignore files that are created by a build. +# For example objects and archives. +grcat +group.awk +igawk +passwd.awk +pwcat + diff --git a/awklib/ChangeLog b/awklib/ChangeLog index 98bdc3dc..e286a469 100644 --- a/awklib/ChangeLog +++ b/awklib/ChangeLog @@ -1,3 +1,12 @@ +2013-02-03 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (AWKPROG): Add definition and conditional for + cross compiling. Thanks to Juergen Kahrs. + +2013-01-08 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * eg/lib/inplace.awk: Add new file generated from doc/gawk.texi. + 2012-12-24 Arnold D. Robbins <arnold@skeeve.com> * 4.0.2: Release tar ball made. diff --git a/awklib/Makefile.am b/awklib/Makefile.am index 4ff14036..b10fa644 100644 --- a/awklib/Makefile.am +++ b/awklib/Makefile.am @@ -26,7 +26,12 @@ EXTRA_DIST = ChangeLog ChangeLog.0 extract.awk eg $(srcdir)/stamp-eg # With some locales, the script extract.awk fails. # So we fix the locale to some sensible value. + +if TEST_CROSS_COMPILE +AWKPROG = LC_ALL=C LANG=C awk$(EXEEXT) +else AWKPROG = LC_ALL=C LANG=C $(abs_top_builddir)/gawk$(EXEEXT) +endif # Get config.h from the build directory and custom.h from the source directory. AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) diff --git a/awklib/Makefile.in b/awklib/Makefile.in index 0e205af9..f392eeb7 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -83,11 +83,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mpfr.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -169,6 +169,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GAWKLIBEXT = @GAWKLIBEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -184,6 +185,7 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ +LIBMPFR = @LIBMPFR@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ @@ -225,6 +227,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ +acl_shlibext = @acl_shlibext@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -259,21 +262,24 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgextensiondir = @pkgextensiondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ +subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = ChangeLog ChangeLog.0 extract.awk eg $(srcdir)/stamp-eg +@TEST_CROSS_COMPILE_FALSE@AWKPROG = LC_ALL=C LANG=C $(abs_top_builddir)/gawk$(EXEEXT) # With some locales, the script extract.awk fails. # So we fix the locale to some sensible value. -AWKPROG = LC_ALL=C LANG=C $(abs_top_builddir)/gawk$(EXEEXT) +@TEST_CROSS_COMPILE_TRUE@AWKPROG = LC_ALL=C LANG=C awk$(EXEEXT) # Get config.h from the build directory and custom.h from the source directory. AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) diff --git a/awklib/eg/lib/gettime.awk b/awklib/eg/lib/gettime.awk index 95f9c329..4cb56330 100644 --- a/awklib/eg/lib/gettime.awk +++ b/awklib/eg/lib/gettime.awk @@ -1,4 +1,4 @@ -# gettimeofday.awk --- get the time of day in a usable format +# getlocaltime.awk --- get the time of day in a usable format # # Arnold Robbins, arnold@skeeve.com, Public Domain, May 1993 # @@ -25,7 +25,7 @@ # time["weeknum"] -- week number, Sunday first day # time["altweeknum"] -- week number, Monday first day -function gettimeofday(time, ret, now, i) +function getlocaltime(time, ret, now, i) { # get time once, avoids unnecessary system calls now = systime() diff --git a/awklib/eg/lib/inplace.awk b/awklib/eg/lib/inplace.awk new file mode 100644 index 00000000..6403a228 --- /dev/null +++ b/awklib/eg/lib/inplace.awk @@ -0,0 +1,14 @@ +# inplace --- load and invoke the inplace extension. + +@load "inplace" + +# Please set INPLACE_SUFFIX to make a backup copy. For example, you may +# want to set INPLACE_SUFFIX to .bak on the command line or in a BEGIN rule. + +BEGINFILE { + inplace_begin(FILENAME, INPLACE_SUFFIX) +} + +ENDFILE { + inplace_end(FILENAME, INPLACE_SUFFIX) +} diff --git a/awklib/eg/prog/alarm.awk b/awklib/eg/prog/alarm.awk index 53563d15..9bb1633c 100644 --- a/awklib/eg/prog/alarm.awk +++ b/awklib/eg/prog/alarm.awk @@ -1,6 +1,6 @@ # alarm.awk --- set an alarm # -# Requires gettimeofday() library function +# Requires getlocaltime() library function # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 @@ -53,7 +53,7 @@ BEGIN \ minute = atime[2] + 0 # force numeric # get current broken down time - gettimeofday(now) + getlocaltime(now) # if time given is 12-hour hours and it's after that # hour, e.g., `alarm 5:30' at 9 a.m. means 5:30 p.m., |