| 1 |
# Makefile for GNU Awk test suite. |
| 2 |
# |
| 3 |
# Copyright (C) 1988-2025 the Free Software Foundation, Inc. |
| 4 |
# |
| 5 |
# This file is part of GAWK, the GNU implementation of the |
| 6 |
# AWK Programming Language. |
| 7 |
# |
| 8 |
# GAWK is free software; you can redistribute it and/or modify |
| 9 |
# it under the terms of the GNU General Public License as published by |
| 10 |
# the Free Software Foundation; either version 3 of the License, or |
| 11 |
# (at your option) any later version. |
| 12 |
# |
| 13 |
# GAWK is distributed in the hope that it will be useful, |
| 14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
# GNU General Public License for more details. |
| 17 |
# |
| 18 |
# You should have received a copy of the GNU General Public License |
| 19 |
# along with this program; if not, write to the Free Software |
| 20 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
| 21 |
|
| 22 |
# ============================================================================ |
| 23 |
# MS-DOS & OS/2 Notes: READ THEM! |
| 24 |
# ============================================================================ |
| 25 |
|
| 26 |
# As of version 2.91, efforts to make this makefile run in MS-DOS and OS/2 |
| 27 |
# have started in earnest. The following steps need to be followed in order |
| 28 |
# to run this makefile: |
| 29 |
# |
| 30 |
# 1. The first thing that you will need to do is to convert all of the |
| 31 |
# files ending in ".ok" in the test directory, all of the files ending |
| 32 |
# in ".good" (or ".goo") in the test/reg directory, and mmap8k.in from |
| 33 |
# having a linefeed to having carriage return/linefeed at the end of each |
| 34 |
# line. There are various public domain UNIX to DOS converters and any |
| 35 |
# should work. Alternatively, you can use diff instead of cmp--most |
| 36 |
# versions of diff don't care about how the lines end. |
| 37 |
# |
| 38 |
# 2. You will need an sh-compatible shell. Please refer to the "README.pc" |
| 39 |
# file in the README_d directory for information about obtaining a copy. |
| 40 |
# You will also need various UNIX utilities. At a minimum, you will |
| 41 |
# need: rm, tr, cmp (or diff, see above), cat, wc, and sh. |
| 42 |
# You should also have a UNIX-compatible date program. |
| 43 |
# |
| 44 |
# The makefile has only been tested with dmake 3.8 and DJGPP Make 3.74 or |
| 45 |
# later. After making all of these changes, typing "dmake check extra" |
| 46 |
# or "make check extra" (with DJGPP Make) should run successfully. |
| 47 |
|
| 48 |
# The Bash shell (compiled with djgpp) works very well with the |
| 49 |
# djgpp-compiled gawk. It is currently the recommended shell to use |
| 50 |
# for testing, along with DJGPP make. See README.pc for |
| 51 |
# more information on OS/2 and DOS shells. |
| 52 |
|
| 53 |
# You will almost certainly need to change some of the values (MACROS) |
| 54 |
# defined on the next few lines. |
| 55 |
|
| 56 |
# This won't work unless you have "sh" and set SHELL equal to it (Make 3.74 |
| 57 |
# or later which comes with DJGPP will work with SHELL=/bin/sh if you have |
| 58 |
# sh.exe anywhere on your PATH). |
| 59 |
#SHELL = e:\bin\sh.exe |
| 60 |
SHELL = /bin/sh |
| 61 |
|
| 62 |
# Point to gawk |
| 63 |
AWK = AWKLIBPATH=../extension GAWK_NO_MPFR_WARN=1 $(AWKPROG) |
| 64 |
AWKPROG = ../gawk.exe |
| 65 |
# Point $(LS) to a version of ls.exe that reports true Windows file |
| 66 |
# index numbers, because this is what the readdir test expects. |
| 67 |
# Otherwise, the readdir test will fail. (The MSYS ls.exe doesn't |
| 68 |
# report full index values.) |
| 69 |
LS = ls.exe |
| 70 |
|
| 71 |
# Set your cmp command here (you can use most versions of diff instead of cmp |
| 72 |
# if you don't want to convert the .ok files to the DOS CR/LF format). |
| 73 |
# This is also an issue for the "mmap8k" test. If it fails, make sure that |
| 74 |
# mmap8k.in has CR/LFs or that you've used diff. |
| 75 |
# |
| 76 |
# The following comment is for users of OSs which support long file names |
| 77 |
# (such as Windows 95) for all versions of gawk (both 16 & 32-bit). |
| 78 |
# If you use a shell which doesn't support long filenames, temporary files |
| 79 |
# created by this makefile will be truncated by your shell. "_argarra" is an |
| 80 |
# example of this. If $(CMP) is a DJGPP-compiled program, then it will fail |
| 81 |
# because it looks for the long filename (eg. _argarray). To fix this, you |
| 82 |
# need to set LFN=n in your shell's environment. |
| 83 |
# NOTE: Setting LFN in the makefile most probably won't help you because LFN |
| 84 |
# needs to be an environment variable. |
| 85 |
#CMP = cmp |
| 86 |
# See the comment above for why you might want to set CMP to "env LFN=n diff" |
| 87 |
#CMP = env LFN=n diff |
| 88 |
#CMP = diff |
| 89 |
CMP = diff -u |
| 90 |
#CMP = gcmp |
| 91 |
|
| 92 |
# cmp replacement program for PC where the error messages aren't |
| 93 |
# exactly the same. Should run even on old awk. |
| 94 |
TESTOUTCMP = $(AWK) -f ../testoutcmp.awk |
| 95 |
|
| 96 |
# Set your "cp," "mv," and "mkdir" commands here. Note: DOS's copy must take |
| 97 |
# forward slashes. |
| 98 |
CP = cp |
| 99 |
#CP = : && command -c copy |
| 100 |
#CP = command.com /c copy |
| 101 |
|
| 102 |
#MV = cmd.exe /c ren |
| 103 |
MV = mv |
| 104 |
|
| 105 |
MKDIR = mkdir |
| 106 |
#MKDIR = gmkdir |
| 107 |
#MKDIR = : && command -c mkdir |
| 108 |
#MKDIR = command.com /c mkdir |
| 109 |
|
| 110 |
# Set your unix-style date function here |
| 111 |
#DATE = date |
| 112 |
DATE = gdate |
| 113 |
|
| 114 |
# Set sort command |
| 115 |
SORT = sort |
| 116 |
SORT2 = sort |
| 117 |
|
| 118 |
# MS-DOS and OS/2 use ; as a PATH delimiter |
| 119 |
PATH_SEPARATOR = ; |
| 120 |
|
| 121 |
# Argument to -F to produce -F/, should be // for MinGW, / otherwise, |
| 122 |
# because MSYS Bash converts a single slash to the equivalent Windows |
| 123 |
# directory. |
| 124 |
SLASH = / |
| 125 |
#SLASH = // |
| 126 |
|
| 127 |
# Non-default GREP_OPTIONS might fail the badargs test |
| 128 |
export GREP_OPTIONS= |
| 129 |
|
| 130 |
# ============================================================================ |
| 131 |
# You shouldn't need to modify anything below this line. |
| 132 |
# ============================================================================ |
| 133 |
|
| 134 |
srcdir = . |
| 135 |
abs_srcdir = . |
| 136 |
abs_builddir = . |
| 137 |
top_srcdir = "$(srcdir)"/.. |
| 138 |
abs_top_builddir = "$(top_srcdir)" |
| 139 |
|