diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | Makefile.in | 89 | ||||
-rw-r--r-- | TODO.xgawk | 9 | ||||
-rw-r--r-- | main.c | 7 | ||||
-rw-r--r-- | test/ChangeLog | 8 | ||||
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rw-r--r-- | test/Makefile.in | 3 | ||||
-rw-r--r-- | test/ordchr.awk | 5 | ||||
-rw-r--r-- | test/ordchr.ok | 4 |
10 files changed, 109 insertions, 29 deletions
@@ -1,3 +1,11 @@ +2012-05-26 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * Makefile.am (include_HEADERS): Add so gawkapi.h will be installed. + (base_sources): Add gawkapi.h so that it is in dist tarball. + * TODO.xgawk: Update. + * main.c (is_off_limits_var): Stop returning true for everything + except PROCINFO. + 2012-05-25 Arnold D. Robbins <arnold@skeeve.com> * main.c (is_off_limits_var): New function to check if a variable diff --git a/Makefile.am b/Makefile.am index b41c8788..25688033 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ SUBDIRS = \ # what to make and install bin_PROGRAMS = gawk +include_HEADERS = gawkapi.h # sources for both gawk and dgawk base_sources = \ @@ -100,6 +101,7 @@ base_sources = \ floatcomp.c \ floatmagic.h \ gawkapi.c \ + gawkapi.h \ gawkmisc.c \ getopt.c \ getopt.h \ diff --git a/Makefile.in b/Makefile.in index b2c812bd..1ebc3d7e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,6 +38,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # + VPATH = @srcdir@ am__make_dryrun = \ { \ @@ -75,12 +76,12 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gawk$(EXEEXT) subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/configh.in \ - $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ - INSTALL NEWS TODO awkgram.c command.c config.guess \ - config.rpath config.sub depcomp install-sh missing \ - mkinstalldirs ylwrap +DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/configh.in $(top_srcdir)/configure ABOUT-NLS AUTHORS \ + COPYING ChangeLog INSTALL NEWS TODO awkgram.c command.c \ + config.guess config.rpath config.sub depcomp install-sh \ + missing mkinstalldirs ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ @@ -101,7 +102,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \ cint_array.$(OBJEXT) command.$(OBJEXT) debug.$(OBJEXT) \ @@ -144,6 +145,34 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -379,6 +408,7 @@ SUBDIRS = \ extension \ test +include_HEADERS = gawkapi.h # sources for both gawk and dgawk base_sources = \ @@ -399,6 +429,7 @@ base_sources = \ floatcomp.c \ floatmagic.h \ gawkapi.c \ + gawkapi.h \ gawkmisc.c \ getopt.c \ getopt.h \ @@ -594,6 +625,27 @@ distclean-compile: .y.c: $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -944,10 +996,10 @@ distcleancheck: distclean check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive -all-am: Makefile $(PROGRAMS) config.h +all-am: Makefile $(PROGRAMS) $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -1007,7 +1059,7 @@ info: info-recursive info-am: -install-data-am: +install-data-am: install-includeHEADERS install-dvi: install-dvi-recursive @@ -1055,7 +1107,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS +uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ cscopelist-recursive ctags-recursive install-am \ @@ -1072,13 +1124,14 @@ uninstall-am: uninstall-binPROGRAMS info-am install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS + install-includeHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-includeHEADERS # First, add a link from gawk to gawk-X.Y.Z. @@ -1,6 +1,8 @@ To-do list for xgawk enhancements: - Finish implementing new interface using gawkapi.h + - api_get_curfunc_param not honoring requested type in node_to_awk_value + - should api_sym_lookup also accept a type request? - must update the API do_lint value when changed by set_LINT - what is the proper return value for load_ext? It does not matter unless called by the "extension" function that nobody uses. @@ -12,11 +14,6 @@ To-do list for xgawk enhancements: Rename existing gettimeofday by adding some underscores. Awaiting confirmation of copyright assignment from FSF... -- Running "make install" should install gawkapi.h in /usr/include. - -- Decide how to transition from the old extension API to the new one. - When will the old approach be abandoned? - - Develop a libgawk shared library for use by extensions. Should this be hosted in a separate project? @@ -162,3 +159,5 @@ Done: - Eliminate libtool from the top-level configure.ac. Create a separate configure.ac in the extensions subdirectory, and hide all the libtool stuff in there. + +- Running "make install" should install gawkapi.h in /usr/include. @@ -1202,12 +1202,11 @@ is_off_limits_var(const char *var) const struct varinit *vp; for (vp = varinit; vp->name != NULL; vp++) { - if ( (vp->flags & NOT_OFF_LIMITS) != 0 - && strcmp(vp->name, var) == 0) - return false; + if (strcmp(vp->name, var) == 0) + return !(vp->flags & NOT_OFF_LIMITS); } - return true; + return false; } /* get_spec_varname --- return the name of a special variable diff --git a/test/ChangeLog b/test/ChangeLog index 563f8e05..6031ca09 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +2012-05-26 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * Makefile.am (readfile): Revert previous patch, and add comment + explaining that we need to create readfile.ok on failure so that + "make diffout" will work properly. + (ordchr.awk, ordchr.ok): Add more tests to catch type conversion + problems. + 2012-05-25 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (readfile): Don't copy the Makefile over readfile.ok diff --git a/test/Makefile.am b/test/Makefile.am index ea7e9a9e..c0293ba5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1552,10 +1552,11 @@ ordchr2:: @$(AWK) -l ordchr 'BEGIN {print chr(ord("z"))}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +# N.B. If the test fails, create readfile.ok so that "make diffout" will work readfile:: @echo $@ @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) Makefile _$@ && rm -f _$@ + @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok include2:: @echo $@ diff --git a/test/Makefile.in b/test/Makefile.in index 34b7e930..683ba8a9 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1933,10 +1933,11 @@ ordchr2:: @$(AWK) -l ordchr 'BEGIN {print chr(ord("z"))}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +# N.B. If the test fails, create readfile.ok so that "make diffout" will work readfile:: @echo $@ @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) Makefile _$@ && rm -f _$@ + @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok include2:: @echo $@ diff --git a/test/ordchr.awk b/test/ordchr.awk index abb793a0..0295105e 100644 --- a/test/ordchr.awk +++ b/test/ordchr.awk @@ -2,4 +2,9 @@ BEGIN { print chr(ord("A")) + print chr(ord("0")) + print ord(chr(65)) + # test if type conversion between strings and numbers is working properly + print chr(ord(0)) + print ord(chr("65")) } diff --git a/test/ordchr.ok b/test/ordchr.ok index f70f10e4..86d901e9 100644 --- a/test/ordchr.ok +++ b/test/ordchr.ok @@ -1 +1,5 @@ A +0 +65 +0 +65 |