diff options
Diffstat (limited to 'pc')
-rw-r--r-- | pc/ChangeLog | 28 | ||||
-rw-r--r-- | pc/Makefile | 99 | ||||
-rw-r--r-- | pc/Makefile.tst | 116 | ||||
-rw-r--r-- | pc/config.h | 9 | ||||
-rw-r--r-- | pc/install.awk | 2 |
5 files changed, 209 insertions, 45 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index b750e922..f1386886 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,31 @@ +Thu May 15 12:49:08 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us> + + * Release 3.0.3: Release tar file made. + +Tues May 13 20:06:09 1997 Darrel Hankerson <hankedr@mail.auburn.edu> + + * vcWin32 target added. Some new tests for WIN32 in gawkmisc.c + io.c, and regex.c. Makefile changes for nmake, which can't + expand $($x). + + * config.h updated for BITOPS and NONDECDATA (also in Makefile). + +Fri Apr 18 07:55:47 1997 Arnold D. Robbins <arnold@skeeve.atl.ga.us> + + * BETA Release 3.0.34: Release tar file made. + +Fri Jan 17 19:20:45 1997 Darrel Hankerson <hankedr@mail.auburn.edu> + + * Makefile: add KUR's emxnt target for emx+RSXNT. Create awk.exe + "link" to gawk.exe for djgpp target. (Suggested by Eli Zaretskii. + Should be done as part of a smarter install, since awk.exe only + works with djgpp gawk.exe.) Separate djgpp-v1 into djgppv1 + target. Install awk.exe if present. + + * install.awk: install awk.exe if present (only for djgpp) + + * config.h: additional include for emx+RSXNT. + Wed Dec 25 11:25:22 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us> * Release 3.0.2: Release tar file made. diff --git a/pc/Makefile b/pc/Makefile index a1329eb6..b7fe1e43 100644 --- a/pc/Makefile +++ b/pc/Makefile @@ -1,31 +1,35 @@ -# Makefile for gawk (GNU awk) 7 Oct 1996 +# Makefile for gawk (GNU awk) 2 Jan 1997 # -# - for GNU C (djgpp) [executable for DOS (32-bit)] -# - for GNU C (emx) [executable for OS/2 2.x or DOS (32-bit)] -# - for Microsoft C 7 [ececutable for DOS (16-bit)] -# - for Microsoft C 6.00A [executable for OS/2 or DOS (16-bit)] -# - for Microsoft C 5.1 [executable for OS/2 or DOS (16-bit)] +# - for GNU C (djgpp) [32bit executable for DOS] +# - for GNU C (emx) [32bit executable for OS/2 or DOS or Win32] +# - for MS-Visual C/C++ 4.x [Win32 executable for Windows 95 & NT] +# - for Microsoft C 7 [16bit ececutable for DOS] +# - for Microsoft C 6.00A [16bit executable for OS/2 or DOS] -# Tested with GNU make and dmake-3.8 under OS/2 and DOS, and ndmake -# under DOS. Compiling with dmake under DOS may require the DOS-only -# version of dmake (so that swapping works). +# Tested with GNU make and dmake-3.8 under OS/2 and DOS, and ndmake and +# Microsoft nmake under DOS. Compiling with dmake under DOS may require the +# DOS-only version of dmake (so that swapping works). nmake requires a +# few edits in the configuration section below. default: @echo "Enter $(MAK) target " @echo " where 'target' is chosen from " - @echo " djgpp ... DOS 32-bit exe [GNU C, Delorie, v1 or v2] " + @echo " djgpp ... DOS 32-bit exe [GNU C, Delorie, v2] " + @echo " djgppv1 . DOS 32-bit exe [GNU C, Delorie, v1] " @echo " emx ..... OS/2 32-bit exe [emx/gcc; uses emxlibc.dll] " + @echo " emxnt ... NT exe [emx/gcc with RSXNT] " @echo " emxbnd .. OS/2 and DOS 32-bit exe [emx/gcc] " @echo " msc ..... DOS exe [Microsoft C 7 & 8 (AKA 1.52)] " @echo " msc6 .... DOS exe [Microsoft C 6.00a] " @echo " msc6os2 . OS/2 exe [Microsoft C 6.00a] " @echo " msc6bnd . OS/2 and DOS exe [Microsoft C 6.00a] " - @echo " msvc32 .. DOS exe [Microsoft Visual C] " + @echo " vcWin32 . Win32 exe [Microsoft Visual C] " @echo " ----------------------------------------------------- " @echo " test .... Perform tests (see README_d/README.pc) " @echo " install . Install gawk under $(prefix)/ " # Support dropped in 3.0 +# - for Microsoft C 5.1 [16bit executable for OS/2 or DOS] # @echo " msc51 DOS exe [Microsoft C 5.1] " # @echo " msc51bnd OS/2 and DOS exe [Microsoft C 5.1] " @@ -68,6 +72,16 @@ prefix = c:/gnu # Define the install method. Method 1 is Unix-like (and requires cat, # cp, mkdir, sed, and sh); method 2 uses gawk and batch files. install = 1 +#------------------------------------------------------------------------ +# To work around command-line length problems, this makefile assumes +# that $($X) can be expanded. If using a make (such as nmake) which +# cannot handle such macros, define DO_LNK and DO_BIND for your target +# as $(L<target>) and $(B<target>), resp.; e.g., +#DO_LNK = $(LvcWin32) +#DO_BIND= $(BvcWin32) +# and then comment the following: +DO_LNK = $($(LNK)) +DO_BIND= $($(BIND)) #======================================================================== # End of general configuration. Some platform-specific configuration # notes appear below. @@ -77,9 +91,8 @@ install = 1 #========================== DJGPP ======================================= #======================================================================== -LDJG = $(CC) $(LF) -o gawk $(LDRSP) $(LF2) -#BDJG = coff2exe -s /djgpp/bin/go32.exe gawk -BDJG = coff2exe gawk +LDJG = $(CC) $(LF) -o gawk.exe $(LDRSP) $(LF2) +BDJG = stubify -g awk.exe | stubedit awk.exe runfile=gawk djgpp: $(MAK) all \ @@ -93,6 +106,16 @@ djgpp-debug: LNK=LDJG LF2=-lm \ BIND=BDJG +LDJGv1 = $(CC) $(LF) -o gawk $(LDRSP) $(LF2) +#BDJGv1 = coff2exe -s /djgpp/bin/go32.exe gawk +BDJGv1 = coff2exe gawk + +djgppv1: + $(MAK) all \ + CC=gcc O=.o CF=-O \ + LNK=LDJGv1 LF=-s LF2=-lm \ + BIND=BDJGv1 + #======================================================================== #========================== EMX ========================================= #======================================================================== @@ -112,6 +135,11 @@ emx: "CC=gcc -Zomf" O=.obj "CF=-O -DOS2" \ LNK=LEMX "LF=-s -Zcrtdll -Zstack 512" RSP= +emxnt: + $(MAK) all \ + "CC=gcc -Zwin32 -Zcrtdll=rsxntcs" O=.o "CF=-O -DOS2" \ + LNK=LEMX "LF=-s -Zstack 512" RSP= + emxbnd: $(MAK) all \ CC=gcc O=.o "CF=-O -DOS2 -DMSDOS" OBJ=popen.o \ @@ -120,7 +148,7 @@ emxbnd: emxbnd-debug: $(MAK) all \ - CC=gcc O=.o CF="-g -DOS2 -DMSDOS" OBJ=popen.o \ + CC=gcc O=.o "CF=-g -DOS2 -DMSDOS" OBJ=popen.o \ LNK=LEMXBND \ BIND=BEMXD "P=|tr \" \" \"\n\"" @@ -146,13 +174,14 @@ MSCLIB = llibce MSCCL = -FPi #MSCCL = -FPc -LMSC = link $(LF) $(LNKRSP) $(STDARGV)/NOE,$@,,/NOD:llibce $(MSCLIB)$(LF2)/STACK:0x5900,nul +LMSC = link $(LF) $(LNKRSP) $(STDARGV)/NOE,$@,,/NOD:llibce $(MSCLIB)$(LF2)/STACK:0x5420,nul # CLMSC-linking works when building under OS/2 CLMSC = $(CC) -o $@ $(LF) $(GAWKOBJS) $(STDARGV) $(LF2) -link /NOE/NOI/STACK:0x6f00 BMSC = bind $@ /n DOSMAKEPIPE DOSCWAIT + # Ugly hack: config.h defines __STDC__ if not defined on command-line. # OS/2 versions can't use -Za in getid.c. MSC7 uses stub headers in pc/ # due to ANSI conflicts. MSC 5.1 defines __STDC__=0 regardless of ANSI flag. @@ -168,6 +197,8 @@ msc: "CC=cl -nologo $(MSCCL)" O=.obj "CF=-AL -Ze -Ipc/include $(MSCOPT)" \ OBJ=popen.obj \ LNK=LMSC P=+ +Lmsc = $(LMSC) # for broken makes (nmake) which cannot expand $($X) +Bmsc = msc-debug: $(MAK) all \ @@ -182,6 +213,8 @@ msc6: "CC=cl -nologo $(MSCCL)" O=.obj "CF=-AL -Za $(MSCOPT)" \ OBJ=popen.obj \ LNK=LMSC P=+ +Lmsc6 = $(LMSC) # for broken makes (nmake) which cannot expand $($X) +Bmsc6 = msc6os2: $(MAK) builtin.obj \ @@ -198,6 +231,18 @@ msc6bnd: OBJ=popen.obj \ LNK=LMSC "LF2=p,gawk.def" P=+ \ BIND=BMSC +Lmsc6bnd = $(LMSC) # for broken makes (nmake) which cannot expand $($X) +Bmsc6bnd = $(BMSC) + + +# Windows '95 / NT +LvcWin32 = link -nologo -subsystem:console -release -out:$@ $(LNKRSP) + +vcWin32: + $(MAK) all \ + "CC=cl -nologo" O=.obj "CF=-o2 -DWIN32 -D__STDC__=0" \ + LNK=LvcWin32 + # Support dropped in 3.0 #msc51: @@ -212,24 +257,14 @@ msc6bnd: # OBJ=popen.obj \ # LNK=CLMSC "LF=-Lp -Fb" "LF2=gawk.def" - -# The msvc32 target was supplied by a user, and is untested by the -# OS/2 and DOS maintainers. Bug reports welcomed. - -LNKMSVC32="link -out:gawk.exe $(LNKRSP)" - -msvc32: - $(MAK) all \ - "CC=cl -nologo" O=.obj "CF=-DMSDOS -D__STDC__=0" \ - OBJ=popen.obj \ - LNK=LNKMSVC32 - #======================================================================== # Define BIND for BINDless compiles, otherwise $($(BIND)) may break. BIND = EMPTY EMPTY= +# bitwise operations (-DBITOPS) and non-decimal input data (-DNONDECDATA) are +# undocumented in 3.0.3. They may be enabled in config.h, or added to CFLAGS. CFLAGS = $(CF) -DGAWK -I. -DHAVE_CONFIG_H # object files @@ -256,9 +291,9 @@ GAWKOBJS = $(ALLOBJS) $(LIBOBJS) all : gawk.exe gawk.exe:: $(GAWKOBJS) $(RSP) - $($(LNK)) - $($(BIND)) - + $(DO_LNK) + $(DO_BIND) + $(RSPFILE) : $(GAWKOBJS) echo $(AWKOBJS1)$P > $@ echo $(AWKOBJS2)$P >> $@ @@ -293,7 +328,7 @@ install1: sed "s;igawk;$(prefix)/bin/igawk;" pc/awklib/igawk.bat > igawk.bat sh mkinstal.sh $(prefix)/bin sh mkinstal.sh $(prefix)/lib/awk $(prefix)/man/man1 $(prefix)/info - cp gawk.exe igawk.bat igawk.cmd pc/awklib/igawk $(prefix)/bin + cp *awk.exe igawk.bat igawk.cmd pc/awklib/igawk $(prefix)/bin cp awklib/eg/lib/* pc/awklib/igawk.awk $(prefix)/lib/awk cp doc/*.1 $(prefix)/man/man1 cp doc/gawk.info $(prefix)/info diff --git a/pc/Makefile.tst b/pc/Makefile.tst index ebc171f3..f530a300 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -1,6 +1,6 @@ # Makefile for GNU Awk test suite. # -# Copyright (C) 1988-1996 the Free Software Foundation, Inc. +# Copyright (C) 1988-1997 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -70,7 +70,7 @@ # Using EMXSHELL=/bin/sh with emx versions can exhaust lower mem. # Lower mem can also be exhausted on some of the tests even with MSC gawk. # The .SWAP setting forces (DOS-only) dmake to swap itself out. -.SWAP: childin fflush getlnhd tweakfld +.SWAP: childin fflush getlnhd tweakfld pipeio1 # This won't work unless you have "sh" and set SHELL equal to it (Make 3.74 # or later which comes with DJGPP will work with SHELL=/bin/sh if you have @@ -100,8 +100,8 @@ MKDIR = mkdir #MKDIR = true && command -c mkdir # Set your unix-style date function here -#DATE = date DATE = gdate +#DATE = date # ============================================================================ # You shouldn't need to modify anything below this line. @@ -119,12 +119,13 @@ basic: msg swaplns messages argarray longwrds \ numsubstr pcntplus prmreuse math fldchg fldchgnf reindops \ sprintfc backgsub tweakfld clsflnam mmap8k fnarray \ dynlj substr eofsplit prt1eval gsubasgn prtoeval gsubtest splitwht \ - back89 tradanch nlfldsep splitvar + back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ + noparms funstack clobber delarprm prdupval -unix-tests: poundba fflush getlnhd +unix-tests: poundba fflush getlnhd pipeio1 pipeio2 strftlng pid gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \ - badargs strftime gensub gnureops + badargs strftime gensub gnureops reint nondec extra: regtes inftest @@ -207,6 +208,9 @@ manyfiles:: @$(MKDIR) junk @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ @$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@ + @echo 'If manyfiles says "junk/*: No such file or directory",' + @echo 'use the line on test/Makefile which invokes wc' + @echo 'without quoting the "junk/*" argument.' # @echo "This number better be 1 ->" | tr -d '\012' @echo "This number better be 1 ->" | tr -d '\012\015' # @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l @@ -318,11 +322,15 @@ nofmtch:: strftime:: : this test could fail on slow machines or on a second boundary, : so if it does, double check the actual results -# @date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; - @$(DATE) | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ +# @LC_ALL=C; export LC_ALL; LANC=C; export LANG; \ +# date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ +# This was changed for DOS to avoid the command-line length limit. + @LC_ALL=C; export LC_ALL; LANC=C; export LANG; $(DATE) > strf + @cat strf | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ print > "strftime.ok" ; \ print strftime() > "'_$@'" }' - $(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 +# $(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 + $(CMP) strftime.ok _$@ && rm -f _$@ strf strftime.ok || exit 0 litoct:: @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ @@ -480,15 +488,101 @@ tradanch:: $(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ nlfldsep:: - AWK=$(AWK); export AWK; $(srcdir)/nlfldsep.sh > _$@ + @$(AWK) -f $(srcdir)/nlfldsep.awk $(srcdir)/nlfldsep.in > _$@ $(CMP) $(srcdir)/nlfldsep.ok _$@ && rm -f _$@ splitvar:: @$(AWK) -f $(srcdir)/splitvar.awk $(srcdir)/splitvar.in >_$@ $(CMP) $(srcdir)/splitvar.ok _$@ && rm -f _$@ +intest:: + @$(AWK) -f $(srcdir)/intest.awk >_$@ + $(CMP) $(srcdir)/intest.ok _$@ && rm -f _$@ + +# AIX /bin/sh exec's the last command in a list, therefore issue a ":" +# command so that pid.sh is fork'ed as a child before being exec'ed. +pid:: + @echo 'Expect pid to fail in DOS.' + @AWKPATH=$(srcdir) AWK=$(AWK) $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : + -$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` _`basename $@`.in + +strftlng:: + @echo 'Edit test/Makefile if you use MSC6, since strftlng will fail.' + @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ + @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ + TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ + fi + $(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ + +nfldstr:: + @echo | $(AWK) '$$1 == 0 { print "bug" }' > _$@ + $(CMP) $(srcdir)/nfldstr.ok _$@ && rm -f _$@ + +nors:: +# @echo A B C D E | tr -d '\12' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ + @echo A B C D E | tr -d '\15\12' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ + $(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@ + +fnarydel:: + @$(AWK) -f $(srcdir)/fnarydel.awk >_$@ + $(CMP) $(srcdir)/fnarydel.ok _$@ && rm -f _$@ + +reint:: + @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ + $(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ + +noparms:: + @-AWKPATH=$(srcdir) $(AWK) -f noparms.awk >_$@ 2>&1 || exit 0 + $(CMP) $(srcdir)/noparms.ok _$@ && rm -f _$@ + +pipeio1:: + @echo 'Pipeio1 is set to ignore errors. However, there should not be any.' + @echo 'If pipeio1 fails, set sh to swap to disk only (in sh.rc).' + @echo 'If it still hangs with EMX gawk type ^C, then try the test when' + @echo 'not using DPMI and RSX (in particular, run outside MS-Windows).' + @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ + @rm -f test1 test2 + -$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ + +pipeio2:: +# This would fail were it not for the "cat" line due to DOS's ECHO command. + @echo 'pipeio may fail due to the way that your tr & echo work in DOS' + @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ + @cat _$@ | $(AWK) '{ sub("ECHO is.*","",$$0); print $$0 } ' > _$@.2 +# $(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ + -diff -w $(srcdir)/pipeio2.ok _$@.2 && rm -f _$@ _$@.2 + +funstack:: + @echo 'Expect funstack to fail with MSC DOS versions.' + -@$(AWK) -f $(srcdir)/funstack.awk $(srcdir)/funstack.in >_$@ && $(CMP) $(srcdir)/funstack.ok _$@ && rm -f _$@ + +clobber:: + @$(AWK) -f $(srcdir)/clobber.awk >_$@ + $(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ + @rm -f seq + +delarprm:: + @$(AWK) -f $(srcdir)/delarprm.awk >_$@ + $(CMP) $(srcdir)/delarprm.ok _$@ && rm -f _$@ + +prdupval:: + @$(AWK) -f $(srcdir)/prdupval.awk $(srcdir)/prdupval.in >_$@ + $(CMP) $(srcdir)/prdupval.ok _$@ && rm -f _$@ + +nondec:: +# This was changed for DOS to avoid the command-line length limit. +# @if grep BITOP ../config.h | grep define > /dev/null; \ +# then \ +# $(AWK) -f $(srcdir)/nondec.awk >_$@; \ +# else \ +# cp $(srcdir)/nondec.ok _$@; \ +# fi + @echo "Don't worry if nondec fails" + $(AWK) -f $(srcdir)/nondec.awk >_$@; + -$(CMP) $(srcdir)/nondec.ok _$@ && rm -f _$@ + clean: - rm -fr _* core junk out1 out2 out3 strftime.ok *~ + rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ distclean: clean rm -f Makefile diff --git a/pc/config.h b/pc/config.h index ff6ed616..7140ac80 100644 --- a/pc/config.h +++ b/pc/config.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 1995 the Free Software Foundation, Inc. + * Copyright (C) 1995-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. @@ -128,6 +128,9 @@ #define REGEX_MALLOC 1 /* use malloc instead of alloca in regex.c */ #define SPRINTF_RET int /* return type of sprintf */ +/* #define BITOPS 1 */ /* bitwise ops (undocumented feature) */ +/* #define NONDECDATA 1 */ /* non-decimal input data (undocumented feature) */ + /* Define if you have the fmod function. */ #define HAVE_FMOD 1 @@ -211,3 +214,7 @@ void * alloca(unsigned); #if defined(DJGPP) # define HAVE_LIMITS_H #endif + +#if defined(__WIN32__) && defined(__CRTRSXNT__) +#include <crtrsxnt.h> +#endif diff --git a/pc/install.awk b/pc/install.awk index 1b125d47..67113898 100644 --- a/pc/install.awk +++ b/pc/install.awk @@ -53,7 +53,7 @@ while (getline < igawk) print $0 > igawk_cmd printf("@sh %s/bin/igawk %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9", prefix) > igawk_bat # Do common -cp(igawk " gawk.exe " prefix "/bin") +cp(igawk " *awk.exe " prefix "/bin") mkinstalldirs(prefix "/lib/awk " prefix "/man/man1 " prefix "/info") cp("awklib/eg/lib/* pc/awklib/igawk.awk " prefix "/lib/awk"); cp("doc/*.1 " prefix "/man/man1"); |