After applying this patch, you should remove these obsolete files: Only in ../make-3.75: README.WIN32 Only in ../make-3.75: TAGS Only in ../make-3.75: config.h.WIN32 Only in ../make-3.75: make.aux Only in ../make-3.75: make.cp Only in ../make-3.75: make.cps Only in ../make-3.75: make.fn Only in ../make-3.75: make.fns Only in ../make-3.75: make.ky Only in ../make-3.75: make.pg Only in ../make-3.75: make.toc Only in ../make-3.75: make.tp Only in ../make-3.75: make.vr Only in ../make-3.75: tags diff -crP ../make-3.75/AUTHORS ./AUTHORS *** ../make-3.75/AUTHORS Wed Dec 31 19:00:00 1969 --- ./AUTHORS Wed Aug 27 16:30:54 1997 *************** *** 0 **** --- 1,50 ---- + ----------------------------------- + + GNU make development up to version 3.75 by: + Roland McGrath + + + GNU Make User's Manual written by: + Richard M. Stallman + + User's Manual edited by: + Roland McGrath + Bob Chassell + Melissa Weisshaus + + + Development and maintenance starting with GNU make 3.76 by: + Paul D. Smith + + + ----------------------------------- + GNU Make porting efforts: + + Port to VMS by: + Klaus Kaempf + Archive support/Bug fixes by John W. Eaton + + Port to Amiga by: + Aaron Digulla + + + Port to MS-DOS (DJGPP) and MS-Windows 95/NT by: + DJ Delorie + Rob Tulloh + Eli Zaretskii + + ----------------------------------- + Other contributors: + + Janet Carson + Paul Eggert + Klaus Heinz + Michael Joosten + Jim Kelton + David Lubbren + Andreas Schwab + Carl Staelin (Princeton University) + Ian Stewartson (Data Logic Limited) + + With suggestions/comments/bug reports from a cast of ... well ... + hundreds, anyway :) diff -crP ../make-3.75/COPYING ./COPYING *** ../make-3.75/COPYING Mon Jun 3 16:36:55 1991 --- ./COPYING Tue Dec 10 19:49:47 1996 *************** *** 2,8 **** Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. --- 2,9 ---- Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 59 Temple Place - Suite 330, Boston, MA ! 02111-1307, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. *************** *** 305,311 **** 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., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. --- 306,312 ---- 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. Also add information on how to contact you by electronic and paper mail. diff -crP ../make-3.75/ChangeLog ./ChangeLog *** ../make-3.75/ChangeLog Wed Aug 28 17:11:43 1996 --- ./ChangeLog Tue Sep 16 10:19:43 1997 *************** *** 1,3 **** --- 1,362 ---- + Tue Sep 16 10:18:22 1997 Paul D. Smith + + * Version 3.76 released. + + Tue Sep 2 10:07:39 1997 Paul D. Smith + + * function.c (expand_function): When processing $(shell...) + translate a CRLF (\r\n) sequence as well as a newline (\n) to a + space. Also remove an ending \r\n sequence. + * make.texinfo (Shell Function): Document it. + + Fri Aug 29 12:59:06 1997 Rob Tulloh + + * w32/pathstuff.c (convert_Path_to_windows32): Fix problem where + paths which contain single character entries like `.' are not + handled correctly. + + * README.W32: Document path handling issues on Windows systems. + + Fri Aug 29 02:01:27 1997 Paul D. Smith + + * Version 3.75.93. + + Thu Aug 28 19:39:06 1997 Rob Tulloh + + * job.c (exec_command): [WINDOWS32] If exec_command() is invoked + from main() to re-exec make, the call to execvp() would + incorrectly return control to parent shell before the exec'ed + command could run to completion. I believe this is a feature of + the way that execvp() is implemented on top of WIN32 APIs. To + alleviate the problem, use the supplied process launch function in + the sub_proc library and suspend the parent process until the + child process has run. When the child exits, exit the parent make + with the exit code of the child make. + + Thu Aug 28 17:04:47 1997 Paul D. Smith + + * Makefile.DOS.template (distdir): Fix a line that got wrapped in + email. + + * Makefile.am (loadavg): Give the necessary cmdline options when + linking loadavg. + + * configure.in: Check for pstat_getdynamic for getloadvg on HP. + + * job.c (start_job_command): [VMS,_AMIGA] Don't perform empty + command optimization on these systems; it doesn't make sense. + + Wed Aug 27 17:09:32 1997 Paul D. Smith + + * Version 3.75.92 + + Tue Aug 26 11:59:15 1997 Paul D. Smith + + * main.c (print_version): Add '97 to copyright years. + + * read.c (do_define): Check the length of the array before looking + at a particular offset. + + * job.c (construct_command_argv_internal): Examine the last byte + of the previous arg, not the byte after that. + + Sat Aug 23 1997 Eli Zaretskii + + * Makefile.DOS.template: New file (converted to Makefile.DOS in + the distribution). + + * configure.bat: Rewrite to use Makefile.DOS instead of editing + Makefile.in. Add support for building from outside of the source + directory. Fail if the environment block is too small. + + * configh.dos: Use . + + * README.DOS: Update instructions. + + Fri Aug 22 1997 Eli Zaretskii + + * job.c (start_job_command): [__MSDOS__] Don't test for "/bin/sh" + literally, use value of unixy_shell instead. + + * filedef.h (NEW_MTIME): Use 1 less than maximum possible value if + time_t is unsigned. + + Sat Aug 16 00:56:15 1997 John W. Eaton + + * vmsify.c (vmsify, case 11): After translating `..' elements, set + nstate to N_OPEN if there are still more elements to process. + (vmsify, case 2): After translating `foo/bar' up to the slash, + set nstate to N_OPEN, not N_DOT. + + Fri Aug 8 15:18:09 1997 John W. Eaton + + * dir.c (vmsstat_dir): Leave name unmodified on exit. + * make.h (PATH_SEPARATOR_CHAR): Set to comma for VMS. + * vpath.c: Fix comments to refer to path separator, not colon. + (selective_vpath_search): Avoid Unixy slash handling for VMS. + + Thu Aug 7 22:24:03 1997 John W. Eaton + + * ar.c: [VMS] Don't declare ar_member_touch. + Delete VMS version of ar_member_date. + Enable non-VMS versions of ar_member_date and ar_member_date_1 for + VMS too. + * arscan.c (VMS_get_member_info): New function. + (ar_scan): Provide version for VMS systems. + (ar_name_equal): Simply compare name and mem on VMS systems. + Don't define ar_member_pos or ar_member_touch on VMS systems. + + * config.h-vms (pid_t, uid_t): Don't define. + + * remake.c: Delete declaration of vms_stat. + (name_mtime): Don't call vms_stat. + (f_mtime): [VMS] Funky time value manipulation no longer necessary. + + * file.c (print_file): [VMS] Use ctime, not cvt_time. + + * make.h: [VMS] Don't define POSIX. + + * makefile.com (filelist): Include ar and arscan. + Also include them in the link commands. + Don't define NO_ARCHIVES in cc command. + + * makefile.vms (ARCHIVES, ARCHIVES_SRC): Uncomment. + (defines): Delete NO_ARCHIVES from list. + + * remake.c (f_mtime): Only check to see if intermediate file is + out of date if it also exists (i.e., mtime != (time_t) -1). + + * vmsdir.h (u_long, u_short): Skip typedefs if using DEC C. + + Fri Jun 20 23:02:07 1997 Rob Tulloh + + * w32/subproc/sub_proc.c: Get W32 sub_proc to handle shebang + (#!/bin/sh) in script files correctly. + Fixed a couple of memory leaks. + Fixed search order in find_file() (w32/subproc/sub_proc.c) so that + files with extensions are preferred over files without extensions. + Added search for files with .cmd extension too. + * w32/subproc/misc.c (arr2envblk): Fixed memory leak. + + Mon Aug 18 09:41:08 1997 Paul D. Smith + + * Version 3.75.91 + + Fri Aug 15 13:50:54 1997 Paul D. Smith + + * read.c (do_define): Remember to count the newline after the endef. + + Thu Aug 14 23:14:37 1997 Paul D. Smith + + * many: Rewrote builds to use Automake 1.2. + + * AUTHORS: New file. + * maintMakefile: Contains maintainer-only make snippets. + * GNUmakefile: This now only runs the initial auto* tools. + * COPYING,texinfo.tex,mkinstalldirs,install-sh: Removed (obtained + automatically by automake). + * compatMakefile: Removed (not needed anymore). + * README,build.sh.in: Removed (built from templates). + * config.h.in,Makefile.in: Removed (built by tools). + + Wed Aug 13 02:22:08 1997 Paul D. Smith + + * make.texinfo: Updates for DOS/Windows information (Eli Zaretskii) + * README,README.DOS: Ditto. + + * remake.c (update_file_1,f_mtime): Fix GPATH handling. + * vpath.c (gpath_search): Ditto. + + * file.c (rename_file): New function: rehash, but also rename to + the hashname. + * filedef.h: Declare it. + + * variable.c (merge_variable_set_lists): Remove free() of variable + set; since various files can share variable sets we don't want to + free them here. + + Tue Aug 12 10:51:54 1997 Paul D. Smith + + * configure.in: Require autoconf 2.12 + + * make.texinfo: Replace all "cd subdir; $(MAKE)" examples with a + more stylistically correct "cd subdir && $(MAKE)". + + * main.c: Global variable `clock_skew_detected' defined. + (main): Print final warning if it's set. + * make.h: Declare it. + * remake.c (f_mtime): Test and set it. + + * job.c (start_job_command): Add special optimizations for + "do-nothing" rules, containing just the shell no-op ":". This is + useful for timestamp files and can make a real difference if you + have a lot of them (requested by Fergus Henderson ). + + * configure.in,Makefile.in: Rewrote to use the new autoconf + program_transform_name macro. + + * function.c (function_strip): Strip newlines as well as spaces + and TABs. + + Fri Jun 6 23:41:04 1997 Rob Tulloh + + * remake.c (f_mtime): Datestamps on FAT-based files are rounded to + even seconds when stored, so if the date check fails on WINDOWS32 + systems, see if this "off-by-one" error is the problem. + + * General: If your TZ environment variable is not set correctly + then all your timestamps will be off by hours. So, set it! + + Mon Apr 7 02:06:22 1997 Paul D. Smith + + * Version 3.75.1 + + * compatMakefile (objs): Define & use the $(GLOB) variable so + that it's removed correctly from build.sh.in when it's built. + + * configure.in: On Solaris we can use the kstat_*() functions to + get load averages without needing special permissions. Add a + check for -lkstat to see if we have it. + + * getloadavg.c (getloadavg): Use HAVE_LIBKSTAT instead of SUN5 as + the test to enable kstat_open(), etc. processing. + + Fri Apr 4 20:21:18 1997 Eli Zaretskii + + * : Fixes to work in the DJGPP DOS environment. + + Mon Mar 31 02:42:52 1997 Paul D. Smith + + * function.c (expand_function): Added new function $(wordlist). + + * make.texinfo (Filename Functions): Document $(wordlist) function. + + * vpath.c (build_vpath_lists): Construct the GPATH variable + information in the same manner we used to construct VPATH. + (gpath_search): New function to search GPATH. + + * make.h: Declare the new function. + + * remake.c (update_file_1): Call it, and keep VPATH if it's found. + + * make.texinfo (Search Algorithm): Document GPATH variable. + + Sun Mar 30 20:57:16 1997 Paul D. Smith + + * main.c (handle_non_switch_argument): Defined the MAKECMDGOALS + variable to contain the user options passed in on the cmd line. + + * make.texinfo (Goals): Document MAKECMDGOALS variable. + + * remake.c (f_mtime): Print a warning if we detect a clock skew + error, rather than failing. + + * main.c (main): If we rebuild any makefiles and need to re-exec, + add "-o" options for each makefile rebuilt to avoid + infinite looping. + + Fri Mar 28 15:26:05 1997 Paul D. Smith + + * job.c (construct_command_argv_internal): Track whether the last + arg in the cmd string was empty or not (Roland). + (construct_command_argv_internal): If the shell line is empty, + don't do anything (Roland). + + * glob/glob.h,glob/glob.c,glob/fnmatch.c,glob/fnmatch.h: Install + the latest changes from the GLIBC version of glob (Ulrich Drepper). + + * getloadavg.c,make-stds.texi: New version (Roland). + + * (ALL): Changed WIN32 to W32 or WINDOWS32 (RMS). + + Mon Mar 24 15:33:34 1997 Rob Tulloh + + * README.W32: Describe preliminary FAT support. + + * build_w32.bat: Use a variable for the final exe name. + + * dir.c (find_directory): W32: Find the filesystem type. + (dir_contents_file_exists_p): W32: for FAT filesystems, always + rehash since FAT doesn't change directory mtime on change. + + * main.c (handle_runtime_exceptions): W32: Add an + UnhandledExceptionFilter so that when make bombs due to ^C or a + bug, it won't cause a GUI requestor to pop up unless debug is + turned on. + (main): Call it. + + Mon Mar 24 00:57:34 1997 Paul D. Smith + + * configure.in, config.h.in, config.ami, config.h-vms, config.h.w32: + Check for memmove() function. + + * make.h (bcopy): If memmove() available, define bcopy() to use it. + Otherwise just use bcopy(). Don't use memcpy(); it's not guaranteed + to handle overlapping moves. + + * read.c (read_makefile): Fix some uninitialized memory reads + (reported by Purify). + + * job.c (construct_command_argv_internal): Use bcopy() not + strcpy(); strcpy() isn't guaranteed to handle overlapping moves. + + * Makefile.in: Change install-info option ``--infodir'' to + ``--info-dir'' for use with new texinfo. + + * function.c (expand_function): $(basename) and $(suffix) should + only search for suffixes as far back as the last directory (e.g., + only the final filename in the path). + + Sun Mar 23 00:13:05 1997 Paul D. Smith + + * make.texinfo: Add @dircategory/@direntry information. + (Top): Remove previous reference to (dir) (from RMS). + (Static Usage): Add "all:" rule to example. + (Automatic Dependencies): fix .d file creation example. + + * Install VPATH+ patch: + + * filedef.h (struct file): Add in hname field to store the hashed + filename, and a flag to remember if we're using the vpath filename + or not. Renamed a few functions for more clarity. + + * file.c (lookup_file,enter_file,file_hash_enter): Store filenames + in the hash table based on their "hash name". We can change this + while keeping the original target in "name". + (rehash_file): Renamed from "rename_file" to be more accurate. + Changes the hash name, but not the target name. + + * remake.c (update_file_1): Modify -d output for more detailed + VPATH info. If we don't need to rebuild, use the VPATH name. + (f_mtime): Don't search for vpath if we're ignoring it. Call + renamed function rehash_file. Call name_mtime instead of + file_mtime, to avoid infinite recursion since the file wasn't + actually renamed. + + * implicit.c (pattern_search): if we find an implicit file in + VPATH, save the original name not the VPATH name. + + * make.texinfo (Directory Search): Add a section on the new VPATH + functionality. + + Sun Dec 1 18:36:04 1996 Andreas Schwab + + * dir.c (file_exists_p, file_impossible, file_impossible_p): If + dirname is empty replace it by the name of the root directory. + Note that this doesn't work (yet) for W32, Amiga, or VMS. + + Tue Oct 08 13:57:03 1996 Rob Tulloh + + * main.c (main): W32 bug fix for PATH vars. + + Tue Sep 17 1996 Paul Eggert + + * filedef.h (NEW_MTIME): Don't assume that time_t is a signed + 32-bit quantity. + + * make.h: (CHAR_BIT, INTEGER_TYPE_SIGNED, INTEGER_TYPE_MAXIMUM, + INTEGER_TYPE_MINIMUM): New macros. + Tue Aug 27 01:06:34 1996 Roland McGrath * Version 3.75 released. *************** *** 11,27 **** Sun Jul 28 15:37:09 1996 Rob Tulloh (tulloh@tivoli.com) ! * w32/pathstuff.c: Turned convert_vpath_to_win32() into a real function. This was done so that VPATH could contain white space separated pathnames. Please note that directory paths (in VPATH/vpath context) containing white space are not ! supported (just as they are not under Unix). See README.WIN32 for suggestions. * w32/include/pathstuff.h: Added prototype for the new ! function convert_vpath_to_win32. Deleted macro for same. ! * README.WIN32: Added some notes about why I chose not to try and support pathnames which contain white space and some workaround suggestions. --- 370,386 ---- Sun Jul 28 15:37:09 1996 Rob Tulloh (tulloh@tivoli.com) ! * w32/pathstuff.c: Turned convert_vpath_to_w32() into a real function. This was done so that VPATH could contain white space separated pathnames. Please note that directory paths (in VPATH/vpath context) containing white space are not ! supported (just as they are not under Unix). See README.W32 for suggestions. * w32/include/pathstuff.h: Added prototype for the new ! function convert_vpath_to_w32. Deleted macro for same. ! * README.W32: Added some notes about why I chose not to try and support pathnames which contain white space and some workaround suggestions. *************** *** 43,49 **** * vmsfunctions.c (vms_stat): `sys$dassgn (DevChan);' added by kkaempf. ! * GNUmakefile (win32files): Add NMakefile. * NMakefile (LDFLAGS_debug): Value fixed by tulloh. --- 402,408 ---- * vmsfunctions.c (vms_stat): `sys$dassgn (DevChan);' added by kkaempf. ! * GNUmakefile (w32files): Add NMakefile. * NMakefile (LDFLAGS_debug): Value fixed by tulloh. *************** *** 61,67 **** * Version 3.74.6. ! * GNUmakefile (win32files): New variable. (distfiles): Add it. * w32: Updated by Rob Tulloh. --- 420,426 ---- * Version 3.74.6. ! * GNUmakefile (w32files): New variable. (distfiles): Add it. * w32: Updated by Rob Tulloh. *************** *** 132,153 **** Wed May 15 10:14:14 CDT 1996 Rob Tulloh ! * dir.c: WIN32 does not support inode. For now, fully qualified pathname along with st_mtime will be keys for files. Fixed problem where vpath can be confused when files are added to a directory after the directory has already been read in. The code now attempts to reread the directory if it discovers that the datestamp on the directory has changed since ! it was cached by make. This problem only seems to occur on WIN32 ! right now so it is lumped under port #ifdef WIN32. ! * function.c: WIN32: call subproc library (CreateProcess()) instead of fork/exec. ! * job.c: WIN32: Added the code to do fork/exec/waitpid style processing ! on WIN32 systems via calls to subproc library. ! * main.c: WIN32: Several things added here. First, there is code for dealing with PATH and SHELL defaults. Make tries to figure out if the user has %PATH% set in the environment and sets it to %Path% if it is not set already. Make also looks to see if sh.exe --- 491,512 ---- Wed May 15 10:14:14 CDT 1996 Rob Tulloh ! * dir.c: W32 does not support inode. For now, fully qualified pathname along with st_mtime will be keys for files. Fixed problem where vpath can be confused when files are added to a directory after the directory has already been read in. The code now attempts to reread the directory if it discovers that the datestamp on the directory has changed since ! it was cached by make. This problem only seems to occur on W32 ! right now so it is lumped under port #ifdef WINDOWS32. ! * function.c: W32: call subproc library (CreateProcess()) instead of fork/exec. ! * job.c: W32: Added the code to do fork/exec/waitpid style processing ! on W32 systems via calls to subproc library. ! * main.c: W32: Several things added here. First, there is code for dealing with PATH and SHELL defaults. Make tries to figure out if the user has %PATH% set in the environment and sets it to %Path% if it is not set already. Make also looks to see if sh.exe *************** *** 160,224 **** debugging recursive calls to make where problems appear only in the sub-make. ! * make.h: WIN32: A few macros and header files for WIN32 support. ! * misc.c: WIN32: Added a function end_of_token_w32() to assist in parsing code in read.c. ! * read.c: WIN32: Fixes similar to MSDOS which allow colon to appear in filenames. Use of colon in filenames would otherwise confuse make. ! * remake.c: WIN32: Added include of io.h to eliminate compiler warnings. Added some code to default LIBDIR if it is not set ! on WIN32. ! * variable.c: WIN32: Added support for detecting Path/PATH and converting them to semicolon separated lists for make's internal use. New function sync_Path_environment() which is called in job.c and function.c before creating a new process. Caller must set Path in environment since we don't have fork() to do this for us. ! * vpath.c: WIN32: Added detection for filenames containing forward or backward slashes. ! * NMakefile: WIN32: Visual C compatible makefile for use with nmake. Use this to build GNU make the first time on Windows NT or Windows 95. ! * README.WIN32: WIN32: Contains some helpful notes. ! * build_w32.bat: WIN32: If you don't like nmake, use this the first time you build GNU make on Windows NT or Windows 95. ! * config.h.WIN32: WIN32 version of config.h ! * subproc.bat: WIN32: A bat file used to build the subproc library from the top-level NMakefile. Needed because WIndows 95 (nmake) doesn't allow you to cd in a make rule. * w32/include/dirent.h ! * w32/compat/dirent.c: WIN32: opendir, readdir, closedir, etc. ! * w32/include/pathstuff.h: WIN32: used by files needed functions defined in pathstuff.c (prototypes). ! * w32/include/sub_proc.h: WIN32: prototypes for subproc.lib functions. ! * w32/include/w32err.h: WIN32: prototypes for w32err.c. ! * w32/pathstuff.c: WIN32: File and Path/Path conversion functions. ! * w32/subproc/build.bat: WIN32: build script for subproc library if you don't wish to use nmake. ! * w32/subproc/NMakefile: WIN32: Visual C compatible makefile for use with nmake. Used to build subproc library. ! * w32/subproc/misc.c: WIN32: subproc library support code ! * w32/subproc/proc.h: WIN32: subproc library support code ! * w32/subproc/sub_proc.c: WIN32: subproc library source code ! * w32/subproc/w32err.c: WIN32: subproc library support code Mon May 13 14:37:42 1996 Roland McGrath --- 519,583 ---- debugging recursive calls to make where problems appear only in the sub-make. ! * make.h: W32: A few macros and header files for W32 support. ! * misc.c: W32: Added a function end_of_token_w32() to assist in parsing code in read.c. ! * read.c: W32: Fixes similar to MSDOS which allow colon to appear in filenames. Use of colon in filenames would otherwise confuse make. ! * remake.c: W32: Added include of io.h to eliminate compiler warnings. Added some code to default LIBDIR if it is not set ! on W32. ! * variable.c: W32: Added support for detecting Path/PATH and converting them to semicolon separated lists for make's internal use. New function sync_Path_environment() which is called in job.c and function.c before creating a new process. Caller must set Path in environment since we don't have fork() to do this for us. ! * vpath.c: W32: Added detection for filenames containing forward or backward slashes. ! * NMakefile: W32: Visual C compatible makefile for use with nmake. Use this to build GNU make the first time on Windows NT or Windows 95. ! * README.W32: W32: Contains some helpful notes. ! * build_w32.bat: W32: If you don't like nmake, use this the first time you build GNU make on Windows NT or Windows 95. ! * config.h.W32: W32 version of config.h ! * subproc.bat: W32: A bat file used to build the subproc library from the top-level NMakefile. Needed because WIndows 95 (nmake) doesn't allow you to cd in a make rule. * w32/include/dirent.h ! * w32/compat/dirent.c: W32: opendir, readdir, closedir, etc. ! * w32/include/pathstuff.h: W32: used by files needed functions defined in pathstuff.c (prototypes). ! * w32/include/sub_proc.h: W32: prototypes for subproc.lib functions. ! * w32/include/w32err.h: W32: prototypes for w32err.c. ! * w32/pathstuff.c: W32: File and Path/Path conversion functions. ! * w32/subproc/build.bat: W32: build script for subproc library if you don't wish to use nmake. ! * w32/subproc/NMakefile: W32: Visual C compatible makefile for use with nmake. Used to build subproc library. ! * w32/subproc/misc.c: W32: subproc library support code ! * w32/subproc/proc.h: W32: subproc library support code ! * w32/subproc/sub_proc.c: W32: subproc library source code ! * w32/subproc/w32err.c: W32: subproc library support code Mon May 13 14:37:42 1996 Roland McGrath diff -crP ../make-3.75/INSTALL ./INSTALL *** ../make-3.75/INSTALL Fri Nov 17 15:01:53 1995 --- ./INSTALL Sat Nov 9 17:19:34 1996 *************** *** 167,173 **** `--quiet' `--silent' `-q' ! Do not print messages saying which checks are being made. `--srcdir=DIR' Look for the package's source code in directory DIR. Usually --- 167,175 ---- `--quiet' `--silent' `-q' ! Do not print messages saying which checks are being made. To ! suppress all normal output, redirect it to `/dev/null' (any error ! messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually diff -crP ../make-3.75/Makefile.DOS ./Makefile.DOS *** ../make-3.75/Makefile.DOS Wed Dec 31 19:00:00 1969 --- ./Makefile.DOS Tue Sep 16 13:13:40 1997 *************** *** 0 **** --- 1,483 ---- + # -*-Makefile-*- template for DJGPP + # Makefile.in generated automatically by automake 1.2 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + # This Makefile.DOS is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + + # -*-Makefile-*-, or close enough + + + SHELL = /bin/sh + + srcdir = . + VPATH = $(srcdir) + # $DJDIR is defined automatically by DJGPP to point + # to the root of the DJGPP installation tree. + prefix = ${DJDIR} + exec_prefix = ${prefix} + + bindir = ${exec_prefix}/bin + datadir = ${prefix}/share + libdir = ${prefix}/lib + infodir = ${prefix}/info + # DJGPP doesn't have separate man tree, use info instead. + mandir = ${prefix}/info + includedir = ${prefix}/include + oldincludedir = c:/djgpp/include + + pkgdatadir = $(datadir)/make + pkglibdir = $(libdir)/make + pkgincludedir = $(includedir)/make + + INSTALL = ${bindir}/ginstall -c + INSTALL_PROGRAM = ${bindir}/ginstall -c + INSTALL_DATA = ${bindir}/ginstall -c -m 644 + INSTALL_SCRIPT = ${bindir}/ginstall -c + transform = s,x,x, + + # This will fail even if they don't have a Unix-like shell (stock DOS + # shell doesn't know about `false'). The only difference is that they + # get "Error -1" instead of "Error 1". + EXIT_FAIL = false + + NORMAL_INSTALL = true + PRE_INSTALL = true + POST_INSTALL = true + NORMAL_UNINSTALL = true + PRE_UNINSTALL = true + POST_UNINSTALL = true + AR = ar + CC = gcc + CPP = gcc -E + LIBOBJS = + MAKEINFO = ${bindir}/makeinfo + PACKAGE = make + RANLIB = ranlib + REMOTE = stub + VERSION = 3.76 + + AUTOMAKE_OPTIONS = 1.2 + + bin_PROGRAMS = make + + make_SOURCES = main.c commands.c job.c dir.c file.c misc.c read.c remake.c rule.c implicit.c default.c variable.c expand.c function.c vpath.c version.c ar.c arscan.c commands.h dep.h filedef.h job.h make.h rule.h variable.h signame.c signame.h getopt.c getopt1.c getopt.h remote-$(REMOTE).c + # This should include the glob/ prefix + libglob_a_SOURCES = glob/fnmatch.c glob/glob.c glob/fnmatch.h glob/glob.h + make_LDADD = glob/libglob.a + + info_TEXINFOS = make.texinfo + + INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"c:/djgpp/lib\" -DINCLUDEDIR=\"c:/djgpp/include\" + + BUILT_SOURCES = README build.sh.in + + EXTRA_DIST = make.man $(BUILT_SOURCES) remote-cstms.c make-stds.texi texinfo.tex SCOPTIONS SMakefile Makefile.ami README.Amiga config.ami amiga.c amiga.h NMakefile README.DOS configh.dos configure.bat makefile.com README.W32 build_w32.bat config.h.W32 subproc.bat make.lnk config.h-vms makefile.vms readme.vms vmsdir.h vmsfunctions.c vmsify.c + + SUBDIRS = glob + mkinstalldirs = ${bindir}/gmkdir -p + CONFIG_HEADER = config.h + CONFIG_CLEAN_FILES = build.sh + PROGRAMS = $(bin_PROGRAMS) + + + DEFS = -I. -I$(srcdir) -I. + CPPFLAGS = -DHAVE_CONFIG_H + LDFLAGS = + LIBS = + make_OBJECTS = main.o commands.o job.o dir.o file.o misc.o read.o remake.o rule.o implicit.o default.o variable.o expand.o function.o vpath.o version.o ar.o arscan.o signame.o getopt.o getopt1.o remote-$(REMOTE).o + make_DEPENDENCIES = glob/libglob.a + make_LDFLAGS = + libglob_a_LIBADD = + libglob_a_OBJECTS = fnmatch.o glob.o + noinst_LIBRARIES = glob/libglob.a + CFLAGS = -O2 -g + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) + LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + TEXI2DVI = texi2dvi + TEXINFO_TEX = $(srcdir)/texinfo.tex + INFO_DEPS = make.info + DVIS = make.dvi + TEXINFOS = make.texinfo + DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh.in config.h.in configure configure.in getloadavg.c install-sh missing mkinstalldirs stamp-h.in texinfo.tex + + + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + + TAR = gtar + GZIP = --best + SOURCES = $(make_SOURCES) + OBJECTS = $(make_OBJECTS) + HEADERS = $(wildcard $(srcdir)/*.h) + + default: all + + .SUFFIXES: + .SUFFIXES: .c .dvi .info .o .ps .texi .texinfo + + distclean-hdr: + rm -f config.h + + maintainer-clean-hdr: + + mostlyclean-binPROGRAMS: + + clean-binPROGRAMS: + test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + + distclean-binPROGRAMS: + + maintainer-clean-binPROGRAMS: + + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do if test -f $$p; then echo " $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | sed '$(transform)'`"; $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | sed '$(transform)'`; else :; fi; done + + uninstall-binPROGRAMS: + $(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do rm -f $(bindir)/`echo $$p|sed '$(transform)'`; done + + .c.o: + $(COMPILE) -c $< + + clean-noinstLIBRARIES: + test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + + mostlyclean-compile: + rm -f *.o *.exe make.new core + + clean-compile: + + distclean-compile: + rm -f *.tab.c + + maintainer-clean-compile: + + make: $(make_OBJECTS) $(make_DEPENDENCIES) + @command.com /c if exist make del make + @command.com /c if exist make.exe del make.exe + $(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS) + + make.info: make.texinfo + make.dvi: make.texinfo + + + DVIPS = dvips + + .texi.info: + $(MAKEINFO) $(srcdir)/$< -o ./$@ + + .texi.dvi: + TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + + .texi: + $(MAKEINFO) $(srcdir)/$< -o ./$@ + + .texinfo.info: + $(MAKEINFO) $(srcdir)/$< -o ./$@ + + .texinfo: + $(MAKEINFO) $(srcdir)/$< -o ./$@ + + .texinfo.dvi: + TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + + .dvi.ps: + $(DVIPS) $< -o $@ + + install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(infodir) + @for file in $(INFO_DEPS) make.i; do d=$(srcdir); for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9] $$file[0-9] $$file[0-9][0-9]`; do if test -f $$d/$$ifile; then echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; else : ; fi; done; done + @$(POST_INSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then for file in $(INFO_DEPS); do echo " install-info --info-dir=$(infodir) $(infodir)/$$file"; install-info --info-dir=$(infodir) $(infodir)/$$file || :; done; else : ; fi + + uninstall-info: + $(PRE_UNINSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then ii=yes; else ii=; fi; for file in $(INFO_DEPS); do test -z $ii || install-info --info-dir=$(infodir) --remove $$file; done + $(NORMAL_UNINSTALL) + for file in $(INFO_DEPS) make.i; do (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9] $$file[0-9] $$file[0-9][0-9]); done + + dist-info: $(INFO_DEPS) + for base in $(INFO_DEPS); do d=$(srcdir); for file in `cd $$d && eval echo $$base*`; do test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; done + + mostlyclean-aminfo: + rm -f make.aux make.cp make.cps make.dvi make.fn make.fns make.ky make.log make.pg make.toc make.tp make.tps make.vr make.vrs make.op make.tr make.cv + + clean-aminfo: + + distclean-aminfo: + + maintainer-clean-aminfo: + for i in $(INFO_DEPS) make.i; do rm -f `eval echo $$i*`; done + + # Assume that the only thing to do in glob is to build libglob.a, + # but do a sanity check: if $SUBDIRS will ever have more than + # a single directory, yell bloody murder. + all-recursive: + ifeq ($(words $(SUBDIRS)), 1) + @command.com /c if not exist glob\\nul md glob + @echo Making all in $(SUBDIRS) + $(MAKE) -C $(SUBDIRS) -f ../Makefile INCLUDES='-I$(srcdir) -I$(srcdir)/glob' DEFS='-I.. -I$(srcdir)' VPATH=$(srcdir)/glob libglob.a + else + @echo FATAL: There is more than one directory in "($(SUBDIRS))" + @$(EXIT_FAIL) + endif + + $(SUBDIRS): + command.com /c md $@ + + libglob.a: $(libglob_a_OBJECTS) + command.com /c if exist libglob.a del libglob.a + $(AR) cru libglob.a $(libglob_a_OBJECTS) $(libglob_a_LIBADD) + $(RANLIB) libglob.a + + mostlyclean-recursive clean-recursive distclean-recursive maintainer-clean-recursive: + ifeq ($(words $(SUBDIRS)), 1) + @echo Making $(shell echo $@ | sed s/-recursive//) in $(SUBDIRS) + $(MAKE) -C $(SUBDIRS) -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am + else + @echo FATAL: There is more than one directory in "($(SUBDIRS))" + @$(EXIT_FAIL) + endif + + tags-in-glob: $(libglob_a_SOURCES) + etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS + + tags-recursive: + ifeq ($(words $(SUBDIRS)), 1) + $(MAKE) tags-in-glob + else + @echo FATAL: There is more than one directory in "($(SUBDIRS))" + @$(EXIT_FAIL) + endif + + tags: TAGS + + ID: $(HEADERS) $(SOURCES) + mkid $(srcdir)/$(SOURCES) $(srcdir)/$(libglob_a_SOURCES) ./config.h $(HEADERS) + + TAGS: tags-recursive $(HEADERS) $(srcdir)/$(SOURCES) config.h $(TAGS_DEPENDENCIES) + etags -i ./glob/TAGS $(ETAGS_ARGS) $(srcdir)/$(SOURCES) ./config.h $(HEADERS) + + mostlyclean-tags: + + clean-tags: + + distclean-tags: + rm -f TAGS ID + + maintainer-clean-tags: + + distdir = $(PACKAGE)-$(VERSION) + top_distdir = $(distdir) + + # This target untars the dist file and tries a VPATH configuration. Then + # it guarantees that the distribution is self-contained by making another + # tarfile. + distcheck: dist + rm -rf $(distdir) + GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; cd $(distdir)/=build && ../configure --srcdir=.. --prefix=$$dc_install_base && $(MAKE) && $(MAKE) dvi && $(MAKE) check && $(MAKE) install && $(MAKE) installcheck && $(MAKE) dist + rm -rf $(distdir) + @echo "========================"; echo "$(distdir).tar.gz is ready for distribution"; echo "========================" + dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) + rm -rf $(distdir) + dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) + rm -rf $(distdir) + distdir: $(DISTFILES) + rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + @for file in $(DISTFILES); do d=$(srcdir); test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; for subdir in $(SUBDIRS); do test -d $(distdir)/$$subdir || mkdir $(distdir)/$$subdir || exit 1; chmod 777 $(distdir)/$$subdir; (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir)/$$subdir distdir=../$(distdir)/$$subdir distdir) || exit 1; done + $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info + $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook + alloca.o alloca.lo: alloca.c config.h + ar.o ar.lo: ar.c make.h config.h filedef.h dep.h glob/fnmatch.h + arscan.o arscan.lo: arscan.c make.h config.h + commands.o commands.lo: commands.c make.h config.h dep.h filedef.h variable.h job.h commands.h + default.o default.lo: default.c make.h config.h rule.h dep.h filedef.h job.h commands.h variable.h + dir.o dir.lo: dir.c make.h config.h glob/glob.h + expand.o expand.lo: expand.c make.h config.h filedef.h job.h commands.h variable.h + file.o file.lo: file.c make.h config.h dep.h filedef.h job.h commands.h variable.h + function.o function.lo: function.c make.h config.h filedef.h variable.h dep.h job.h commands.h + getloadavg.o getloadavg.lo: getloadavg.c config.h + getopt.o getopt.lo: getopt.c config.h getopt.h + getopt1.o getopt1.lo: getopt1.c config.h getopt.h + implicit.o implicit.lo: implicit.c make.h config.h rule.h dep.h filedef.h + job.o job.lo: job.c make.h config.h job.h filedef.h commands.h variable.h + main.o main.lo: main.c make.h config.h dep.h filedef.h variable.h job.h commands.h getopt.h + misc.o misc.lo: misc.c make.h config.h dep.h + read.o read.lo: read.c make.h config.h dep.h filedef.h job.h commands.h variable.h glob/glob.h + remake.o remake.lo: remake.c make.h config.h filedef.h job.h commands.h dep.h + remote-stub.o remote-stub.lo: remote-stub.c make.h config.h filedef.h job.h commands.h + rule.o rule.lo: rule.c make.h config.h dep.h filedef.h job.h commands.h variable.h rule.h + signame.o signame.lo: signame.c config.h signame.h + variable.o variable.lo: variable.c make.h config.h dep.h filedef.h job.h commands.h variable.h + version.o version.lo: version.c config.h + vpath.o vpath.lo: vpath.c make.h config.h filedef.h variable.h + fnmatch.o fnmatch.lo: fnmatch.c fnmatch.h ../config.h + glob.o glob.lo: glob.c fnmatch.h glob.h ../config.h + + info: $(INFO_DEPS) info-recursive + dvi: $(DVIS) dvi-recursive + check: all-am + $(MAKE) check-recursive check-local + installcheck: installcheck-recursive + all-recursive-am: config.h + $(MAKE) all-recursive + + all-am: Makefile $(INFO_DEPS) $(PROGRAMS) config.h + + install-exec-am: install-binPROGRAMS + + install-data-am: install-info-am + + uninstall-am: uninstall-binPROGRAMS uninstall-info + + install-exec: install-exec-recursive install-exec-am + @$(NORMAL_INSTALL) + + install-data: install-data-recursive install-data-am + @$(NORMAL_INSTALL) + + install: install-recursive install-exec-am install-data-am + @: + + uninstall: uninstall-recursive uninstall-am + + all: all-recursive-am all-am + + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: installdirs-recursive + $(mkinstalldirs) $(bindir) $(infodir) + + + mostlyclean-generic: + test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + + clean-generic: + test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + + distclean-generic: + rm -f Makefile $(DISTCLEANFILES) + rm -f config.cache config.log stamp-h stamp-h[0-9]* + test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + + maintainer-clean-generic: + test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS mostlyclean-compile mostlyclean-aminfo mostlyclean-tags mostlyclean-generic + + clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-aminfo clean-tags clean-generic mostlyclean-am + + distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile distclean-aminfo distclean-tags distclean-generic clean-am + + maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS maintainer-clean-compile maintainer-clean-aminfo maintainer-clean-tags maintainer-clean-generic distclean-am + + mostlyclean: mostlyclean-recursive mostlyclean-am + + clean: clean-noinstLIBRARIES clean-recursive clean-am + + distclean: distclean-recursive distclean-am + rm -f config.status + + maintainer-clean: maintainer-clean-recursive maintainer-clean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f config.status + + .PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ + maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \ + clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \ + install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \ + maintainer-clean-compile install-info-am uninstall-info \ + mostlyclean-aminfo distclean-aminfo clean-aminfo \ + maintainer-clean-aminfo install-data-recursive uninstall-data-recursive \ + install-exec-recursive uninstall-exec-recursive installdirs-recursive \ + uninstalldirs-recursive all-recursive check-recursive \ + installcheck-recursive info-recursive dvi-recursive \ + mostlyclean-recursive distclean-recursive clean-recursive \ + maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ + distclean-tags clean-tags maintainer-clean-tags distdir \ + mostlyclean-depend distclean-depend clean-depend \ + maintainer-clean-depend info dvi check-local installcheck \ + all-recursive-am all-am install-exec-am install-data-am uninstall-am \ + install-exec install-data install uninstall all installdirs \ + mostlyclean-generic distclean-generic clean-generic \ + maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + + # --------------- Local DIST Section + + # Install the w32 subdirectory + # + dist-hook: + (cd $(srcdir); \ + w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \ + tar chf - $$w32) \ + | (cd $(distdir); tar xfBp -) + + # --------------- Local CHECK Section + + check-local: check-loadavg check-regression + .PHONY: check-loadavg check-regression + + # > check-loadavg + # + loadavg: loadavg.c config.h + @rm -f loadavg + $(LINK) -DTEST $(make_LDFLAGS) loadavg.c $(LIBS) + # We copy getloadavg.c into a different file rather than compiling it + # directly because some compilers clobber getloadavg.o in the process. + loadavg.c: getloadavg.c + ln $(srcdir)/getloadavg.c loadavg.c || \ + cp $(srcdir)/getloadavg.c loadavg.c + check-loadavg: loadavg + @echo The system uptime program believes the load average to be: + -uptime + @echo The GNU load average checking code believes: + -./loadavg + + # > check-regression + # + # Look for the make test suite, and run it if found. Look in MAKE_TEST if + # specified, or else in the srcdir or the distdir, their parents, and _their_ + # parents. + # + check-regression: + here=`pwd`; testdir=""; \ + case "$(MAKE_TEST)" in "") \ + for d1 in $$here $(srcdir); do \ + for d2 in ../.. .. .; do \ + all=`echo $$d1/$$d2/make-test-[0-9]*/run_make_tests`; \ + case "$$all" in \ + "$$d1/$$d2/make-test-[0-9]*/run_make_tests") : ;; \ + *) try=`for x in $$all; do echo $$x; done | sort | tail -1`;\ + testdir=`dirname $$try` ;; esac; \ + done; done ;; \ + *) testdir="$(MAKE_TEST)" ;; \ + esac; \ + case "$$testdir" in \ + "") echo "Couldn't find make-test-* test suite."; exit 0;; \ + esac; \ + echo "cd $$testdir && ./run_make_tests -make_path $$here/make"; \ + cd $$testdir && ./run_make_tests -make_path $$here/make + + # --------------- Maintainer's Section + + # Note this requires GNU make. Not to worry, since it will only be included + # in the Makefile if we're in the maintainer's environment. + #include $(srcdir)/maintMakefile + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff -crP ../make-3.75/Makefile.am ./Makefile.am *** ../make-3.75/Makefile.am Wed Dec 31 19:00:00 1969 --- ./Makefile.am Fri Sep 5 17:01:53 1997 *************** *** 0 **** --- 1,95 ---- + # -*-Makefile-*-, or close enough + + AUTOMAKE_OPTIONS = 1.2 + + bin_PROGRAMS = make + + make_SOURCES = main.c commands.c job.c dir.c file.c misc.c read.c remake.c \ + rule.c implicit.c default.c variable.c expand.c function.c \ + vpath.c version.c ar.c arscan.c remote-$(REMOTE).c \ + commands.h dep.h filedef.h job.h make.h rule.h variable.h \ + signame.c signame.h \ + getopt.c getopt1.c getopt.h + make_LDADD = @LIBOBJS@ @ALLOCA@ glob/libglob.a + + info_TEXINFOS = make.texinfo + + INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" + + BUILT_SOURCES = README build.sh.in + + EXTRA_DIST = make.man $(BUILT_SOURCES) remote-cstms.c\ + make-stds.texi texinfo.tex SCOPTIONS SMakefile\ + README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h\ + README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\ + README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat\ + readme.vms makefile.vms makefile.com config.h-vms vmsdir.h\ + vmsfunctions.c vmsify.c + + SUBDIRS = glob + + # --------------- Local DIST Section + + # Install the w32 subdirectory + # + dist-hook: + (cd $(srcdir); \ + w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \ + tar chf - $$w32) \ + | (cd $(distdir); tar xfBp -) + + + # --------------- Local CHECK Section + + check-local: check-loadavg check-regression + .PHONY: check-loadavg check-regression + + # > check-loadavg + # + loadavg: loadavg.c config.h + @rm -f loadavg + $(LINK) -I. -I$(srcdir) -DHAVE_CONFIG_H -DTEST $(make_LDFLAGS) loadavg.c $(LIBS) + # We copy getloadavg.c into a different file rather than compiling it + # directly because some compilers clobber getloadavg.o in the process. + loadavg.c: getloadavg.c + ln $(srcdir)/getloadavg.c loadavg.c || \ + cp $(srcdir)/getloadavg.c loadavg.c + check-loadavg: loadavg + @echo The system uptime program believes the load average to be: + -uptime + @echo The GNU load average checking code believes: + -./loadavg + + # > check-regression + # + # Look for the make test suite, and run it if found. Look in MAKE_TEST if + # specified, or else in the srcdir or the distdir, their parents, and _their_ + # parents. + # + check-regression: + here=`pwd`; testdir=""; \ + case "$(MAKE_TEST)" in "") \ + for d1 in $$here $(srcdir); do \ + for d2 in ../.. .. .; do \ + all=`echo $$d1/$$d2/make-test-[0-9]*/run_make_tests`; \ + case "$$all" in \ + "$$d1/$$d2/make-test-[0-9]*/run_make_tests") : ;; \ + *) try=`for x in $$all; do echo $$x; done | sort | tail -1`;\ + testdir=`dirname $$try` ;; esac; \ + done; done ;; \ + *) testdir="$(MAKE_TEST)" ;; \ + esac; \ + case "$$testdir" in \ + "") echo "Couldn't find make-test-* test suite."; exit 0;; \ + esac; \ + echo "cd $$testdir && ./run_make_tests -make_path $$here/make"; \ + cd $$testdir && ./run_make_tests -make_path $$here/make + + + # --------------- Maintainer's Section + + if MAINT_MAKEFILE + # Note this requires GNU make. Not to worry, since it will only be included + # in the Makefile if we're in the maintainer's environment. + include $(srcdir)/maintMakefile + endif diff -crP ../make-3.75/Makefile.ami ./Makefile.ami *** ../make-3.75/Makefile.ami Mon May 13 14:39:40 1996 --- ./Makefile.ami Wed Aug 27 16:31:00 1997 *************** *** 22,32 **** # Makefile for GNU Make # - # Ultrix 2.2 make doesn't expand the value of VPATH. - VPATH = /make-3.74/ - # This must repeat the value, because configure will remove `VPATH = .'. - srcdir = /make-3.74/ - CC = sc RM = delete --- 22,27 ---- diff -crP ../make-3.75/Makefile.in ./Makefile.in *** ../make-3.75/Makefile.in Wed Aug 28 17:13:09 1996 --- ./Makefile.in Tue Sep 16 13:13:43 1997 *************** *** 1,221 **** ! # NOTE: If you have no `make' program at all to process this makefile, run ! # `build.sh' instead. ! # ! # Copyright (C) 1988,89,91,92,93,94,95,96 Free Software Foundation, Inc. ! # This file is part of GNU Make. ! # ! # GNU Make 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, or (at your option) ! # any later version. ! # ! # GNU Make 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 GNU Make; see the file COPYING. If not, write to ! # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! # ! # Makefile for GNU Make ! # - # Ultrix 2.2 make doesn't expand the value of VPATH. - VPATH = @srcdir@ - # This must repeat the value, because configure will remove `VPATH = .'. srcdir = @srcdir@ CC = @CC@ ! CFLAGS = @CFLAGS@ ! CPPFLAGS = @CPPFLAGS@ ! LDFLAGS = @LDFLAGS@ ! # Define these for your system as follows: ! # -DNO_ARCHIVES To disable `ar' archive support. ! # -DNO_FLOAT To avoid using floating-point numbers. ! # -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2. ! # Some compilers apparently accept this ! # without complaint but produce losing code, ! # so beware. ! # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline. ! # See also `config.h'. ! defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" ! # Which flavor of remote job execution support to use. ! # The code is found in `remote-$(REMOTE).c'. ! REMOTE = @REMOTE@ ! # If your system doesn't have alloca, or the one provided is bad, define this. ! ALLOCA = @ALLOCA@ ! ALLOCA_SRC = $(srcdir)/alloca.c ! ! # If your system needs extra libraries loaded in, define them here. ! # System V probably need -lPW for alloca. HP-UX 7.0's alloca in ! # libPW.a is broken on HP9000s300 and HP9000s400 machines. Use ! # alloca.c instead on those machines. ! LOADLIBES = @LIBS@ ! # Any extra object files your system needs. ! extras = @LIBOBJS@ ! # Common prefix for machine-independent installed files. ! prefix = @prefix@ ! # Common prefix for machine-dependent installed files. ! exec_prefix = @exec_prefix@ ! # Directory to install `make' in. ! bindir = $(exec_prefix)/bin ! # Directory to find libraries in for `-lXXX'. ! libdir = $(exec_prefix)/lib ! # Directory to search by default for included makefiles. ! includedir = $(prefix)/include ! # Directory to install the Info files in. ! infodir = $(prefix)/info ! # Directory to install the man page in. ! mandir = $(prefix)/man/man$(manext) ! # Number to put on the man page filename. ! manext = 1 ! # Prefix to put on installed `make' binary file name. ! binprefix = ! # Prefix to put on installed `make' man page file name. ! manprefix = $(binprefix) ! ! # Whether or not make needs to be installed setgid. ! # The value should be either `true' or `false'. ! # On many systems, the getloadavg function (used to implement the `-l' ! # switch) will not work unless make is installed setgid kmem. ! install_setgid = @NEED_SETGID@ ! # Install make setgid to this group so it can read /dev/kmem. ! group = @KMEM_GROUP@ ! # Program to install `make'. ! INSTALL_PROGRAM = @INSTALL_PROGRAM@ ! # Program to install the man page. ! INSTALL_DATA = @INSTALL_DATA@ ! # Generic install program. ! INSTALL = @INSTALL@ - # Program to format Texinfo source into Info files. - MAKEINFO = makeinfo - # Program to format Texinfo source into DVI files. - TEXI2DVI = texi2dvi ! # Programs to make tags files. ! ETAGS = etags -w ! CTAGS = ctags -w ! ! objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \ ! rule.o implicit.o default.o variable.o expand.o function.o \ ! vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \ ! getopt.o getopt1.o glob/libglob.a \ ! $(ALLOCA) $(extras) ! srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c \ ! $(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c \ ! $(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c \ ! $(srcdir)/rule.c $(srcdir)/implicit.c $(srcdir)/default.c \ ! $(srcdir)/variable.c $(srcdir)/expand.c $(srcdir)/function.c \ ! $(srcdir)/vpath.c $(srcdir)/version.c \ ! $(srcdir)/remote-$(REMOTE).c \ ! $(srcdir)/ar.c $(srcdir)/arscan.c \ ! $(srcdir)/signame.c $(srcdir)/signame.h \ ! $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h \ ! $(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/filedef.h \ ! $(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h \ ! $(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in .SUFFIXES: ! .SUFFIXES: .o .c .h .ps .dvi .info .texinfo ! all: make ! info: make.info ! dvi: make.dvi ! # Some makes apparently use .PHONY as the default goal if it is before `all'. ! .PHONY: all check info dvi ! make.info: make.texinfo ! $(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info make.dvi: make.texinfo - $(TEXI2DVI) $(srcdir)/make.texinfo - make.ps: make.dvi - dvi2ps make.dvi > make.ps ! make: $(objs) ! $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new ! mv -f make.new make ! # -I. is needed to find config.h in the build directory. ! .c.o: ! $(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \ ! $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) - # For some losing Unix makes. - SHELL = /bin/sh @SET_MAKE@ ! glob/libglob.a: FORCE config.h ! cd glob; $(MAKE) libglob.a ! FORCE: ! ! tagsrcs = $(srcs) $(srcdir)/remote-*.c ! TAGS: $(tagsrcs) ! $(ETAGS) $(tagsrcs) ! tags: $(tagsrcs) ! $(CTAGS) $(tagsrcs) ! ! .PHONY: install installdirs ! install: installdirs \ ! $(bindir)/$(binprefix)make $(infodir)/make.info \ ! $(mandir)/$(manprefix)make.$(manext) ! ! installdirs: ! $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir) ! ! $(bindir)/$(binprefix)make: make ! $(INSTALL_PROGRAM) make $@.new ! @if $(install_setgid); then \ ! if chgrp $(group) $@.new && chmod g+s $@.new; then \ ! echo "chgrp $(group) $@.new && chmod g+s $@.new"; \ ! else \ ! echo "$@ needs to be owned by group $(group) and setgid;"; \ ! echo "otherwise the \`-l' option will probably not work."; \ ! echo "You may need special privileges to install $@."; \ ! fi; \ ! else true; fi ! # Some systems can't deal with renaming onto a running binary. ! -rm -f $@.old ! -mv $@ $@.old ! mv $@.new $@ ! ! $(infodir)/make.info: make.info ! if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \ ! for file in $${dir}/make.info*; do \ ! name="`basename $$file`"; \ ! $(INSTALL_DATA) $$file \ ! `echo $@ | sed "s,make.info\$$,$$name,"`; \ done ! # Run install-info only if it exists. ! # Use `if' instead of just prepending `-' to the ! # line so we notice real errors from install-info. ! # We use `$(SHELL) -c' because some shells do not ! # fail gracefully when there is an unknown command. ! if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ ! if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \ ! install-info --infodir=$(infodir) $$dir/make.info; \ ! else true; fi ! $(mandir)/$(manprefix)make.$(manext): make.man ! $(INSTALL_DATA) $(srcdir)/make.man $@ loadavg: loadavg.c config.h ! $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \ ! loadavg.c $(LOADLIBES) -o $@ # We copy getloadavg.c into a different file rather than compiling it # directly because some compilers clobber getloadavg.o in the process. loadavg.c: getloadavg.c --- 1,568 ---- ! # Makefile.in generated automatically by automake 1.2 from Makefile.am ! # Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ! # This Makefile.in is free software; the Free Software Foundation ! # gives unlimited permission to copy, distribute and modify it. ! ! # -*-Makefile-*-, or close enough ! ! ! SHELL = /bin/sh srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + + bindir = @bindir@ + sbindir = @sbindir@ + libexecdir = @libexecdir@ + datadir = @datadir@ + sysconfdir = @sysconfdir@ + sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + + top_builddir = . + + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOMAKE = @AUTOMAKE@ + AUTOHEADER = @AUTOHEADER@ + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + transform = @program_transform_name@ + + NORMAL_INSTALL = true + PRE_INSTALL = true + POST_INSTALL = true + NORMAL_UNINSTALL = true + PRE_UNINSTALL = true + POST_UNINSTALL = true CC = @CC@ + CPP = @CPP@ + LIBOBJS = @LIBOBJS@ + MAKEINFO = @MAKEINFO@ + PACKAGE = @PACKAGE@ + REMOTE = @REMOTE@ + VERSION = @VERSION@ ! AUTOMAKE_OPTIONS = 1.2 ! bin_PROGRAMS = make ! make_SOURCES = main.c commands.c job.c dir.c file.c misc.c read.c remake.c \ ! rule.c implicit.c default.c variable.c expand.c function.c \ ! vpath.c version.c ar.c arscan.c remote-$(REMOTE).c \ ! commands.h dep.h filedef.h job.h make.h rule.h variable.h \ ! signame.c signame.h \ ! getopt.c getopt1.c getopt.h ! make_LDADD = @LIBOBJS@ @ALLOCA@ glob/libglob.a ! info_TEXINFOS = make.texinfo ! INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" ! BUILT_SOURCES = README build.sh.in ! EXTRA_DIST = make.man $(BUILT_SOURCES) remote-cstms.c\ ! make-stds.texi texinfo.tex SCOPTIONS SMakefile\ ! README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h\ ! README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\ ! README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat\ ! readme.vms makefile.vms makefile.com config.h-vms vmsdir.h\ ! vmsfunctions.c vmsify.c ! SUBDIRS = glob ! ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs ! CONFIG_HEADER = config.h ! CONFIG_CLEAN_FILES = build.sh ! PROGRAMS = $(bin_PROGRAMS) ! DEFS = @DEFS@ -I. -I$(srcdir) -I. ! CPPFLAGS = @CPPFLAGS@ ! LDFLAGS = @LDFLAGS@ ! LIBS = @LIBS@ ! make_OBJECTS = main.o commands.o job.o dir.o file.o misc.o read.o \ ! remake.o rule.o implicit.o default.o variable.o expand.o function.o \ ! vpath.o version.o ar.o arscan.o remote-$(REMOTE).o signame.o getopt.o \ ! getopt1.o ! make_DEPENDENCIES = @LIBOBJS@ @ALLOCA@ glob/libglob.a ! make_LDFLAGS = ! CFLAGS = @CFLAGS@ ! COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) ! LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ! TEXI2DVI = texi2dvi ! TEXINFO_TEX = $(srcdir)/texinfo.tex ! INFO_DEPS = make.info ! DVIS = make.dvi ! TEXINFOS = make.texinfo ! DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ ! Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh.in config.h.in \ ! configure configure.in getloadavg.c install-sh missing mkinstalldirs \ ! stamp-h.in texinfo.tex ! ! ! DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! ! TAR = gtar ! GZIP = --best ! SOURCES = $(make_SOURCES) ! OBJECTS = $(make_OBJECTS) + default: all .SUFFIXES: ! .SUFFIXES: .c .dvi .info .o .ps .texi .texinfo ! $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ! cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile ! ! Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ! cd $(top_builddir) \ ! && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! ! $(ACLOCAL_M4): configure.in ! cd $(srcdir) && $(ACLOCAL) ! ! config.status: $(srcdir)/configure ! $(SHELL) ./config.status --recheck ! $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ! cd $(srcdir) && $(AUTOCONF) ! ! config.h: stamp-h ! stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status ! cd $(top_builddir) \ ! && CONFIG_FILES= CONFIG_HEADERS=config.h \ ! $(SHELL) ./config.status ! @echo timestamp > stamp-h ! $(srcdir)/config.h.in: $(srcdir)/stamp-h.in ! $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h ! cd $(top_srcdir) && $(AUTOHEADER) ! @echo timestamp > $(srcdir)/stamp-h.in ! ! mostlyclean-hdr: ! ! clean-hdr: ! ! distclean-hdr: ! rm -f config.h ! ! maintainer-clean-hdr: ! build.sh: $(top_builddir)/config.status build.sh.in ! cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status ! ! mostlyclean-binPROGRAMS: ! ! clean-binPROGRAMS: ! test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ! ! distclean-binPROGRAMS: ! ! maintainer-clean-binPROGRAMS: ! ! install-binPROGRAMS: $(bin_PROGRAMS) ! @$(NORMAL_INSTALL) ! $(mkinstalldirs) $(bindir) ! @list='$(bin_PROGRAMS)'; for p in $$list; do \ ! if test -f $$p; then \ ! echo " $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ ! $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ ! else :; fi; \ ! done ! uninstall-binPROGRAMS: ! $(NORMAL_UNINSTALL) ! list='$(bin_PROGRAMS)'; for p in $$list; do \ ! rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ ! done ! .c.o: ! $(COMPILE) -c $< ! ! mostlyclean-compile: ! rm -f *.o core ! ! clean-compile: ! ! distclean-compile: ! rm -f *.tab.c ! ! maintainer-clean-compile: + make: $(make_OBJECTS) $(make_DEPENDENCIES) + @rm -f make + $(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS) + + make.info: make.texinfo make.dvi: make.texinfo ! DVIPS = dvips ! .texi.info: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` ! ! .texi.dvi: ! TEXINPUTS=$(srcdir):$$TEXINPUTS \ ! MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ! ! .texi: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` ! ! .texinfo.info: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` ! ! .texinfo: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` ! ! .texinfo.dvi: ! TEXINPUTS=$(srcdir):$$TEXINPUTS \ ! MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ! .dvi.ps: ! $(DVIPS) $< -o $@ ! ! install-info-am: $(INFO_DEPS) ! @$(NORMAL_INSTALL) ! $(mkinstalldirs) $(infodir) ! @for file in $(INFO_DEPS); do \ ! d=$(srcdir); \ ! for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ ! if test -f $$d/$$ifile; then \ ! echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \ ! $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ ! else : ; fi; \ ! done; \ ! done ! @$(POST_INSTALL) ! @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ ! for file in $(INFO_DEPS); do \ ! echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ ! install-info --info-dir=$(infodir) $(infodir)/$$file || :;\ ! done; \ ! else : ; fi ! ! uninstall-info: ! $(PRE_UNINSTALL) ! @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ ! ii=yes; \ ! else ii=; fi; \ ! for file in $(INFO_DEPS); do \ ! test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \ ! done ! $(NORMAL_UNINSTALL) ! for file in $(INFO_DEPS); do \ ! (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ ! done ! ! dist-info: $(INFO_DEPS) ! for base in $(INFO_DEPS); do \ ! d=$(srcdir); \ ! for file in `cd $$d && eval echo $$base*`; do \ ! test -f $(distdir)/$$file \ ! || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ ! || cp -p $$d/$$file $(distdir)/$$file; \ ! done; \ ! done ! ! mostlyclean-aminfo: ! rm -f make.aux make.cp make.cps make.dvi make.fn make.fns make.ky \ ! make.log make.pg make.toc make.tp make.tps make.vr make.vrs \ ! make.op make.tr make.cv ! ! clean-aminfo: ! ! distclean-aminfo: ! ! maintainer-clean-aminfo: ! for i in $(INFO_DEPS); do rm -f `eval echo $$i*`; done ! ! # This directory's subdirectories are mostly independent; you can cd ! # into them and run `make' without going through this Makefile. ! # To change the values of `make' variables: instead of editing Makefiles, ! # (1) if the variable is set in `config.status', edit `config.status' ! # (which will cause the Makefiles to be regenerated when you run `make'); ! # (2) otherwise, pass the desired values on the `make' command line. @SET_MAKE@ ! all-recursive install-data-recursive install-exec-recursive \ ! installdirs-recursive install-recursive uninstall-recursive \ ! check-recursive installcheck-recursive info-recursive dvi-recursive: ! @set fnord $(MAKEFLAGS); amf=$$2; \ ! for subdir in $(SUBDIRS); do \ ! target=`echo $@ | sed s/-recursive//`; \ ! echo "Making $$target in $$subdir"; \ ! (cd $$subdir && $(MAKE) $$target) \ ! || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ! done && test -z "$$fail" ! ! mostlyclean-recursive clean-recursive distclean-recursive \ ! maintainer-clean-recursive: ! @set fnord $(MAKEFLAGS); amf=$$2; \ ! rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \ ! for subdir in $$rev; do \ ! target=`echo $@ | sed s/-recursive//`; \ ! echo "Making $$target in $$subdir"; \ ! (cd $$subdir && $(MAKE) $$target) \ ! || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ! done && test -z "$$fail" ! tags-recursive: ! list='$(SUBDIRS)'; for subdir in $$list; do \ ! (cd $$subdir && $(MAKE) tags); \ ! done ! ! tags: TAGS ! ! ID: $(HEADERS) $(SOURCES) ! here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS) ! ! TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) ! tags=; \ ! here=`pwd`; \ ! list='$(SUBDIRS)'; for subdir in $$list; do \ ! test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ ! done; \ ! test -z "$(ETAGS_ARGS)config.h.in$(SOURCES)$(HEADERS)$$tags" \ ! || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $(SOURCES) $(HEADERS) -o $$here/TAGS) ! ! mostlyclean-tags: ! ! clean-tags: ! ! distclean-tags: ! rm -f TAGS ID ! ! maintainer-clean-tags: ! ! distdir = $(PACKAGE)-$(VERSION) ! top_distdir = $(distdir) ! ! # This target untars the dist file and tries a VPATH configuration. Then ! # it guarantees that the distribution is self-contained by making another ! # tarfile. ! distcheck: dist ! rm -rf $(distdir) ! GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz ! mkdir $(distdir)/=build ! mkdir $(distdir)/=inst ! dc_install_base=`cd $(distdir)/=inst && pwd`; \ ! cd $(distdir)/=build \ ! && ../configure --srcdir=.. --prefix=$$dc_install_base \ ! && $(MAKE) \ ! && $(MAKE) dvi \ ! && $(MAKE) check \ ! && $(MAKE) install \ ! && $(MAKE) installcheck \ ! && $(MAKE) dist ! rm -rf $(distdir) ! @echo "========================"; \ ! echo "$(distdir).tar.gz is ready for distribution"; \ ! echo "========================" ! dist: distdir ! -chmod -R a+r $(distdir) ! GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) ! rm -rf $(distdir) ! dist-all: distdir ! -chmod -R a+r $(distdir) ! GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) ! rm -rf $(distdir) ! distdir: $(DISTFILES) ! rm -rf $(distdir) ! mkdir $(distdir) ! -chmod 777 $(distdir) ! @for file in $(DISTFILES); do \ ! d=$(srcdir); \ ! test -f $(distdir)/$$file \ ! || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ ! || cp -p $$d/$$file $(distdir)/$$file; \ done ! for subdir in $(SUBDIRS); do \ ! test -d $(distdir)/$$subdir \ ! || mkdir $(distdir)/$$subdir \ ! || exit 1; \ ! chmod 777 $(distdir)/$$subdir; \ ! (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir)/$$subdir distdir=../$(distdir)/$$subdir distdir) \ ! || exit 1; \ ! done ! $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info ! $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook ! alloca.o alloca.lo: alloca.c config.h ! ar.o ar.lo: ar.c make.h config.h filedef.h dep.h glob/fnmatch.h ! arscan.o arscan.lo: arscan.c make.h config.h ! commands.o commands.lo: commands.c make.h config.h dep.h filedef.h \ ! variable.h job.h commands.h ! default.o default.lo: default.c make.h config.h rule.h dep.h filedef.h \ ! job.h commands.h variable.h ! dir.o dir.lo: dir.c make.h config.h glob/glob.h ! expand.o expand.lo: expand.c make.h config.h filedef.h job.h commands.h \ ! variable.h ! file.o file.lo: file.c make.h config.h dep.h filedef.h job.h commands.h \ ! variable.h ! function.o function.lo: function.c make.h config.h filedef.h variable.h \ ! dep.h job.h commands.h ! getloadavg.o getloadavg.lo: getloadavg.c config.h ! getopt.o getopt.lo: getopt.c config.h getopt.h ! getopt1.o getopt1.lo: getopt1.c config.h getopt.h ! implicit.o implicit.lo: implicit.c make.h config.h rule.h dep.h \ ! filedef.h ! job.o job.lo: job.c make.h config.h job.h filedef.h commands.h \ ! variable.h ! main.o main.lo: main.c make.h config.h dep.h filedef.h variable.h job.h \ ! commands.h getopt.h ! misc.o misc.lo: misc.c make.h config.h dep.h ! read.o read.lo: read.c make.h config.h dep.h filedef.h job.h commands.h \ ! variable.h glob/glob.h ! remake.o remake.lo: remake.c make.h config.h filedef.h job.h commands.h \ ! dep.h ! remote-stub.o remote-stub.lo: remote-stub.c make.h config.h filedef.h \ ! job.h commands.h ! rule.o rule.lo: rule.c make.h config.h dep.h filedef.h job.h commands.h \ ! variable.h rule.h ! signame.o signame.lo: signame.c config.h signame.h ! variable.o variable.lo: variable.c make.h config.h dep.h filedef.h job.h \ ! commands.h variable.h ! version.o version.lo: version.c config.h ! vpath.o vpath.lo: vpath.c make.h config.h filedef.h variable.h ! ! info: $(INFO_DEPS) info-recursive ! dvi: $(DVIS) dvi-recursive ! check: all ! $(MAKE) check-recursive check-local ! installcheck: installcheck-recursive ! all-recursive-am: config.h ! $(MAKE) all-recursive ! ! all-am: Makefile $(INFO_DEPS) $(PROGRAMS) config.h ! ! install-exec-am: install-binPROGRAMS ! ! install-data-am: install-info-am ! ! uninstall-am: uninstall-binPROGRAMS uninstall-info ! ! install-exec: install-exec-recursive install-exec-am ! @$(NORMAL_INSTALL) ! ! install-data: install-data-recursive install-data-am ! @$(NORMAL_INSTALL) ! ! install: install-recursive install-exec-am install-data-am ! @: ! ! uninstall: uninstall-recursive uninstall-am ! ! all: all-recursive-am all-am ! ! install-strip: ! $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install ! installdirs: installdirs-recursive ! $(mkinstalldirs) $(bindir) $(infodir) ! ! ! mostlyclean-generic: ! test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) ! ! clean-generic: ! test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) ! ! distclean-generic: ! rm -f Makefile $(DISTCLEANFILES) ! rm -f config.cache config.log stamp-h stamp-h[0-9]* ! test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ! ! maintainer-clean-generic: ! test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) ! test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) ! mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ ! mostlyclean-compile mostlyclean-aminfo mostlyclean-tags \ ! mostlyclean-generic ! ! clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-aminfo \ ! clean-tags clean-generic mostlyclean-am ! ! distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ ! distclean-aminfo distclean-tags distclean-generic \ ! clean-am ! ! maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ ! maintainer-clean-compile maintainer-clean-aminfo \ ! maintainer-clean-tags maintainer-clean-generic \ ! distclean-am ! ! mostlyclean: mostlyclean-recursive mostlyclean-am ! ! clean: clean-recursive clean-am ! ! distclean: distclean-recursive distclean-am ! rm -f config.status ! ! maintainer-clean: maintainer-clean-recursive maintainer-clean-am ! @echo "This command is intended for maintainers to use;" ! @echo "it deletes files that may require special tools to rebuild." ! rm -f config.status ! ! .PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ ! maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \ ! clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \ ! install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \ ! maintainer-clean-compile install-info-am uninstall-info \ ! mostlyclean-aminfo distclean-aminfo clean-aminfo \ ! maintainer-clean-aminfo install-data-recursive uninstall-data-recursive \ ! install-exec-recursive uninstall-exec-recursive installdirs-recursive \ ! uninstalldirs-recursive all-recursive check-recursive \ ! installcheck-recursive info-recursive dvi-recursive \ ! mostlyclean-recursive distclean-recursive clean-recursive \ ! maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ ! distclean-tags clean-tags maintainer-clean-tags distdir info dvi \ ! check-local installcheck all-recursive-am all-am install-exec-am \ ! install-data-am uninstall-am install-exec install-data install \ ! uninstall all installdirs mostlyclean-generic distclean-generic \ ! clean-generic maintainer-clean-generic clean mostlyclean distclean \ ! maintainer-clean ! ! # --------------- Local DIST Section + # Install the w32 subdirectory + # + dist-hook: + (cd $(srcdir); \ + w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \ + tar chf - $$w32) \ + | (cd $(distdir); tar xfBp -) + + # --------------- Local CHECK Section + check-local: check-loadavg check-regression + .PHONY: check-loadavg check-regression + + # > check-loadavg + # loadavg: loadavg.c config.h ! @rm -f loadavg ! $(LINK) -I. -I$(srcdir) -DHAVE_CONFIG_H -DTEST $(make_LDFLAGS) loadavg.c $(LIBS) # We copy getloadavg.c into a different file rather than compiling it # directly because some compilers clobber getloadavg.o in the process. loadavg.c: getloadavg.c *************** *** 225,303 **** @echo The system uptime program believes the load average to be: -uptime @echo The GNU load average checking code believes: ! ./loadavg ! check: check-loadavg ! .PHONY: clean realclean distclean mostlyclean ! clean: glob-clean ! -rm -f make loadavg *.o core make.dvi ! distclean: clean glob-realclean ! -rm -f Makefile config.h config.status build.sh stamp-config ! -rm -f config.log config.cache ! -rm -f TAGS tags ! -rm -f make.?? make.??s make.log make.toc make.*aux ! -rm -f loadavg.c ! realclean: distclean ! -rm -f make.info* ! mostlyclean: clean ! ! .PHONY: glob-clean glob-realclean ! glob-clean glob-realclean: ! cd glob; $(MAKE) $@ ! ! Makefile: config.status $(srcdir)/Makefile.in ! $(SHELL) config.status ! glob/Makefile: config.status $(srcdir)/glob/Makefile.in ! $(SHELL) config.status ! config.h: stamp-config ; ! stamp-config: config.status $(srcdir)/config.h.in ! $(SHELL) config.status ! touch stamp-config ! ! #configure: configure.in aclocal.m4 ! # cd $(srcdir) && autoconf $(ACFLAGS) ! #config.h.in: configure.in aclocal.m4 ! # cd $(srcdir) && autoheader $(ACFLAGS) ! ! # This tells versions [3.59,3.63) of GNU make not to export all variables. .NOEXPORT: - - # The automatically generated dependencies below may omit config.h - # because it is included with ``#include '' rather than - # ``#include "config.h"''. So we add the explicit dependency to make sure. - $(objs): config.h - - # Automatically generated dependencies will be put at the end of the file. - - # Automatically generated dependencies. - commands.o: commands.c make.h dep.h filedef.h variable.h job.h \ - commands.h - job.o: job.c make.h job.h filedef.h commands.h variable.h - dir.o: dir.c make.h - file.o: file.c make.h dep.h filedef.h job.h commands.h variable.h - misc.o: misc.c make.h dep.h - main.o: main.c make.h dep.h filedef.h variable.h job.h commands.h \ - getopt.h - read.o: read.c make.h dep.h filedef.h job.h commands.h variable.h \ - glob/glob.h - remake.o: remake.c make.h filedef.h job.h commands.h dep.h - rule.o: rule.c make.h dep.h filedef.h job.h commands.h variable.h \ - rule.h - implicit.o: implicit.c make.h rule.h dep.h filedef.h - default.o: default.c make.h rule.h dep.h filedef.h job.h commands.h \ - variable.h - variable.o: variable.c make.h dep.h filedef.h job.h commands.h \ - variable.h - expand.o: expand.c make.h filedef.h job.h commands.h variable.h - function.o: function.c make.h filedef.h variable.h dep.h job.h \ - commands.h - vpath.o: vpath.c make.h filedef.h variable.h - version.o: version.c - ar.o: ar.c make.h filedef.h dep.h - arscan.o: arscan.c make.h - signame.o: signame.c signame.h - remote-stub.o: remote-stub.c make.h filedef.h job.h commands.h - getopt.o: getopt.c - getopt1.o: getopt1.c getopt.h - getloadavg.o: getloadavg.c --- 572,610 ---- @echo The system uptime program believes the load average to be: -uptime @echo The GNU load average checking code believes: ! -./loadavg + # > check-regression + # + # Look for the make test suite, and run it if found. Look in MAKE_TEST if + # specified, or else in the srcdir or the distdir, their parents, and _their_ + # parents. + # + check-regression: + here=`pwd`; testdir=""; \ + case "$(MAKE_TEST)" in "") \ + for d1 in $$here $(srcdir); do \ + for d2 in ../.. .. .; do \ + all=`echo $$d1/$$d2/make-test-[0-9]*/run_make_tests`; \ + case "$$all" in \ + "$$d1/$$d2/make-test-[0-9]*/run_make_tests") : ;; \ + *) try=`for x in $$all; do echo $$x; done | sort | tail -1`;\ + testdir=`dirname $$try` ;; esac; \ + done; done ;; \ + *) testdir="$(MAKE_TEST)" ;; \ + esac; \ + case "$$testdir" in \ + "") echo "Couldn't find make-test-* test suite."; exit 0;; \ + esac; \ + echo "cd $$testdir && ./run_make_tests -make_path $$here/make"; \ + cd $$testdir && ./run_make_tests -make_path $$here/make + + # --------------- Maintainer's Section + + # Note this requires GNU make. Not to worry, since it will only be included + # in the Makefile if we're in the maintainer's environment. + @MAINT_MAKEFILE_TRUE@include $(srcdir)/maintMakefile ! # Tell versions [3.59,3.63) of GNU make to not export all variables. ! # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -crP ../make-3.75/NEWS ./NEWS *** ../make-3.75/NEWS Sun Jul 14 15:52:17 1996 --- ./NEWS Tue Sep 16 10:17:26 1997 *************** *** 1,10 **** ! GNU make NEWS -- history of user-visible changes. 9 May 1996 ! Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. See the end for copying conditions. Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu. Version 3.75 * The directory messages printed by `-w' and implicitly in sub-makes, --- 1,57 ---- ! GNU make NEWS -*-indented-text-*- ! History of user-visible changes. ! 18 Aug 1997 ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. See the end for copying conditions. Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu. + Version 3.76 + + * GNU make now uses automake to control Makefile.in generation. This + should make it more consistent with the GNU standards. + + * VPATH functionality has been changed to incorporate the VPATH+ patch, + previously maintained by Paul Smith . See the + manual. + + * Make defines a new variable, `MAKECMDGOALS', to contain the goals that + were specified on the command line, if any. Modifying this variable + has no effect on the operation of make. + + * A new function, `$(wordlist S,E,TEXT)', is available: it returns a + list of words from number S to number E (inclusive) of TEXT. + + * Instead of an error, detection of future modification times gives a + warning and continues. The warning is repeated just before GNU make + exits, so it is less likely to be lost. + + * Fix the $(basename) and $(suffix) functions so they only operate on + the last filename, not the entire string: + + Command Old Result New Result + ------- ---------- ---------- + $(basename a.b) a a + $(basename a.b/c) a a.b/c + $(suffix a.b) b b + $(suffix a.b/c) b/c + + * The $(strip) function now removes newlines as well as TABs and spaces. + + * The $(shell) function now changes CRLF (\r\n) pairs to a space as well + as newlines (\n). + + * Updates to the Windows 95/NT port from Rob Tulloh (see README.W32). + + * Eli Zaretskii has updated the port to 32-bit protected mode on MSDOS + and MS-Windows, building with the DJGPP v2 port of GNU C/C++ compiler + and utilities. See README.DOS for details, and direct all questions + concerning this port to Eli Zaretskii or DJ + Delorie . + + * John W. Eaton has updated the VMS port to support libraries and VPATH. + Version 3.75 * The directory messages printed by `-w' and implicitly in sub-makes, *************** *** 23,29 **** details, and direct all Amiga-related questions to . * Rob Tulloh of Tivoli Systems has contributed a port to Windows NT or 95. ! See README.WIN32 for details, and direct all Windows-related questions to . Version 3.73 --- 70,76 ---- details, and direct all Amiga-related questions to . * Rob Tulloh of Tivoli Systems has contributed a port to Windows NT or 95. ! See README.W32 for details, and direct all Windows-related questions to . Version 3.73 diff -crP ../make-3.75/NMakefile ./NMakefile *** ../make-3.75/NMakefile Thu Jul 25 19:53:12 1996 --- ./NMakefile Wed Aug 27 16:31:01 1997 *************** *** 1,7 **** # NOTE: If you have no `make' program at all to process this makefile, run # `build_w32.bat' instead. # ! # Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. # This file is part of GNU Make. # # GNU Make is free software; you can redistribute it and/or modify --- 1,7 ---- # NOTE: If you have no `make' program at all to process this makefile, run # `build_w32.bat' instead. # ! # Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. # This file is part of GNU Make. # # GNU Make is free software; you can redistribute it and/or modify *************** *** 29,37 **** MAKEFILE=NMakefile SUBPROC_MAKEFILE=NMakefile ! CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb ! CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/ LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\ /INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \ --- 29,37 ---- MAKEFILE=NMakefile SUBPROC_MAKEFILE=NMakefile ! CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb ! CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/ LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\ /INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \ *************** *** 52,67 **** w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib: subproc.bat $(SUBPROC_MAKEFILE) ! config.h: config.h.WIN32 copy $? $@ ! Release: nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe ! Debug: nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe clean: rmdir /s /q WinDebug WinRel $(OUTDIR): if not exist .\$@\nul mkdir .\$@ --- 52,69 ---- w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib: subproc.bat $(SUBPROC_MAKEFILE) ! config.h: config.h.W32 copy $? $@ ! Release: nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe ! Debug: nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe clean: rmdir /s /q WinDebug WinRel + rmdir /s /q w32\subproc\WinDebug w32\subproc\WinRel + erase config.h $(OUTDIR): if not exist .\$@\nul mkdir .\$@ diff -crP ../make-3.75/README ./README *** ../make-3.75/README Wed Aug 28 17:13:03 1996 --- ./README Tue Sep 16 11:16:17 1997 *************** *** 1,5 **** ! This directory contains the 3.75 test release of GNU Make. ! All bugs reported for previous test releases have been fixed. Some bugs surely remain. For general building and installation instructions, see the file INSTALL. --- 1,5 ---- ! This directory contains the 3.76 release of GNU Make. ! All bugs reported for previous releases have been fixed. Some bugs surely remain. For general building and installation instructions, see the file INSTALL. *************** *** 14,23 **** GNU Make. If you get errors from your system's Make when building GNU Make, try using `build.sh' instead. ! See README.WIN32 for details about GNU Make on Windows NT or 95. ! See README.Amiga for details about GNU Make on AmigaDOS. ! The MSDOS port of GNU Make is available as part of DJGPP; see the ! WWW page http://www.delorie.com/djgpp/ for more information. It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such that if you compile make with `cc -O' on AIX 3.2, it will not work correctly. --- 14,29 ---- GNU Make. If you get errors from your system's Make when building GNU Make, try using `build.sh' instead. ! - See README.W32 for details about GNU Make on Windows NT or 95. ! ! - See README.Amiga for details about GNU Make on AmigaDOS. ! ! - See README.DOS for compilation instructions on MS-DOS and MS-Windows ! using DJGPP tools. ! ! A precompiled binary of the MSDOS port of GNU Make is available as part ! of DJGPP; see the WWW page http://www.delorie.com/djgpp/ for more ! information. It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such that if you compile make with `cc -O' on AIX 3.2, it will not work correctly. diff -crP ../make-3.75/README.Amiga ./README.Amiga *** ../make-3.75/README.Amiga Mon May 13 14:39:46 1996 --- ./README.Amiga Wed Aug 27 16:31:01 1997 *************** *** 3,9 **** Uploader: Aaron "Optimizer" Digulla (digulla@fh-konstanz.de) Type: dev/c ! This is a pure Amiga port of GNU make 3.74. It needs no extra libraries or anything. It has the following features (in addition to any features of GNU make): --- 3,9 ---- Uploader: Aaron "Optimizer" Digulla (digulla@fh-konstanz.de) Type: dev/c ! This is a pure Amiga port of GNU make. It needs no extra libraries or anything. It has the following features (in addition to any features of GNU make): diff -crP ../make-3.75/README.DOS ./README.DOS *** ../make-3.75/README.DOS Wed Dec 31 19:00:00 1969 --- ./README.DOS Wed Aug 27 16:31:02 1997 *************** *** 0 **** --- 1,293 ---- + Port of GNU Make to 32-bit protected mode on MSDOS and MS-Windows. + + Builds with DJGPP v2 port of GNU C/C++ compiler and utilities. + + + New (since 3.74) DOS-specific features: + + 1. Supports long filenames when run from DOS box on Windows 95. + + 2. Supports both stock DOS COMMAND.COM and Unix-style shells + (details in ``Notes'' below). + + 3. Supports DOS drive letters in dependencies and pattern rules. + + 4. Better support for DOS-style backslashes in pathnames (but see + ``Notes'' below). + + 5. The $(shell) built-in can run arbitrary complex commands, + including pipes and redirection, even when COMMAND.COM is your + shell. + + 6. Can be built without floating-point code (see below). + + 7. Supports signals in child programs and restores the original + directory if the child was interrupted. + + 8. Can be built without (a previous version of) Make. + + 9. The build process requires only standard tools. (Optional + targets like "install:" and "clean:" still need additional + programs, though, see below.) + + + To build: + + 1. Unzip the archive, preserving the directory structure (-d switch + if you use PKUNZIP). If you build Make on Windows 95, use an + unzip program that supports long filenames in zip files. + + 2. Invoke the `configure.bat' batch file. + + If you are building Make in-place, i.e. in the same directory + where its sources are kept, just type "configure.bat" and press + [Enter]. Otherwise, you need to supply the path to the source + directory as an argument to the batch file, like this: + + configure.bat c:/djgpp/gnu/make-3.76 + + Note the forward slashes: you MUST use them here. + + 3. If configure.bat doesn't find a working Make, it will suggest to + use the `dosbuild.bat' batch file to build Make. Either do as it + suggests or install another Make program (a pre-compiled binary + should be available from the usual DJGPP sites) and rerun + configure.bat. + + 4. If you will need to run Make on machines without an FPU, you + might consider building a version of Make which doesn't issue + floating-point instructions (they don't help much on MSDOS + anyway). To this end, edit the Makefile created by + configure.bat and add -DNO_FLOAT to the value of CPPFLAGS. + + 5. Invoke Make. + + If you are building from outside of the source directory, you + need to tell Make where the sources are, like this: + + make srcdir=c:/djgpp/gnu/make-3.76 + + (configure.bat will tell you this when it finishes). You MUST + use a full, not relative, name of the source directory here, or + else Make might fail. + + 6. After Make finishes, if you have a Unix-style shell installed, + you can use the `install' target to install the package. You + will also need GNU Fileutils and GNU Sh-utils for this (they + should be available from the DJGPP sites). + + Without a Unix-style shell, you will have to install programs + and the docs manually. Copy make.exe to a directory on your + PATH, make.i* info files to your Info directory, and update the + file `dir' in your Info directory by adding the following item + to the main menu: + + * GNU make: (make.info). The GNU make utility. + + If you have the `install-info' program (from the GNU Texinfo + package), it will do that for you if you invoke it like this: + + install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info + + (If your Info directory is other than C:\DJGPP\INFO, change this + command accordingly.) + + 7. The `clean' targets also require Unix-style shell and `test' and + `rm' programs (from Fileutils and Sh-utils, accordingly). + + + + Notes: + ----- + + 1. The shell issue. + + This is probably the most significant improvement, first + introduced in the port of GNU Make 3.75. + + The original behavior of GNU Make is to invoke commands + directly, as long as they don't include characters special to + the shell or internal shell commands, because that is faster. + When shell features like redirection or filename wildcards are + involved, Make calls the shell. + + This port supports both DOS shells (the stock COMMAND.COM and its + 4DOS/NDOS replacements), and Unix-style shells (tested with the + venerable Stewartson's `ms_sh' 2.3 and the DJGPP port of `bash' by + Daisuke Aoyama ). + + When the $SHELL variable points to a Unix-style shell, Make + works just like you'd expect on Unix, calling the shell for any + command that involves characters special to the shell or + internal shell commands. The only difference is that, since + there is no standard way to pass command lines longer than the + infamous DOS 126-character limit, this port of Make writes the + command line to a temporary disk file and then invokes the shell + on that file. + + If $SHELL points to a DOS-style shell, however, Make will not + call it automatically, as it does with Unix shells. Stock + COMMAND.COM is too dumb and would unnecessarily limit the + functionality of Make. For example, you would not be able to + use long command lines in commands that use redirection or + pipes. Therefore, when presented with a DOS shell, this port of + Make will emulate most of the shell functionality, like + redirection and pipes, and shall only call the shell when a + batch file or a command internal to the shell is invoked. (Even + when a command is an internal shell command, Make will first + search the $PATH for it, so that if a Makefile calls `mkdir', + you can install, say, a port of GNU `mkdir' and have it called + in that case.) + + The key to all this is the extended functionality of `spawn' and + `system' functions from the DJGPP library; this port just calls + `system' where it would invoke the shell on Unix. The most + important aspect of these functions is that they use a special + mechanism to pass long (up to 16KB) command lines to DJGPP + programs. In addition, `system' emulates some internal + commands, like `cd' (so that you can now use forward slashes + with it, and can also change the drive if the directory is on + another drive). Another aspect worth mentioning is that you can + call Unix shell scripts directly, provided that the shell whose + name is mentioned on the first line of the script is installed + anywhere along the $PATH. It is impossible to tell here + everything about these functions; refer to the DJGPP library + reference for more details. + + The $(shell) built-in is implemented in this port by calling + `popen'. Since `popen' calls `system', the above considerations + are valid for $(shell) as well. In particular, you can put + arbitrary complex commands, including pipes and redirection, + inside $(shell), which is in many cases a valid substitute for + the Unix-style command substitution (`command`) feature. + + + 2. "SHELL=/bin/sh" -- or is it? + + Many Unix Makefiles include a line which sets the SHELL, for + those versions of Make which don't have this as the default. + Since many DOS systems don't have `sh' installed (in fact, most + of them don't even have a `/bin' directory), this port takes + such directives with a grain of salt. It will only honor such a + directive if the basename of the shell name (like `sh' in the + above example) can indeed be found in the directory that is + mentioned in the SHELL= line (`/bin' in the above example), or + in the current working directory, or anywhere on the $PATH (in + that order). If the basename doesn't include a filename + extension, Make will look for any known extension that indicates + an executable file (.exe, .com, .bat, .btm, .sh, and even .sed + and .pl). If any such file is found, then $SHELL will be + defined to the exact pathname of that file, and that shell will + hence be used for the rest of processing. But if the named + shell is *not* found, the line which sets it will be effectively + ignored, leaving the value of $SHELL as it was before. Since a + lot of decisions that this port makes depend on the gender of + the shell, I feel it doesn't make any sense to tailor Make's + behavior to a shell which is nowhere to be found. + + Note that the above special handling of "SHELL=" only happens + for Makefiles; if you set $SHELL in the environment or on the + Make command line, you are expected to give the complete + pathname of the shell, including the filename extension. + + The default value of $SHELL is computed as on Unix (see the Make + manual for details), except that if $SHELL is not defined in the + environment, $COMSPEC is used. Also, if an environment variable + named $MAKESHELL is defined, it takes precedence over both + $COMSPEC and $SHELL. Note that, unlike Unix, $SHELL in the + environment *is* used to set the shell (since on MSDOS, it's + unlikely that the interactive shell will not be suitable for + Makefile processing). + + The bottom line is that you can now write Makefiles where some + of the targets require a real (i.e. Unix-like) shell, which will + nevertheless work when such shell is not available (provided, of + course, that the commands which should always work, don't + require such a shell). More important, you can convert Unix + Makefiles to MSDOS and leave the line which sets the shell + intact, so that people who do have Unixy shell could use it for + targets which aren't converted to DOS (like `install' and + `uninstall', for example). + + + 3. Default directories. + + GNU Make knows about standard directories where it searches for + library and include files mentioned in the Makefile. Since + MSDOS machines don't have standard places for these, this port + will search ${DJDIR}/lib and ${DJDIR}/include respectively. + $DJDIR is defined automatically by the DJGPP startup code as the + root of the DJGPP installation tree (unless you've tampered with + the DJGPP.ENV file). This should provide reasonable default + values, unless you moved parts of DJGPP to other directories. + + + 4. Letter-case in filenames. + + If you run Make on Windows 95, you should be aware of the + letter-case issue. Make is internally case-sensitive, but all + file operations are case-insensitive on Windows 95, so + e.g. files `FAQ', `faq' and `Faq' all refer to the same file, as + far as Windows is concerned. The underlying DJGPP C library + functions honor the letter-case of the filenames they get from + the OS, except that by default, they down-case 8+3 DOS filenames + which are stored in upper case in the directory and would break + many Makefiles otherwise. (The details of which filenames are + converted to lower case are explained in the DJGPP libc docs, + under the `_preserve_fncase' and `_lfn_gen_short_fname' + functions, but as a thumb rule, any filename that is stored in + upper case in the directory, is a legal DOS 8+3 filename and + doesn't include characters illegal on MSDOS FAT filesystems, + will be automatically down-cased.) User reports that I have + indicate that this default behavior is generally what you'd + expect; however, since support for long filenames in the DJGPP + port of GNU Make is relatively new, your input is most welcome. + + In any case, if you hit a situation where you must force Make to + get the 8+3 DOS filenames in upper case, set FNCASE=y in the + environment or in the Makefile. + + + 5. DOS-style pathnames. + + There are a lot of places throughout the program sources which + make implicit assumptions about the pathname syntax. In + particular, the directories are assumed to be separated by `/', + and any pathname which doesn't begin with a `/' is assumed to be + relative to the current directory. This port attempts to + support DOS-style pathnames which might include the drive letter + and use backslashes instead of forward slashes. However, this + support is not complete; I feel that pursuing this support too + far might break some more important features, particularly if + you use a Unix-style shell (where a backslash is a quote + character). I only consider support of backslashes desirable + because some Makefiles invoke non-DJGPP programs which don't + understand forward slashes. A notable example of such programs + is the standard programs which come with MSDOS. Otherwise, you + are advised to stay away from backslashes whenever possible. In + particular, filename globbing won't work on pathnames with + backslashes, because the GNU `glob' library doesn't support them + (backslash is special in filename wildcards, and I didn't want + to break that). + + One feature which *does* work with backslashes is the filename- + related built-in functions such as $(dir), $(notdir), etc. + Drive letters in pathnames are also fully supported. + + + + Bug reports: + ----------- + + Bugs that are clearly related to the MSDOS/DJGPP port should be + reported first on the comp.os.msdos.djgpp news group (if you cannot + post to Usenet groups, write to the DJGPP mailing list, + , which is an email gateway into the above news + group). For other bugs, please follow the the procedure explained + in the "Bugs" chapter of the Info docs. If you don't have an Info + reader, look up that chapter in the `make.i1' file with any text + browser/editor. + + + Enjoy, + Eli Zaretskii diff -crP ../make-3.75/README.W32 ./README.W32 *** ../make-3.75/README.W32 Wed Dec 31 19:00:00 1969 --- ./README.W32 Tue Sep 16 10:17:27 1997 *************** *** 0 **** --- 1,161 ---- + Port of GNU make to Windows NT and Windows 95 + Builds natively with MSVC 2.x or MSVC 4.x compilers. + + To build with nmake on Windows NT or Windows 95: + + 1. Make sure cl.exe is in your %Path%. Example: + + set Path=%Path%;c:/msdev/bin + + 2. Make sure %include% is set to msvc include directory. Example: + + set include=c:/msdev/include + + 3. Make sure %lib% is set to msvc lib directory. Example: + + set lib=c:/msdev/lib + + 4. nmake /f NMakefile + + + There is a bat file (build_w32.bat) for folks who have fear of nmake. + + Outputs: + + WinDebug/make.exe + WinRel/make.exe + + + -- Notes/Caveats -- + + GNU make and sh.exe: + + This port prefers you have a working sh.exe somewhere on your + system. If you don't have sh.exe, port falls back to + MSDOS mode for launching programs (via a batch file). + The MSDOS mode style execution has not been tested too + carefully though (I use GNU bash as sh.exe). + + There are very few true ports of Bourne shell for NT right now. + There is a version of GNU bash available from Cygnus gnu-win32 + porting effort. Other possibilities are to get the MKS version + of sh.exe or to build your own with a package like + NutCracker (DataFocus) or Portage (Consensys). + + Tivoli uses a homegrown port of GNU bash which is not (yet) + freely available. It may be available someday, but I am not in control + of this decision nor do I influence it. Sorry! + + GNU make handling of drive letters in pathnames (PATH, vpath, VPATH): + + There is a caveat that should be noted with respect to handling + single character pathnames on Windows systems. When colon is + used in PATH variables, make tries to be smart about knowing when + you are using colon as a separator versus colon as a drive + letter. Unfortunately, something as simple as the string 'x:/' + could be interpreted 2 ways: (x and /) or (x:/). + + Make chooses to interpret a letter plus colon (e.g. x:/) as a + drive letter pathname. If it is necessary to use single + character directories in paths (VPATH, vpath, Path, PATH), the + user must do one of two things: + + a. Use semicolon as the separator to disambiguate colon. For + example use 'x;/' if you want to say 'x' and '/' are + separate components. + + b. Qualify the directory name so that there is more than + one character in the path(s) used. For example, none + of these settings are ambiguous: + + ./x:./y + /some/path/x:/some/path/y + x:/some/path/x:x:/some/path/y + + These caveats affect Windows systems only (Windows NT and + Windows 95) and can be ignored for other platforms. + + Please note that you are free to mix colon and semi-colon in the + specification of paths. Make is able to figure out the intended + result and convert the paths internally to the format needed + when interacting with the operating system. + + You are encouraged to use colon as the separator character. + This should ease the pain of deciding how to handle various path + problems which exist between platforms. If colon is used on + both Unix and Windows systems, then no ifdef'ing will be + necessary in the makefile source. + + GNU make test suite: + + I verified all functionality with a slightly modified version + of make-test-0.4.5 (modifications to get test suite to run + on Windows NT). All tests pass in an environment that includes + sh.exe. Tested on both Windows NT and Windows 95. + + Building GNU make on Windows NT and Windows 95 with Microsoft Visual C + + I did not provide a Visual C project file with this port as + the project file would not be considered freely distributable + (or so I think). It is easy enough to create one though if + you know how to use Visual C. + + I build the program statically to avoid problems locating DLL's + on machines that may not have MSVC runtime installed. If you + prefer, you can change make to build with shared libraries by + changing /MT to /MD in the NMakefile (or build_w32.bat). + + Program has not been built under non-Intel architectures (yet). + + I have not tried to build with any other compilers than MSVC. + + Pathnames and white space: + + Unlike Unix, Windows 95/NT systems encourage pathnames which + contain white space (e.g. C:\Program Files\). These sorts of pathnames + are legal under Unix too, but are never encouraged. There is + at least one place in make (VPATH/vpath handling) where paths + containing white space will simply not work. There may be others + too. I chose to not try and port make in such a way so that + these sorts of paths could be handled. I offer these suggestions + as workarounds: + + 1. Use 8.3 notation + 2. Rename the directory so it does not contain white space. + + If you are unhappy with this choice, this is free software + and you are free to take a crack at making this work. The code + in w32/pathstuff.c and vpath.c would be the places to start. + + SAMBA/NTFS/VFAT: + + I have not had any success building the debug version of this + package using SAMBA as my file server. The reason seems to be + related to the way VC++ 4.0 changes the case name of the pdb + filename it is passed on the command line. It seems to change + the name always to to lower case. I contend that + the VC++ compiler should not change the casename of files that + are passed as arguments on the command line. I don't think this + was a problem in MSVC 2.x, but I know it is a problem in MSVC 4.x. + + The package builds fine on VFAT and NTFS filesystems. + + Most all of the development I have done to date has been using + NTFS and long file names. I have not done any considerable work + under VFAT. VFAT users may wish to be aware that this port + of make does respect case sensitivity. + + Version 3.76 contains some preliminary support for FAT. Make + now tries to work around some difficulties with stat'ing of + files and caching of filenames and directories internally. + There is still a known problem with filenames sometimes being + found to have modification dates in the future which cause make + to complain about the file and exit (remake.c). + + Bug reports: + + Please submit bugs via the normal bug reporting mechanism + which is described in one of the Texinfo files. If you don't + have Texinfo for Windows NT or Windows 95, these files are simple + text files and can be read with a text editor. + Only in ../make-3.75: README.WIN32 Only in ../make-3.75: TAGS diff -crP ../make-3.75/acconfig.h ./acconfig.h *** ../make-3.75/acconfig.h Sat Jan 6 16:25:08 1996 --- ./acconfig.h Mon Aug 18 14:11:12 1997 *************** *** 1,3 **** --- 1,9 ---- + /* Name of this package (needed by automake) */ + #undef PACKAGE + + /* Version of this package (needed by automake) */ + #undef VERSION + /* Define to the name of the SCCS `get' command. */ #undef SCCS_GET diff -crP ../make-3.75/aclocal.m4 ./aclocal.m4 *** ../make-3.75/aclocal.m4 Thu Dec 8 02:17:09 1994 --- ./aclocal.m4 Tue Sep 16 11:00:18 1997 *************** *** 1,19 **** ! dnl ! dnl Check for a symbol ! dnl ! AC_DEFUN(AC_CHECK_SYMBOL, [dnl ! AC_MSG_CHECKING(for $1) ! AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl ! AC_TRY_LINK(, ! changequote(,)dnl ! extern char *$1[]; puts(*$1);, ! changequote([,])dnl ! ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)]) ! if test "$ac_cv_check_symbol_$1" = yes; then ! changequote(,)dnl ! ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'` ! changequote([,])dnl ! AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol}) fi ! AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl ! dnl --- 1,128 ---- ! dnl aclocal.m4 generated automatically by aclocal 1.2 ! ! # Do all the work for Automake. This macro actually does too much -- ! # some checks are only needed if your package does certain things. ! # But this isn't really a big deal. ! ! # serial 1 ! ! dnl Usage: ! dnl AM_INIT_AUTOMAKE(package,version, [no-define]) ! ! AC_DEFUN(AM_INIT_AUTOMAKE, ! [AC_REQUIRE([AM_PROG_INSTALL]) ! PACKAGE=[$1] ! AC_SUBST(PACKAGE) ! VERSION=[$2] ! AC_SUBST(VERSION) ! dnl test to see if srcdir already configured ! if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then ! AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ! ifelse([$3],, ! AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") ! AC_DEFINE_UNQUOTED(VERSION, "$VERSION")) ! AM_SANITY_CHECK ! AC_ARG_PROGRAM ! dnl FIXME This is truly gross. ! missing_dir=`cd $ac_aux_dir && pwd` ! AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) ! AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) ! AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) ! AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) ! AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) ! AC_PROG_MAKE_SET]) ! ! ! # serial 1 ! ! AC_DEFUN(AM_PROG_INSTALL, ! [AC_REQUIRE([AC_PROG_INSTALL]) ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ! AC_SUBST(INSTALL_SCRIPT)dnl ! ]) ! ! # ! # Check to make sure that the build environment is sane. ! # ! ! AC_DEFUN(AM_SANITY_CHECK, ! [AC_MSG_CHECKING([whether build environment is sane]) ! # Just in case ! sleep 1 ! echo timestamp > conftestfile ! # Do `set' in a subshell so we don't clobber the current shell's ! # arguments. Must try -L first in case configure is actually a ! # symlink; some systems play weird games with the mod time of symlinks ! # (eg FreeBSD returns the mod time of the symlink's containing ! # directory). ! if ( ! set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` ! if test "$@" = "X"; then ! # -L didn't work. ! set X `ls -t $srcdir/configure conftestfile` ! fi ! test "[$]2" = conftestfile ! ) ! then ! # Ok. ! : ! else ! AC_MSG_ERROR([newly created file is older than distributed files! ! Check your system clock]) ! fi ! rm -f conftest* ! AC_MSG_RESULT(yes)]) ! ! dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) ! dnl The program must properly implement --version. ! AC_DEFUN(AM_MISSING_PROG, ! [AC_MSG_CHECKING(for working $2) ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if ($2 --version) < /dev/null > /dev/null 2>&1; then ! $1=$2 ! AC_MSG_RESULT(found) ! else ! $1="$3/missing $2" ! AC_MSG_RESULT(missing) ! fi ! AC_SUBST($1)]) ! ! # Like AC_CONFIG_HEADER, but automatically create stamp file. ! ! AC_DEFUN(AM_CONFIG_HEADER, ! [AC_PREREQ([2.12]) ! AC_CONFIG_HEADER([$1]) ! dnl When config.status generates a header, we must update the stamp-h file. ! dnl This file resides in the same directory as the config header ! dnl that is generated. We must strip everything past the first ":", ! dnl and everything past the last "/". ! AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ! ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, ! <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, ! <>; do ! case " <<$>>CONFIG_HEADERS " in ! *" <<$>>am_file "*<<)>> ! echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ! ;; ! esac ! am_indx=`expr "<<$>>am_indx" + 1` ! done<<>>dnl>>) ! changequote([,]))]) ! ! # Define a conditional. ! ! AC_DEFUN(AM_CONDITIONAL, ! [AC_SUBST($1_TRUE) ! AC_SUBST($1_FALSE) ! if $2; then ! $1_TRUE= ! $1_FALSE='#' ! else ! $1_TRUE='#' ! $1_FALSE= ! fi]) ! diff -crP ../make-3.75/ar.c ./ar.c *** ../make-3.75/ar.c Wed Mar 20 10:10:13 1996 --- ./ar.c Wed Aug 27 16:31:03 1997 *************** *** 1,5 **** /* Interface to `ar' archives for GNU Make. ! Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Interface to `ar' archives for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 26,34 **** /* Defined in arscan.c. */ extern long int ar_scan PARAMS ((char *archive, long int (*function) (), long int arg)); - extern int ar_member_touch PARAMS ((char *arname, char *memname)); extern int ar_name_equal PARAMS ((char *name, char *mem, int truncated)); ! /* Return nonzero if NAME is an archive-member reference, zero if not. An archive-member reference is a name like `lib(member)'. --- 26,35 ---- /* Defined in arscan.c. */ extern long int ar_scan PARAMS ((char *archive, long int (*function) (), long int arg)); extern int ar_name_equal PARAMS ((char *name, char *mem, int truncated)); ! #ifndef VMS ! extern int ar_member_touch PARAMS ((char *arname, char *memname)); ! #endif /* Return nonzero if NAME is an archive-member reference, zero if not. An archive-member reference is a name like `lib(member)'. *************** *** 40,46 **** char *name; { char *p = index (name, '('), *end = name + strlen (name) - 1; ! if (p == 0 || p == name || *end != ')') return 0; --- 41,47 ---- char *name; { char *p = index (name, '('), *end = name + strlen (name) - 1; ! if (p == 0 || p == name || *end != ')') return 0; *************** *** 66,176 **** if (memname_p != 0) *memname_p = savestring (p + 1, end - (p + 1)); - } - - #ifdef VMS - #include - #include - #include - #include - #include - #if __DECC - #include - #endif - - #define uppercasify(str) {char *str1; for (str1 = str; *str1; str1++) *str1 = _toupper(*str1);} - - #define LBR$_KEYNOTFND 2527330 /* This isn't in any .h file anywhere so I got it from a MACRO library */ - - time_t - ar_member_date (name) - char *name; - { - static char *arname; - static char *memname; - char *p,*q; - long int val; - static struct { - struct mhddef mhd; - struct credef cre; - char garbage[256]; - } buf; - int func=LBR$C_READ, - type=LBR$C_TYP_OBJ, - rfa[2], - lidx, - status; - $DESCRIPTOR(bufdesc,(char *)&buf); - $DESCRIPTOR(libdesc,arname); - $DESCRIPTOR(moddesc,memname); - - /* This "file" is an archive member. */ - p = index (name, '('); - arname = savestring (name, p - name); - val = strlen (p) - 2; - /* - if (val > 15) - val = 15; - */ - memname = savestring (p + 1, val); - #ifdef OLDWAY - p = rindex (memname, ')'); - if (p != 0) { - q = rindex(p,'.'); - if (q) - *q = '\0'; /* to get rid of extension */ - } - #endif - - q = rindex(memname,'.'); - if (q) - *q = '\0'; /* to get rid of extension */ - - uppercasify(memname); - - /* Make sure we know the modtime of the archive itself because - we are likely to be called just before commands to remake a - member are run, and they will change the archive itself. */ - (void) f_mtime (enter_file (arname)); - - libdesc.dsc$a_pointer = arname; - libdesc.dsc$w_length = strlen(arname); - moddesc.dsc$a_pointer = memname; - moddesc.dsc$w_length = strlen(memname); - - if (!((status = lbr$ini_control(&lidx,&func,&type,0)) & 1)) { - printf("Error in lbr$ini_control, %d\n",status); - return(-1); - } - - if (!((status = lbr$open(&lidx,&libdesc,0,0,0,0,0)) & 1)) { - printf("Error opening library %s to lookup member %s, %d\n",arname, memname ,status); - return(-1); - } - - if (!((status = lbr$lookup_key(&lidx,&moddesc,rfa)) & 1)) { - if (status != LBR$_KEYNOTFND) - printf("Error looking up module %s in library %s, %d\n",memname, arname ,status); - lbr$close(&lidx); - return(-1); - } - - if (!((status = lbr$set_module(&lidx,rfa,&bufdesc,&bufdesc,0)) & 1)) { - printf("Error getting module info, %d\n",status); - lbr$close(&lidx); - return(-1); - } - - lbr$close(&lidx); - - val = SHELL$FIX_TIME(&buf.mhd.mhd$l_datim); - - free (arname); - free (memname); - return (val <= 0 ? (time_t) -1 : (time_t) val); } - - #else static long int ar_member_date_1 PARAMS ((int desc, char *mem, int truncated, long int hdrpos, long int datapos, long int size, long int date, int uid, int gid, int mode, char *name)); --- 67,73 ---- *************** *** 232,244 **** { return ar_name_equal (name, mem, truncated) ? date : 0; } - #endif /* !VMS */ /* Set the archive-member NAME's modtime to now. */ #ifdef VMS int ! ar_touch (name) char *name; { error ("touch archive member is not available on VMS"); --- 129,140 ---- { return ar_name_equal (name, mem, truncated) ? date : 0; } /* Set the archive-member NAME's modtime to now. */ #ifdef VMS int ! ar_touch (name) char *name; { error ("touch archive member is not available on VMS"); diff -crP ../make-3.75/arscan.c ./arscan.c *** ../make-3.75/arscan.c Thu Aug 10 19:08:13 1995 --- ./arscan.c Wed Aug 27 16:31:04 1997 *************** *** 1,19 **** /* Library function for scanning an archive file. ! Copyright (C) 1987, 89, 91, 92, 93, 94, 95 Free Software Foundation, Inc. ! This program 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, or (at your option) ! any later version. ! ! This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "make.h" --- 1,19 ---- /* Library function for scanning an archive file. ! Copyright (C) 1987,89,91,92,93,94,95,97 Free Software Foundation, Inc. ! This program 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, or (at your option) ! any later version. ! ! This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "make.h" *************** *** 25,30 **** --- 25,195 ---- #ifndef NO_ARCHIVES + #ifdef VMS + #include + #include + #include + #include + #include + #if __DECC + #include + #include + #endif + + #define uppercasify(str) {char *str1; for (str1 = str; *str1; str1++) *str1 = _toupper(*str1);} + + static void *VMS_lib_idx; + + static char *VMS_saved_memname; + + static time_t VMS_member_date; + + static long int (*VMS_function) (); + + static int + VMS_get_member_info (module, rfa) + struct dsc$descriptor_s *module; + unsigned long *rfa; + { + int status, i; + long int fnval; + + time_t val; + + static struct dsc$descriptor_s bufdesc = + { 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL }; + + struct mhddef *mhd; + char filename[128]; + + bufdesc.dsc$a_pointer = filename; + bufdesc.dsc$w_length = sizeof (filename); + + status = lbr$set_module (&VMS_lib_idx, rfa, &bufdesc, + &bufdesc.dsc$w_length, 0); + if (! status) + { + error ("lbr$set_module failed to extract module info, status = %d", + status); + + lbr$close (&VMS_lib_idx); + + return 0; + } + + mhd = (struct mhddef *) filename; + + val = decc$fix_time (&mhd->mhd$l_datim); + + for (i = 0; i < module->dsc$w_length; i++) + filename[i] = _tolower (module->dsc$a_pointer[i]); + + filename[i] = '\0'; + + VMS_member_date = (time_t) -1; + + fnval = + (*VMS_function) (-1, filename, 0, 0, 0, 0, val, 0, 0, 0, + VMS_saved_memname); + + if (fnval) + { + VMS_member_date = fnval; + return 0; + } + else + return 1; + } + + /* Takes three arguments ARCHIVE, FUNCTION and ARG. + + Open the archive named ARCHIVE, find its members one by one, + and for each one call FUNCTION with the following arguments: + archive file descriptor for reading the data, + member name, + member name might be truncated flag, + member header position in file, + member data position in file, + member data size, + member date, + member uid, + member gid, + member protection mode, + ARG. + + NOTE: on VMS systems, only name, date, and arg are meaningful! + + The descriptor is poised to read the data of the member + when FUNCTION is called. It does not matter how much + data FUNCTION reads. + + If FUNCTION returns nonzero, we immediately return + what FUNCTION returned. + + Returns -1 if archive does not exist, + Returns -2 if archive has invalid format. + Returns 0 if have scanned successfully. */ + + long int + ar_scan (archive, function, arg) + char *archive; + long int (*function) (); + long int arg; + { + char *p; + + static struct dsc$descriptor_s libdesc = + { 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL }; + + unsigned long func = LBR$C_READ; + unsigned long type = LBR$C_TYP_UNK; + unsigned long index = 1; + + int status; + + status = lbr$ini_control (&VMS_lib_idx, &func, &type, 0); + + if (! status) + { + error ("lbr$ini_control failed with status = %d",status); + return -2; + } + + libdesc.dsc$a_pointer = archive; + libdesc.dsc$w_length = strlen (archive); + + status = lbr$open (&VMS_lib_idx, &libdesc, 0, 0, 0, 0, 0); + + if (! status) + { + error ("unable to open library `%s' to lookup member `%s'", + archive, (char *)arg); + return -1; + } + + VMS_saved_memname = (char *)arg; + + /* For comparison, delete .obj from arg name. */ + + p = rindex (VMS_saved_memname, '.'); + if (p) + *p = '\0'; + + VMS_function = function; + + lbr$get_index (&VMS_lib_idx, &index, VMS_get_member_info, 0); + + /* Undo the damage. */ + if (p) + *p = '.'; + + lbr$close (&VMS_lib_idx); + + return VMS_member_date > 0 ? VMS_member_date : 0; + } + + #else /* !VMS */ + /* SCO Unix's compiler defines both of these. */ #ifdef M_UNIX #undef M_XENIX *************** *** 203,209 **** (void) close (desc); return -2; } ! name[name_len] = 0; sscanf (member_header.ar_date, "%12ld", &dateval); --- 368,374 ---- (void) close (desc); return -2; } ! name[name_len] = 0; sscanf (member_header.ar_date, "%12ld", &dateval); *************** *** 277,283 **** && name[2] == '/') { int namesize = atoi (name + 3); ! name = (char *) alloca (namesize + 1); nread = read (desc, name, namesize); if (nread != namesize) --- 442,448 ---- && name[2] == '/') { int namesize = atoi (name + 3); ! name = (char *) alloca (namesize + 1); nread = read (desc, name, namesize); if (nread != namesize) *************** *** 351,357 **** (void) close (desc); return -2; } ! /* The names are separated by newlines. Some formats have a trailing slash. Null terminate the strings for convenience. */ --- 516,522 ---- (void) close (desc); return -2; } ! /* The names are separated by newlines. Some formats have a trailing slash. Null terminate the strings for convenience. */ *************** *** 365,371 **** clear[-1] = '\0'; } } ! is_namemap = 0; } --- 530,536 ---- clear[-1] = '\0'; } } ! is_namemap = 0; } *************** *** 379,384 **** --- 544,550 ---- close (desc); return 0; } + #endif /* !VMS */ /* Return nonzero iff NAME matches MEM. If TRUNCATED is nonzero, MEM may be truncated to *************** *** 426,432 **** } #else /* AIX or APOLLO. */ ! if (truncated) { #ifdef AIAMAG --- 592,598 ---- } #else /* AIX or APOLLO. */ ! #ifndef VMS if (truncated) { #ifdef AIAMAG *************** *** 435,441 **** #else struct ar_hdr hdr; return !strncmp (name, mem, ! sizeof (hdr.ar_name) - #if !defined (__hpux) && !defined (cray) 1 #else --- 601,607 ---- #else struct ar_hdr hdr; return !strncmp (name, mem, ! sizeof (hdr.ar_name) - #if !defined (__hpux) && !defined (cray) 1 #else *************** *** 444,455 **** --- 610,623 ---- ); #endif } + #endif /* !VMS */ return !strcmp (name, mem); #endif } + #ifndef VMS /* ARGSUSED */ static long int ar_member_pos (desc, mem, truncated, *************** *** 532,537 **** --- 700,706 ---- errno = i; return -3; } + #endif #ifdef TEST diff -crP ../make-3.75/build.sh.in ./build.sh.in *** ../make-3.75/build.sh.in Sun Jul 14 13:11:26 1996 --- ./build.sh.in Tue Sep 16 11:04:10 1997 *************** *** 2,10 **** # Shell script to build GNU Make in the absence of any `make' program. # @configure_input@ ! # Copyright (C) 1993, 1994 Free Software Foundation, Inc. # This file is part of GNU Make. ! # # GNU Make 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, or (at your option) --- 2,10 ---- # Shell script to build GNU Make in the absence of any `make' program. # @configure_input@ ! # Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. # This file is part of GNU Make. ! # # GNU Make 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, or (at your option) *************** *** 14,20 **** # 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 GNU Make; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --- 14,20 ---- # 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 GNU Make; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. *************** *** 45,51 **** set -e # These are all the objects we need to link together. ! objs="commands.o job.o dir.o file.o misc.o main.o read.o remake.o rule.o implicit.o default.o variable.o expand.o function.o vpath.o version.o ar.o arscan.o signame.o getopt.o getopt1.o glob/libglob.a glob/glob.o glob/fnmatch.o remote-${REMOTE}.o ${extras} ${ALLOCA}" # Compile the source files into those objects. for file in `echo ${objs} | sed 's/\.o/.c/g'`; do --- 45,51 ---- set -e # These are all the objects we need to link together. ! objs="main.o commands.o job.o dir.o file.o misc.o read.o remake.o rule.o implicit.o default.o variable.o expand.o function.o vpath.o version.o ar.o arscan.o signame.o getopt.o getopt1.o glob/fnmatch.o glob/glob.o remote-${REMOTE}.o ${extras} ${ALLOCA}" # Compile the source files into those objects. for file in `echo ${objs} | sed 's/\.o/.c/g'`; do diff -crP ../make-3.75/build_w32.bat ./build_w32.bat *** ../make-3.75/build_w32.bat Wed May 15 15:14:43 1996 --- ./build_w32.bat Wed Aug 27 16:31:05 1997 *************** *** 1,136 **** cd w32\subproc echo "Creating the subproc library" %ComSpec% /c build.bat cd ..\.. del link.dbg link.rel del config.h ! copy config.h.WIN32 config.h echo off ! echo "Creating GNU make 3.74 for Windows NT" echo on if not exist .\WinDebug\nul mkdir .\WinDebug ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c variable.c echo WinDebug\variable.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c rule.c echo WinDebug\rule.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c remote-stub.c echo WinDebug\remote-stub.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c commands.c echo WinDebug\commands.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c file.c echo WinDebug\file.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c getloadavg.c echo WinDebug\getloadavg.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c default.c echo WinDebug\default.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c signame.c echo WinDebug\signame.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c expand.c echo WinDebug\expand.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c dir.c echo WinDebug\dir.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c main.c echo WinDebug\main.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c getopt1.c echo WinDebug\getopt1.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c job.c echo WinDebug\job.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c read.c echo WinDebug\read.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c version.c echo WinDebug\version.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c getopt.c echo WinDebug\getopt.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c arscan.c echo WinDebug\arscan.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c remake.c echo WinDebug\remake.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c misc.c echo WinDebug\misc.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c ar.c echo WinDebug\ar.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c function.c echo WinDebug\function.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c vpath.c echo WinDebug\vpath.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c implicit.c echo WinDebug\implicit.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c .\w32\compat\dirent.c echo WinDebug\dirent.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c .\glob\glob.c echo WinDebug\glob.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c .\glob\fnmatch.c echo WinDebug\fnmatch.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.pdb /c .\w32\pathstuff.c echo WinDebug\pathstuff.obj >>link.dbg echo off ! echo "Linking WinDebug/make374.exe" ! rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/make374.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/make374.exe .\WinDebug/variable.obj .\WinDebug/rule.obj .\WinDebug/remote-stub.obj .\WinDebug/commands.obj .\WinDebug/file.obj .\WinDebug/getloadavg.obj .\WinDebug/default.obj .\WinDebug/signame.obj .\WinDebug/expand.obj .\WinDebug/dir.obj .\WinDebug/main.obj .\WinDebug/getopt1.obj .\WinDebug/job.obj .\WinDebug/read.obj .\WinDebug/version.obj .\WinDebug/getopt.obj .\WinDebug/arscan.obj .\WinDebug/remake.obj .\WinDebug/misc.obj .\WinDebug/ar.obj .\WinDebug/function.obj .\WinDebug/vpath.obj .\WinDebug/implicit.obj .\WinDebug/dirent.obj .\WinDebug/glob.obj .\WinDebug/fnmatch.obj .\WinDebug/pathstuff.obj echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib >>link.dbg ! link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/make374.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/make374.exe @link.dbg ! if not exist .\WinDebug/make374.exe echo "WinDebug build failed" ! if exist .\WinDebug/make374.exe echo "WinDebug build succeeded!" if not exist .\WinRel\nul mkdir .\WinRel echo on ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c variable.c echo WinRel\variable.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c rule.c echo WinRel\rule.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c remote-stub.c echo WinRel\remote-stub.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c commands.c echo WinRel\commands.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c file.c echo WinRel\file.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c getloadavg.c echo WinRel\getloadavg.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c default.c echo WinRel\default.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c signame.c echo WinRel\signame.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c expand.c echo WinRel\expand.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c dir.c echo WinRel\dir.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c main.c echo WinRel\main.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c getopt1.c echo WinRel\getopt1.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c job.c echo WinRel\job.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c read.c echo WinRel\read.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c version.c echo WinRel\version.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c getopt.c echo WinRel\getopt.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c arscan.c echo WinRel\arscan.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c remake.c echo WinRel\remake.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c misc.c echo WinRel\misc.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c ar.c echo WinRel\ar.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c function.c echo WinRel\function.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c vpath.c echo WinRel\vpath.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c implicit.c echo WinRel\implicit.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c echo WinRel\dirent.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c .\glob\glob.c echo WinRel\glob.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c .\glob\fnmatch.c echo WinRel\fnmatch.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.pch /Fo.\WinRel/ /c .\w32\pathstuff.c echo WinRel\pathstuff.obj >>link.rel echo off ! echo "Linking WinRel/make374.exe" ! rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/make374.pdb /MACHINE:I386 /OUT:.\WinRel/make374.exe .\WinRel/variable.obj .\WinRel/rule.obj .\WinRel/remote-stub.obj .\WinRel/commands.obj .\WinRel/file.obj .\WinRel/getloadavg.obj .\WinRel/default.obj .\WinRel/signame.obj .\WinRel/expand.obj .\WinRel/dir.obj .\WinRel/main.obj .\WinRel/getopt1.obj .\WinRel/job.obj .\WinRel/read.obj .\WinRel/version.obj .\WinRel/getopt.obj .\WinRel/arscan.obj .\WinRel/remake.obj .\WinRel/misc.obj .\WinRel/ar.obj .\WinRel/function.obj .\WinRel/vpath.obj .\WinRel/implicit.obj .\WinRel/dirent.obj .\WinRel/glob.obj .\WinRel/fnmatch.obj .\WinRel/pathstuff.obj echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib >>link.rel ! link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/make374.pdb /MACHINE:I386 /OUT:.\WinRel/make374.exe @link.rel ! if not exist .\WinRel/make374.exe echo "WinRel build failed" ! if exist .\WinRel/make374.exe echo "WinRel build succeeded!" echo on --- 1,137 ---- + set make=gnumake cd w32\subproc echo "Creating the subproc library" %ComSpec% /c build.bat cd ..\.. del link.dbg link.rel del config.h ! copy config.h.W32 config.h echo off ! echo "Creating GNU make for Windows 95/NT" echo on if not exist .\WinDebug\nul mkdir .\WinDebug ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c echo WinDebug\variable.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c echo WinDebug\rule.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c echo WinDebug\remote-stub.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c echo WinDebug\commands.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c echo WinDebug\file.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c echo WinDebug\getloadavg.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c echo WinDebug\default.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c echo WinDebug\signame.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c echo WinDebug\expand.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c echo WinDebug\dir.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c echo WinDebug\main.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c echo WinDebug\getopt1.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c echo WinDebug\job.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c echo WinDebug\read.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c echo WinDebug\version.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c echo WinDebug\getopt.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c echo WinDebug\arscan.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c echo WinDebug\remake.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c echo WinDebug\misc.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c echo WinDebug\ar.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c echo WinDebug\function.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c echo WinDebug\vpath.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c echo WinDebug\implicit.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c echo WinDebug\dirent.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c echo WinDebug\glob.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c echo WinDebug\fnmatch.obj >>link.dbg ! cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c echo WinDebug\pathstuff.obj >>link.dbg echo off ! echo "Linking WinDebug/%make%.exe" ! rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/%make%.exe .\WinDebug/variable.obj .\WinDebug/rule.obj .\WinDebug/remote-stub.obj .\WinDebug/commands.obj .\WinDebug/file.obj .\WinDebug/getloadavg.obj .\WinDebug/default.obj .\WinDebug/signame.obj .\WinDebug/expand.obj .\WinDebug/dir.obj .\WinDebug/main.obj .\WinDebug/getopt1.obj .\WinDebug/job.obj .\WinDebug/read.obj .\WinDebug/version.obj .\WinDebug/getopt.obj .\WinDebug/arscan.obj .\WinDebug/remake.obj .\WinDebug/misc.obj .\WinDebug/ar.obj .\WinDebug/function.obj .\WinDebug/vpath.obj .\WinDebug/implicit.obj .\WinDebug/dirent.obj .\WinDebug/glob.obj .\WinDebug/fnmatch.obj .\WinDebug/pathstuff.obj echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib >>link.dbg ! link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/%make%.exe @link.dbg ! if not exist .\WinDebug/%make%.exe echo "WinDebug build failed" ! if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!" if not exist .\WinRel\nul mkdir .\WinRel echo on ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c echo WinRel\variable.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c echo WinRel\rule.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c echo WinRel\remote-stub.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c echo WinRel\commands.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c echo WinRel\file.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c echo WinRel\getloadavg.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c echo WinRel\default.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c echo WinRel\signame.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c echo WinRel\expand.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c echo WinRel\dir.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c echo WinRel\main.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c echo WinRel\getopt1.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c echo WinRel\job.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c echo WinRel\read.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c echo WinRel\version.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c echo WinRel\getopt.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c echo WinRel\arscan.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c echo WinRel\remake.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c echo WinRel\misc.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c echo WinRel\ar.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c echo WinRel\function.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c echo WinRel\vpath.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c echo WinRel\implicit.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c echo WinRel\dirent.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c echo WinRel\glob.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c echo WinRel\fnmatch.obj >>link.rel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c echo WinRel\pathstuff.obj >>link.rel echo off ! echo "Linking WinRel/%make%.exe" ! rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /MACHINE:I386 /OUT:.\WinRel/%make%.exe .\WinRel/variable.obj .\WinRel/rule.obj .\WinRel/remote-stub.obj .\WinRel/commands.obj .\WinRel/file.obj .\WinRel/getloadavg.obj .\WinRel/default.obj .\WinRel/signame.obj .\WinRel/expand.obj .\WinRel/dir.obj .\WinRel/main.obj .\WinRel/getopt1.obj .\WinRel/job.obj .\WinRel/read.obj .\WinRel/version.obj .\WinRel/getopt.obj .\WinRel/arscan.obj .\WinRel/remake.obj .\WinRel/misc.obj .\WinRel/ar.obj .\WinRel/function.obj .\WinRel/vpath.obj .\WinRel/implicit.obj .\WinRel/dirent.obj .\WinRel/glob.obj .\WinRel/fnmatch.obj .\WinRel/pathstuff.obj echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib >>link.rel ! link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /MACHINE:I386 /OUT:.\WinRel/%make%.exe @link.rel ! if not exist .\WinRel/%make%.exe echo "WinRel build failed" ! if exist .\WinRel/%make%.exe echo "WinRel build succeeded!" echo on diff -crP ../make-3.75/commands.c ./commands.c *** ../make-3.75/commands.c Tue May 14 16:41:51 1996 --- ./commands.c Wed Aug 27 16:31:06 1997 *************** *** 1,5 **** /* Command processing for GNU Make. ! Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Command processing for GNU Make. ! Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 369,385 **** fatal_error_signal (sig) int sig; { ! #if defined(__MSDOS__) || defined(_AMIGA) remove_intermediates (1); #ifdef _AMIGA if (sig == SIGINT) fputs ("*** Break.\n", stderr); exit (10); ! #else ! exit (1); ! #endif ! #else /* Not MSDOS. */ handling_fatal_signal = 1; /* Set the handling for this signal to the default. --- 369,393 ---- fatal_error_signal (sig) int sig; { ! #ifdef __MSDOS__ ! extern int dos_status, dos_command_running; ! ! if (dos_command_running) ! { ! /* That was the child who got the signal, not us. */ ! dos_status |= (sig << 8); ! return; ! } remove_intermediates (1); + exit (1); + #else /* not __MSDOS__ */ #ifdef _AMIGA + remove_intermediates (1); if (sig == SIGINT) fputs ("*** Break.\n", stderr); exit (10); ! #else /* not Amiga */ handling_fatal_signal = 1; /* Set the handling for this signal to the default. *************** *** 445,451 **** will be unblocked when we return and arrive then to kill us. */ if (kill (getpid (), sig) < 0) pfatal_with_name ("kill"); ! #endif /* MSDOS. */ } /* Delete FILE unless it's precious or not actually a file (phony), --- 453,460 ---- will be unblocked when we return and arrive then to kill us. */ if (kill (getpid (), sig) < 0) pfatal_with_name ("kill"); ! #endif /* not Amiga */ ! #endif /* not __MSDOS__ */ } /* Delete FILE unless it's precious or not actually a file (phony), diff -crP ../make-3.75/config.ami ./config.ami *** ../make-3.75/config.ami Thu May 9 14:02:23 1996 --- ./config.ami Tue Sep 16 11:04:13 1997 *************** *** 32,37 **** --- 32,40 ---- /* Define if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H + /* Define if you have the memmove function. */ + #define HAVE_MEMMOVE 1 + /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT *************** *** 158,163 **** --- 161,172 ---- /* Define vfork as fork if vfork does not work. */ #undef vfork + + /* Name of this package (needed by automake) */ + #define PACKAGE "make" + + /* Version of this package (needed by automake) */ + #define VERSION "3.76" /* Define to the name of the SCCS `get' command. */ #define SCCS_GET "get" diff -crP ../make-3.75/config.h-vms ./config.h-vms *** ../make-3.75/config.h-vms Sat Jul 20 07:06:41 1996 --- ./config.h-vms Tue Sep 16 11:04:14 1997 *************** *** 34,39 **** --- 34,42 ---- /* Define if you have and it should be used (not on Ultrix). */ /* #undef HAVE_ALLOCA_H 1 */ + /* Define if you have the memmove function. */ + #define HAVE_MEMMOVE 1 + /* Define if you don't have vprintf but do have _doprnt. */ /* #undef HAVE_DOPRNT */ *************** *** 111,117 **** /* #undef NO_MINUS_C_MINUS_O */ /* Define to `int' if doesn't define. */ ! #define pid_t int /* Define if the system does not provide POSIX.1 features except with this defined. */ --- 114,120 ---- /* #undef NO_MINUS_C_MINUS_O */ /* Define to `int' if doesn't define. */ ! /* #undef pid_t */ /* Define if the system does not provide POSIX.1 features except with this defined. */ *************** *** 150,156 **** /* #undef SYS_SIGLIST_DECLARED */ /* Define to `int' if doesn't define. */ ! #define uid_t int /* Define for Encore UMAX. */ /* #undef UMAX */ --- 153,159 ---- /* #undef SYS_SIGLIST_DECLARED */ /* Define to `int' if doesn't define. */ ! /* #undef uid_t */ /* Define for Encore UMAX. */ /* #undef UMAX */ *************** *** 159,164 **** --- 162,173 ---- instead of . */ /* #undef UMAX4_3 */ + /* Name of this package (needed by automake) */ + #define PACKAGE "make" + + /* Version of this package (needed by automake) */ + #define VERSION "3.76" + /* Define vfork as fork if vfork does not work. */ /* #undef vfork */ *************** *** 287,292 **** #define PARAMS(protos) protos #else /* Not C++ or ANSI C. */ #undef PARAMS ! #define PARAMS(protos) () #endif /* C++ or ANSI C. */ --- 296,301 ---- #define PARAMS(protos) protos #else /* Not C++ or ANSI C. */ #undef PARAMS ! #define PARAMS(protos) () #endif /* C++ or ANSI C. */ diff -crP ../make-3.75/config.h.W32 ./config.h.W32 *** ../make-3.75/config.h.W32 Wed Dec 31 19:00:00 1969 --- ./config.h.W32 Tue Sep 16 11:04:14 1997 *************** *** 0 **** --- 1,299 ---- + /* config.h.in. Generated automatically from configure.in by autoheader. */ + + /* 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 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 for DGUX with . */ + #undef DGUX + + /* Define if the `getloadavg' function needs to be run setuid or setgid. */ + #undef GETLOADAVG_PRIVILEGED + + /* Define to `int' if doesn't define. */ + #undef gid_t + #define gid_t int + + /* Define if you have alloca, as a function or macro. */ + #undef HAVE_ALLOCA + #define HAVE_ALLOCA + + /* Define if you have and it should be used (not on Ultrix). */ + #undef HAVE_ALLOCA_H + + /* Define if you have the memmove function. */ + #undef HAVE_MEMMOVE + #define HAVE_MEMMOVE 1 + + /* Define if you don't have vprintf but do have _doprnt. */ + #undef HAVE_DOPRNT + + /* Define if your system has its own `getloadavg' function. */ + #undef HAVE_GETLOADAVG + + /* Define if you have the getmntent function. */ + #undef HAVE_GETMNTENT + + /* Define if the `long double' type works. */ + #undef HAVE_LONG_DOUBLE + + /* Define if you support file names longer than 14 characters. */ + #undef HAVE_LONG_FILE_NAMES + #define HAVE_LONG_FILE_NAMES + + /* Define if you have a working `mmap' system call. */ + #undef HAVE_MMAP + + /* Define if system calls automatically restart after interruption + by a signal. */ + #undef HAVE_RESTARTABLE_SYSCALLS + + /* Define if your struct stat has st_blksize. */ + #undef HAVE_ST_BLKSIZE + + /* Define if your struct stat has st_blocks. */ + #undef HAVE_ST_BLOCKS + + /* Define if you have the strcoll function and it is properly defined. */ + #undef HAVE_STRCOLL + #define HAVE_STRCOLL + + /* Define if your struct stat has st_rdev. */ + #undef HAVE_ST_RDEV + #define HAVE_ST_RDEV + + /* Define if you have the strftime function. */ + #undef HAVE_STRFTIME + #define HAVE_STRFTIME + + /* Define if you have that is POSIX.1 compatible. */ + #undef HAVE_SYS_WAIT_H + + /* Define if your struct tm has tm_zone. */ + #undef HAVE_TM_ZONE + + /* Define if you don't have tm_zone but do have the external array + tzname. */ + #undef HAVE_TZNAME + #define HAVE_TZNAME + + /* Define if you have . */ + #undef HAVE_UNISTD_H + + /* Define if utime(file, NULL) sets file's timestamp to the present. */ + #undef HAVE_UTIME_NULL + #define HAVE_UTIME_NULL + + /* Define if you have . */ + #undef HAVE_VFORK_H + + /* Define if you have the vprintf function. */ + #undef HAVE_VPRINTF + #define HAVE_VPRINTF + + /* Define if you have the wait3 system call. */ + #undef HAVE_WAIT3 + + /* Define if on MINIX. */ + #undef _MINIX + + /* Define if your struct nlist has an n_un member. */ + #undef NLIST_NAME_UNION + + /* Define if you have . */ + #undef NLIST_STRUCT + + /* Define if your C compiler doesn't accept -c and -o together. */ + #undef NO_MINUS_C_MINUS_O + + /* Define to `int' if doesn't define. */ + #undef pid_t + #define pid_t int + + /* 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 _POSIX_SOURCE + + /* Define as the return type of signal handlers (int or void). */ + #undef RETSIGTYPE + #define RETSIGTYPE void + + /* Define if the setvbuf function takes the buffering type as its second + argument and the buffer pointer as the third, as on System V + before release 3. */ + #undef SETVBUF_REVERSED + + /* 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 the `S_IS*' macros in do not work properly. */ + #undef STAT_MACROS_BROKEN + + /* Define if you have the ANSI C header files. */ + #undef STDC_HEADERS + #define STDC_HEADERS + + /* Define on System V Release 4. */ + #undef SVR4 + + /* Define if `sys_siglist' is declared by . */ + #undef SYS_SIGLIST_DECLARED + + /* Define to `int' if doesn't define. */ + #undef uid_t + #define uid_t int + + /* Define for Encore UMAX. */ + #undef UMAX + + /* Define for Encore UMAX 4.3 that has + instead of . */ + #undef UMAX4_3 + + /* Define vfork as fork if vfork does not work. */ + #undef vfork + + /* Name of this package (needed by automake) */ + #define PACKAGE "make" + + /* Version of this package (needed by automake) */ + #define VERSION "3.76" + + /* Define to the name of the SCCS `get' command. */ + #undef SCCS_GET + #define SCCS_GET "echo no sccs get" + + /* Define this if the SCCS `get' command understands the `-G' option. */ + #undef SCCS_GET_MINUS_G + + /* Define this if the C library defines the variable `sys_siglist'. */ + #undef HAVE_SYS_SIGLIST + + /* Define this if the C library defines the variable `_sys_siglist'. */ + #undef HAVE__SYS_SIGLIST + + /* Define this if you have the `union wait' type in . */ + #undef HAVE_UNION_WAIT + + /* Define if you have the dup2 function. */ + #undef HAVE_DUP2 + #define HAVE_DUP2 + + /* Define if you have the getcwd function. */ + #undef HAVE_GETCWD + #define HAVE_GETCWD + + /* Define if you have the getgroups function. */ + #undef HAVE_GETGROUPS + + /* Define if you have the mktemp function. */ + #undef HAVE_MKTEMP + #define HAVE_MKTEMP + + /* Define if you have the psignal function. */ + #undef HAVE_PSIGNAL + + /* Define if you have the setegid function. */ + #undef HAVE_SETEGID + + /* Define if you have the seteuid function. */ + #undef HAVE_SETEUID + + /* Define if you have the setlinebuf function. */ + #undef HAVE_SETLINEBUF + + /* Define if you have the setregid function. */ + #undef HAVE_SETREGID + + /* Define if you have the setreuid function. */ + #undef HAVE_SETREUID + + /* Define if you have the sigsetmask function. */ + #undef HAVE_SIGSETMASK + + /* Define if you have the strerror function. */ + #undef HAVE_STRERROR + #define HAVE_STRERROR + + /* Define if you have the strsignal function. */ + #undef HAVE_STRSIGNAL + + /* Define if you have the wait3 function. */ + #undef HAVE_WAIT3 + + /* Define if you have the waitpid function. */ + #undef HAVE_WAITPID + + /* Define if you have the header file. */ + #undef HAVE_DIRENT_H + #define HAVE_DIRENT_H + + /* Define if you have the header file. */ + #undef HAVE_FCNTL_H + #define HAVE_FCNTL_H + + /* Define if you have the header file. */ + #undef HAVE_LIMITS_H + #define HAVE_LIMITS_H + + /* Define if you have the header file. */ + #undef HAVE_MACH_MACH_H + + /* Define if you have the header file. */ + #undef HAVE_MEMORY_H + #define HAVE_MEMORY_H + + /* Define if you have the header file. */ + #undef HAVE_NDIR_H + + /* Define if you have the header file. */ + #undef HAVE_STRING_H + #define HAVE_STRING_H + + /* Define if you have the header file. */ + #undef HAVE_SYS_DIR_H + + /* Define if you have the header file. */ + #undef HAVE_SYS_NDIR_H + + /* Define if you have the header file. */ + #undef HAVE_SYS_PARAM_H + + /* Define if you have the header file. */ + #undef HAVE_SYS_TIMEB_H + #define HAVE_SYS_TIMEB_H + + /* Define if you have the header file. */ + #undef HAVE_SYS_WAIT_H + + /* Define if you have the header file. */ + #undef HAVE_UNISTD_H + + /* Define if you have the dgc library (-ldgc). */ + #undef HAVE_LIBDGC + + /* Define if you have the sun library (-lsun). */ + #undef HAVE_LIBSUN Only in ../make-3.75: config.h.WIN32 diff -crP ../make-3.75/config.h.in ./config.h.in *** ../make-3.75/config.h.in Wed Aug 28 17:12:18 1996 --- ./config.h.in Tue Sep 16 11:00:24 1997 *************** *** 35,40 **** --- 35,43 ---- /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT + /* Define if your system has a working fnmatch function. */ + #undef HAVE_FNMATCH + /* Define if your system has its own `getloadavg' function. */ #undef HAVE_GETLOADAVG *************** *** 127,135 **** /* 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 --- 130,138 ---- /* 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 *************** *** 158,163 **** --- 161,172 ---- /* Define vfork as fork if vfork does not work. */ #undef vfork + /* Name of this package (needed by automake) */ + #undef PACKAGE + + /* Version of this package (needed by automake) */ + #undef VERSION + /* Define to the name of the SCCS `get' command. */ #undef SCCS_GET *************** *** 182,193 **** --- 191,211 ---- /* Define if you have the getgroups function. */ #undef HAVE_GETGROUPS + /* Define if you have the getloadavg function. */ + #undef HAVE_GETLOADAVG + + /* Define if you have the memmove function. */ + #undef HAVE_MEMMOVE + /* Define if you have the mktemp function. */ #undef HAVE_MKTEMP /* Define if you have the psignal function. */ #undef HAVE_PSIGNAL + /* Define if you have the pstat_getdynamic function. */ + #undef HAVE_PSTAT_GETDYNAMIC + /* Define if you have the setegid function. */ #undef HAVE_SETEGID *************** *** 259,264 **** --- 277,285 ---- /* Define if you have the dgc library (-ldgc). */ #undef HAVE_LIBDGC + + /* Define if you have the kstat library (-lkstat). */ + #undef HAVE_LIBKSTAT /* Define if you have the sun library (-lsun). */ #undef HAVE_LIBSUN diff -crP ../make-3.75/configh.dos ./configh.dos *** ../make-3.75/configh.dos Sun Jul 14 15:57:17 1996 --- ./configh.dos Tue Sep 16 11:04:14 1997 *************** *** 1,68 **** /* Generated automatically from configure.in by autoheader. DO NOT EDIT! */ ! #define INCLUDEDIR "c:/djgpp/include" ! #define LIBDIR "c:/djgpp/lib" ! /* Define if you have dirent.h. */ ! #define HAVE_DIRENT_H ! /* Define if you have the strcoll function and it is properly defined. */ ! #define HAVE_STRCOLL ! /* Define if you have unistd.h. */ ! #define HAVE_UNISTD_H ! ! /* Define as the return type of signal handlers (int or void). */ ! #define RETSIGTYPE void ! ! /* Define if you have the ANSI C header files. */ ! #ifndef STDC_HEADERS ! #define STDC_HEADERS ! #endif ! ! /* Define if `sys_siglist' is declared by . */ ! #define SYS_SIGLIST_DECLARED ! ! /* Define if you have getdtablesize. */ ! #define HAVE_GETDTABLESIZE ! ! /* Define if you have dup2. */ ! #define HAVE_DUP2 ! ! /* Define if you have sys_siglist. */ ! #undef HAVE_SYS_SIGLIST ! ! /* Define if you have _sys_siglist. */ ! #undef HAVE__SYS_SIGLIST ! ! /* Define if you have psignal. */ ! #define HAVE_PSIGNAL ! ! /* Define if you have getcwd. */ ! #define HAVE_GETCWD /* Define if you have sigsetmask. */ ! #define HAVE_SIGSETMASK ! ! /* Define if you have setlinebuf. */ ! #define HAVE_SETLINEBUF ! ! /* Define if you have the header file. */ ! #define HAVE_LIMITS_H ! ! /* Define if you have the header file. */ ! #undef HAVE_SYS_PARAM_H ! ! /* Define if you have the header file. */ ! #define HAVE_FCNTL_H ! ! /* Define if you have the header file. */ ! #define HAVE_STRING_H /* Define if you have the header file. */ ! #define HAVE_MEMORY_H ! /* Define if you have the `strerror' function. */ ! #define HAVE_STRERROR #define SCCS_GET "get" --- 1,24 ---- /* Generated automatically from configure.in by autoheader. DO NOT EDIT! */ ! /* Many things are defined already by a system header. */ ! #include ! /* Name of this package (needed by automake) */ ! #define PACKAGE "make" ! /* Version of this package (needed by automake) */ ! #define VERSION "3.76" ! /* Define NSIG. */ ! #define NSIG SIGMAX /* Define if you have sigsetmask. */ ! #define HAVE_SIGSETMASK 1 /* Define if you have the header file. */ ! #define HAVE_MEMORY_H 1 ! /* Define if you have the memmove function. */ ! #define HAVE_MEMMOVE 1 #define SCCS_GET "get" diff -crP ../make-3.75/configure ./configure *** ../make-3.75/configure Thu Jul 25 20:35:04 1996 --- ./configure Tue Sep 16 11:00:29 1997 *************** *** 1,8 **** #! /bin/sh ! # From configure.in Id: configure.in,v 1.52 1996/07/20 09:30:04 roland Exp # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.10 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation --- 1,39 ---- #! /bin/sh ! # From configure.in Id: configure.in,v 1.58 1997/09/16 14:17:28 psmith Exp ! ! # Do all the work for Automake. This macro actually does too much -- ! # some checks are only needed if your package does certain things. ! # But this isn't really a big deal. ! ! # serial 1 ! ! ! ! ! ! # serial 1 ! ! ! ! # ! # Check to make sure that the build environment is sane. ! # ! ! ! ! ! ! # Like AC_CONFIG_HEADER, but automatically create stamp file. ! ! ! ! # Define a conditional. ! ! ! # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation *************** *** 52,57 **** --- 83,90 ---- # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= + # Maximum number of lines to put in a shell here document. + ac_max_here_lines=12 ac_prev= for ac_option *************** *** 333,339 **** verbose=yes ;; -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.10" exit 0 ;; -with-* | --with-*) --- 366,372 ---- verbose=yes ;; -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) *************** *** 435,445 **** done # NLS nuisances. ! # Only set LANG and LC_ALL to C if already set. ! # These must not be set unconditionally because not all systems understand ! # e.g. LANG=C (notably SCO). ! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LANG+set}" = set; then LANG=C; export LANG; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h --- 468,481 ---- done # NLS nuisances. ! # Only set these to C if already set. These must not be set unconditionally ! # because not all systems understand e.g. LANG=C (notably SCO). ! # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi + if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi + if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi + if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h *************** *** 501,506 **** --- 537,543 ---- ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. *************** *** 534,543 **** ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. subdirs="glob" ! echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! set dummy ${MAKE-make}; ac_make=$2 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 571,814 ---- ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or + # incompatible versions: + # SysV /etc/install, /usr/sbin/install + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 + echo "configure:586: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + + fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi + fi + echo "$ac_t""$INSTALL" 1>&6 + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + + PACKAGE=make + + VERSION=3.76 + + if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } + fi + cat >> confdefs.h <> confdefs.h <&6 + echo "configure:655: checking whether build environment is sane" >&5 + # Just in case + sleep 1 + echo timestamp > conftestfile + # Do `set' in a subshell so we don't clobber the current shell's + # arguments. Must try -L first in case configure is actually a + # symlink; some systems play weird games with the mod time of symlinks + # (eg FreeBSD returns the mod time of the symlink's containing + # directory). + if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + test "$2" = conftestfile + ) + then + # Ok. + : + else + { echo "configure: error: newly created file is older than distributed files! + Check your system clock" 1>&2; exit 1; } + fi + rm -f conftest* + echo "$ac_t""yes" 1>&6 + if test "$program_transform_name" = s,x,x,; then + program_transform_name= + else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed + s,\\,\\\\,g; s,\$,$$,g + EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed + fi + test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" + # Use a double $ so make ignores it. + test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + + # sed with no file args requires a program. + test "$program_transform_name" = "" && program_transform_name="s,x,x," + + missing_dir=`cd $ac_aux_dir && pwd` + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 + echo "configure:702: checking for working aclocal" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. + if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 + else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 + fi + + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 + echo "configure:715: checking for working autoconf" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. + if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 + else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 + fi + + echo $ac_n "checking for working automake""... $ac_c" 1>&6 + echo "configure:728: checking for working automake" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. + if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 + else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 + fi + + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 + echo "configure:741: checking for working autoheader" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. + if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 + else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 + fi + + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 + echo "configure:754: checking for working makeinfo" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. + if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 + else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 + fi + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 + echo "configure:767: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftestmake <<\EOF + all: + @echo 'ac_maketemp="${MAKE}"' + EOF + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` + if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes + else + eval ac_cv_prog_make_${ac_make}_set=no + fi + rm -f conftestmake + fi + if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= + else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" + fi + + + + subdirs="glob" ! ! ! ! ! if test -r $srcdir/maintMakefile; then ! MAINT_MAKEFILE_TRUE= ! MAINT_MAKEFILE_FALSE='#' ! else ! MAINT_MAKEFILE_TRUE='#' ! MAINT_MAKEFILE_FALSE= ! fi ! ! echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:811: checking whether ${MAKE-make} sets \${MAKE}" >&5 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 565,570 **** --- 836,842 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:840: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 593,598 **** --- 865,871 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:869: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 639,645 **** --- 912,958 ---- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 + echo "configure:917: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' + ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no + fi + rm -fr conftest* + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 + echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 + echo "configure:956: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 648,654 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 961,967 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** *** 656,684 **** fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes ! if test "${CFLAGS+set}" != set; then ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ! ac_cv_prog_gcc_g=yes else ! ac_cv_prog_gcc_g=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 ! if test $ac_cv_prog_gcc_g = yes; then ! CFLAGS="-g -O" ! else ! CFLAGS="-O" ! fi fi else GCC= --- 969,1002 ---- fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + if test $ac_cv_prog_gcc = yes; then GCC=yes ! ac_test_CFLAGS="${CFLAGS+set}" ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS= ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:980: checking whether ${CC-cc} accepts -g" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ! ac_cv_prog_cc_g=yes else ! ac_cv_prog_cc_g=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ! if test "$ac_test_CFLAGS" = set; then ! CFLAGS="$ac_save_CFLAGS" ! elif test $ac_cv_prog_cc_g = yes; then ! CFLAGS="-g -O2" ! else ! CFLAGS="-O2" fi else GCC= *************** *** 696,706 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in --- 1014,1025 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 + echo "configure:1018: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in *************** *** 723,729 **** ;; esac done ! IFS="$ac_save_ifs" fi if test "${ac_cv_path_install+set}" = set; then --- 1042,1048 ---- ;; esac done ! IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then *************** *** 745,750 **** --- 1064,1070 ---- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 + echo "configure:1068: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** *** 759,791 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 rm -rf conftest* CPP=/lib/cpp fi --- 1079,1115 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi *************** *** 799,807 **** ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 ! echo $ac_n "checking for AIX""... $ac_c" 1>&6 cat > conftest.$ac_ext <&6 ! if test "$program_transform_name" = s,x,x,; then ! program_transform_name= ! else ! # Double any \ or $. echo might interpret backslashes. ! cat <<\EOF_SED > conftestsed ! s,\\,\\\\,g; s,\$,$$,g ! EOF_SED ! program_transform_name="`echo $program_transform_name|sed -f conftestsed`" ! rm -f conftestsed ! fi ! test "$program_prefix" != NONE && ! program_transform_name="s,^,${program_prefix},; $program_transform_name" ! # Use a double $ so make ignores it. ! test "$program_suffix" != NONE && ! program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" ! ! # sed with no file args requires a program. ! test "$program_transform_name" = "" && program_transform_name="s,x,x," ! ! echo $ac_n "checking for AIX""... $ac_c" 1>&6 ! echo "configure:1147: checking for AIX" >&5 cat > conftest.$ac_ext <&6 + echo "configure:1171: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then *************** *** 842,865 **** ISC= fi ! ac_safe=`echo "minix/config.h" | tr './\055' '___'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 1187,1213 ---- ISC= fi ! ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 + echo "configure:1193: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 888,925 **** fi - # If we cannot run a trivial program, we must be cross compiling. - echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } - if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_cross=no - else - ac_cv_c_cross=yes - fi - fi - rm -fr conftest* - fi - - echo "$ac_t""$ac_cv_c_cross" 1>&6 - cross_compiling=$ac_cv_c_cross - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 1236,1248 ---- fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 + echo "configure:1241: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 927,939 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 rm -rf conftest* ac_cv_header_stdc=no fi --- 1250,1264 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi *************** *** 942,948 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 1267,1273 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** *** 960,966 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 1285,1291 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** *** 980,987 **** if test "$cross_compiling" = yes; then : else ! cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 1305,1312 ---- if test "$cross_compiling" = yes; then : else ! cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** *** 992,1006 **** exit (0); } EOF ! { (eval echo configure:996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then : else ac_cv_header_stdc=no fi - fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 --- 1317,1335 ---- exit (0); } EOF ! if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then : else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi + + fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 *************** *** 1014,1047 **** ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ! ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> ! int main() { return 0; } ! int t() { DIR *dirp = 0; ; return 0; } EOF ! if { (eval echo configure:1033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 + echo "configure:1349: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> ! int main() { DIR *dirp = 0; ; return 0; } EOF ! if { (eval echo configure:1362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 ! ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 1382,1413 ---- done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then ! echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:1387: checking for opendir in -ldir" >&5 ! ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 1091,1120 **** fi else ! echo $ac_n "checking for -lx""... $ac_c" 1>&6 ! ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 1423,1454 ---- fi else ! echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:1428: checking for opendir in -lx" >&5 ! ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 1132,1142 **** fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF --- 1466,1477 ---- fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 + echo "configure:1470: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF *************** *** 1164,1182 **** fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "pid_t" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else --- 1499,1519 ---- fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 + echo "configure:1503: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include + #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else *************** *** 1195,1205 **** fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 1532,1543 ---- fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 + echo "configure:1536: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 1212,1231 **** void (*signal ()) (); #endif ! int main() { return 0; } ! int t() { int i; ; return 0; } EOF ! if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* - fi echo "$ac_t""$ac_cv_type_signal" 1>&6 --- 1550,1569 ---- void (*signal ()) (); #endif ! int main() { int i; ; return 0; } EOF ! if { (eval echo configure:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 *************** *** 1237,1260 **** for ac_hdr in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \ sys/timeb.h do ! ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 1575,1601 ---- for ac_hdr in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \ sys/timeb.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + echo "configure:1581: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 1262,1268 **** fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 + echo "configure:1619: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 + echo "configure:1622: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" *************** *** 1287,1302 **** # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' ! if { (eval echo configure:1291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ! test -f conftest.o && { (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. ! if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' ! if { (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ! test -f conftest.o && { (eval echo configure:1300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : --- 1630,1645 ---- # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' ! if { (eval echo configure:1634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ! test -f conftest.o && { (eval echo configure:1635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. ! if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' ! if { (eval echo configure:1642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ! test -f conftest.o && { (eval echo configure:1643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : *************** *** 1323,1337 **** fi echo $ac_n "checking for working const""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:1670: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_c_const" 1>&6 --- 1720,1735 ---- ; return 0; } EOF ! if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 *************** *** 1396,1406 **** fi echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 1740,1751 ---- fi echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 + echo "configure:1744: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 1454,1469 **** ! for ac_func in psignal mktemp \ dup2 getcwd sigsetmask getgroups setlinebuf \ seteuid setegid setreuid setregid strerror strsignal do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:1808: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` --- 1832,1849 ---- ; return 0; } EOF ! if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` *************** *** 1510,1536 **** done echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* ! ac_cv_check_symbol_sys_siglist=yes else rm -rf conftest* ac_cv_check_symbol_sys_siglist=no fi rm -f conftest* - fi if test "$ac_cv_check_symbol_sys_siglist" = yes; then --- 1857,1884 ---- done echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6 + echo "configure:1861: checking for sys_siglist" >&5 if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ! ac_cv_check_symbol_sys_siglist=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_check_symbol_sys_siglist=no fi rm -f conftest* fi if test "$ac_cv_check_symbol_sys_siglist" = yes; then *************** *** 1544,1570 **** # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < ! int main() { return 0; } ! int t() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* ac_cv_header_alloca_h=yes else rm -rf conftest* ac_cv_header_alloca_h=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 --- 1892,1919 ---- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 + echo "configure:1896: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < ! int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_alloca_h=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 *************** *** 1576,1586 **** fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1929: checking for alloca" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* ! ac_cv_func_alloca=yes else rm -rf conftest* ! ac_cv_func_alloca=no fi rm -f conftest* - fi ! echo "$ac_t""$ac_cv_func_alloca" 1>&6 ! if test $ac_cv_func_alloca = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA 1 EOF fi ! if test $ac_cv_func_alloca = no; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, --- 1949,1979 ---- # endif #endif ! int main() { char *p = (char *) alloca(1); ; return 0; } EOF ! if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ! ac_cv_func_alloca_works=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ! ac_cv_func_alloca_works=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 ! if test $ac_cv_func_alloca_works = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA 1 EOF fi ! if test $ac_cv_func_alloca_works = no; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, *************** *** 1635,1645 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:1989: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:2019: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <&6 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else ! cat > conftest.$ac_ext <&6 + echo "configure:2074: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi - fi rm -fr conftest* fi echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 cat >> confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then ac_cv_c_stack_direction=1 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_c_stack_direction=-1 fi rm -fr conftest* fi + fi + echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 cat >> confdefs.h <&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 2118,2144 ---- fi ! ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 + echo "configure:2124: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 1794,1809 **** fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 ! if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2159: checking for working vfork" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 + echo "configure:2165: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else rm -rf conftest* eval "ac_cv_func_vfork=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then echo "$ac_t""yes" 1>&6 : --- 2189,2206 ---- ; return 0; } EOF ! if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_vfork=no" fi rm -f conftest* fi + if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then echo "$ac_t""yes" 1>&6 : *************** *** 1845,1852 **** fi else ! cat > conftest.$ac_ext < --- 2209,2216 ---- fi else ! cat > conftest.$ac_ext < *************** *** 1874,1881 **** static pid_t child; if (!child) { child = vfork (); ! if (child < 0) perror ("vfork"); if (!child) { arg = getpid(); write(-1, "", 0); --- 2238,2247 ---- static pid_t child; if (!child) { child = vfork (); ! if (child < 0) { perror ("vfork"); + _exit(2); + } if (!child) { arg = getpid(); write(-1, "", 0); *************** *** 1939,1956 **** } } EOF ! { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then ! ac_cv_func_vfork=yes else ! ac_cv_func_vfork=no ! fi fi rm -fr conftest* fi ! echo "$ac_t""$ac_cv_func_vfork" 1>&6 ! if test $ac_cv_func_vfork = no; then cat >> confdefs.h <<\EOF #define vfork fork EOF --- 2305,2326 ---- } } EOF ! if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then ! ac_cv_func_vfork_works=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_func_vfork_works=no fi rm -fr conftest* fi ! fi ! ! echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 ! if test $ac_cv_func_vfork_works = no; then cat >> confdefs.h <<\EOF #define vfork fork EOF *************** *** 1958,1971 **** fi echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else ! cat > conftest.$ac_ext < /* If setvbuf has the reversed format, exit 0. */ --- 2328,2342 ---- fi echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 + echo "configure:2332: checking whether setvbuf arguments are reversed" >&5 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else ! cat > conftest.$ac_ext < /* If setvbuf has the reversed format, exit 0. */ *************** *** 1979,1992 **** exit(0); /* Non-reversed systems segv here. */ } EOF ! { (eval echo configure:1983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_setvbuf_reversed=yes else ac_cv_func_setvbuf_reversed=no fi - fi rm -fr conftest* rm -f core core.* *.core fi --- 2350,2367 ---- exit(0); /* Non-reversed systems segv here. */ } EOF ! if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then ac_cv_func_setvbuf_reversed=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_func_setvbuf_reversed=no fi rm -fr conftest* + fi + rm -f core core.* *.core fi *************** *** 2003,2032 **** # Some systems with -lutil have (and need) -lkvm as well, some do not. # On Solaris, -lkvm requires nlist from -lelf, so check that first # to get the right answer into the cache. ! echo $ac_n "checking for -lelf""... $ac_c" 1>&6 ! ac_lib_var=`echo elf'_'elf_begin | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lelf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 2378,2409 ---- # Some systems with -lutil have (and need) -lkvm as well, some do not. # On Solaris, -lkvm requires nlist from -lelf, so check that first # to get the right answer into the cache. ! echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6 ! echo "configure:2383: checking for elf_begin in -lelf" >&5 ! ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lelf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 2041,2070 **** echo "$ac_t""no" 1>&6 fi ! echo $ac_n "checking for -lkvm""... $ac_c" 1>&6 ! ac_lib_var=`echo kvm'_'kvm_open | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lkvm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 2418,2449 ---- echo "$ac_t""no" 1>&6 fi ! echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6 ! echo "configure:2423: checking for kvm_open in -lkvm" >&5 ! ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lkvm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 2080,2109 **** fi # Check for the 4.4BSD definition of getloadavg. ! echo $ac_n "checking for -lutil""... $ac_c" 1>&6 ! ac_lib_var=`echo util'_'getloadavg | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 2459,2490 ---- fi # Check for the 4.4BSD definition of getloadavg. ! echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6 ! echo "configure:2464: checking for getloadavg in -lutil" >&5 ! ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 2122,2152 **** if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX. # Since it is not a standard part of AIX, it might be installed locally. ! ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" ! echo $ac_n "checking for -lgetloadavg""... $ac_c" 1>&6 ! ac_lib_var=`echo getloadavg'_'getloadavg | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lgetloadavg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 2503,2535 ---- if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX. # Since it is not a standard part of AIX, it might be installed locally. ! ac_getloadavg_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" ! echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6 ! echo "configure:2509: checking for getloadavg in -lgetloadavg" >&5 ! ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lgetloadavg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 2159,2165 **** LIBS="-lgetloadavg $LIBS" else echo "$ac_t""no" 1>&6 ! LIBS="$ac_save_LIBS" fi fi --- 2542,2548 ---- LIBS="-lgetloadavg $LIBS" else echo "$ac_t""no" 1>&6 ! LIBS="$ac_getloadavg_LIBS" fi fi *************** *** 2168,2178 **** for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:2555: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ! : else echo "$ac_t""no" 1>&6 LIBOBJS="$LIBOBJS ${ac_func}.o" fi - done if test $ac_cv_func_getloadavg = yes; then cat >> confdefs.h <<\EOF #define HAVE_GETLOADAVG 1 --- 2579,2611 ---- ; return 0; } EOF ! if { (eval echo configure:2583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >> confdefs.h <&6 LIBOBJS="$LIBOBJS ${ac_func}.o" fi done + if test $ac_cv_func_getloadavg = yes; then cat >> confdefs.h <<\EOF #define HAVE_GETLOADAVG 1 *************** *** 2226,2249 **** else # Figure out what our getloadavg.c needs. ac_have_func=no ! ac_safe=`echo "sys/dg_sys_info.h" | tr './\055' '___'` echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 2615,2641 ---- else # Figure out what our getloadavg.c needs. ac_have_func=no ! ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6 + echo "configure:2621: checking for sys/dg_sys_info.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 2255,2284 **** #define DGUX 1 EOF ! echo $ac_n "checking for -ldgc""... $ac_c" 1>&6 ! ac_lib_var=`echo dgc'_'dg_sys_info | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldgc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 2647,2678 ---- #define DGUX 1 EOF ! echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6 ! echo "configure:2652: checking for dg_sys_info in -ldgc" >&5 ! ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldgc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 2288,2294 **** fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_lib=HAVE_LIB`echo dgc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 ! ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ! -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 2710,2736 ---- fi if test $ac_have_func = no; then ! ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6 + echo "configure:2716: checking for inq_stats/cpustats.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 2355,2378 **** fi if test $ac_have_func = no; then ! ac_safe=`echo "sys/cpustats.h" | tr './\055' '___'` echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 2753,2779 ---- fi if test $ac_have_func = no; then ! ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6 + echo "configure:2759: checking for sys/cpustats.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 2393,2416 **** if test $ac_have_func = no; then for ac_hdr in mach/mach.h do ! ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 2794,2820 ---- if test $ac_have_func = no; then for ac_hdr in mach/mach.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + echo "configure:2800: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 2418,2424 **** fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 2834,2860 ---- fi ! ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 + echo "configure:2840: checking for nlist.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 2460,2486 **** EOF echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < ! int main() { return 0; } ! int t() { struct nlist n; n.n_un.n_name = 0; ; return 0; } EOF ! if { (eval echo configure:2476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_nlist_n_un=yes else rm -rf conftest* ac_cv_struct_nlist_n_un=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6 --- 2867,2894 ---- EOF echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6 + echo "configure:2871: checking for n_un in struct nlist" >&5 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < ! int main() { struct nlist n; n.n_un.n_name = 0; ; return 0; } EOF ! if { (eval echo configure:2883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_nlist_n_un=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_nlist_n_un=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6 *************** *** 2498,2508 **** # Some definitions of getloadavg require that the program be installed setgid. echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:2910: checking whether getloadavg requires setgid" >&5 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:2946: checking group of /dev/kmem" >&5 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2551,2565 **** KMEM_GROUP=$ac_cv_group_kmem fi ! echo $ac_n "checking for strcoll""... $ac_c" 1>&6 ! if eval "test \"`echo '$''{'ac_cv_func_strcoll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! ac_cv_func_strcoll=no else ! cat > conftest.$ac_ext < main () --- 2961,3023 ---- KMEM_GROUP=$ac_cv_group_kmem fi ! echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 ! echo "configure:2966: checking for kstat_open in -lkstat" >&5 ! ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-lkstat $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ! -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ! cat >> confdefs.h <&6 ! fi ! ! echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 ! echo "configure:3013: checking for working strcoll" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! ac_cv_func_strcoll_works=no else ! cat > conftest.$ac_ext < main () *************** *** 2569,2586 **** strcoll ("123", "456") >= 0); } EOF ! { (eval echo configure:2573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then ! ac_cv_func_strcoll=yes else ! ac_cv_func_strcoll=no ! fi fi rm -fr conftest* fi ! echo "$ac_t""$ac_cv_func_strcoll" 1>&6 ! if test $ac_cv_func_strcoll = yes; then cat >> confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF --- 3027,3048 ---- strcoll ("123", "456") >= 0); } EOF ! if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then ! ac_cv_func_strcoll_works=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_func_strcoll_works=no fi rm -fr conftest* fi ! fi ! ! echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6 ! if test $ac_cv_func_strcoll_works = yes; then cat >> confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF *************** *** 2591,2614 **** # Check out the wait reality. for ac_hdr in sys/wait.h do ! ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 3053,3079 ---- # Check out the wait reality. for ac_hdr in sys/wait.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + echo "configure:3059: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 2616,2622 **** fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:3097: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` --- 3121,3138 ---- ; return 0; } EOF ! if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` *************** *** 2679,2694 **** done echo $ac_n "checking for union wait""... $ac_c" 1>&6 if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include ! int main() { return 0; } ! int t() { union wait status; int pid; pid = wait (&status); #ifdef WEXITSTATUS /* Some POSIXoid systems have both the new-style macros and the old --- 3146,3161 ---- done echo $ac_n "checking for union wait""... $ac_c" 1>&6 + echo "configure:3150: checking for union wait" >&5 if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include ! int main() { union wait status; int pid; pid = wait (&status); #ifdef WEXITSTATUS /* Some POSIXoid systems have both the new-style macros and the old *************** *** 2707,2721 **** ; return 0; } EOF ! if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* make_cv_union_wait=yes else rm -rf conftest* make_cv_union_wait=no fi rm -f conftest* - fi if test "$make_cv_union_wait" = yes; then --- 3174,3189 ---- ; return 0; } EOF ! if { (eval echo configure:3178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* make_cv_union_wait=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* make_cv_union_wait=no fi rm -f conftest* fi if test "$make_cv_union_wait" = yes; then *************** *** 2727,2737 **** echo "$ac_t""$make_cv_union_wait" 1>&6 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 3195,3206 ---- echo "$ac_t""$make_cv_union_wait" 1>&6 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 + echo "configure:3199: checking for sys_siglist declaration in signal.h or unistd.h" >&5 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 2739,2758 **** #ifdef HAVE_UNISTD_H #include #endif ! int main() { return 0; } ! int t() { char *msg = *(sys_siglist + 1); ; return 0; } EOF ! if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else rm -rf conftest* ac_cv_decl_sys_siglist=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6 --- 3208,3227 ---- #ifdef HAVE_UNISTD_H #include #endif ! int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF ! if { (eval echo configure:3216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_decl_sys_siglist=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6 *************** *** 2766,2795 **** # The presence of the following is not meant to imply # that make necessarily works on those systems. ! echo $ac_n "checking for -lsun""... $ac_c" 1>&6 ! ac_lib_var=`echo sun'_'getpwnam | tr './+\055' '__p_'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 3235,3266 ---- # The presence of the following is not meant to imply # that make necessarily works on those systems. ! echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6 ! echo "configure:3240: checking for getpwnam in -lsun" >&5 ! ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 2799,2805 **** fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_lib=HAVE_LIB`echo sun | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 ! ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ! -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&1 | ! sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ ! >> confcache if cmp -s $cache_file confcache; then : else --- 3337,3361 ---- # --recheck option to rerun configure. # EOF + # The following way of writing the cache mishandles newlines in values, + # but we know of no workaround that is simple, portable, and efficient. + # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | ! case `(ac_space=' '; set) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ! ;; ! esac >> confcache if cmp -s $cache_file confcache; then : else *************** *** 2924,2930 **** echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.10" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; --- 3410,3416 ---- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *************** *** 2965,2975 **** s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g - s%@subdirs@%$subdirs%g - s%@SET_MAKE@%$SET_MAKE%g - s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g s%@ALLOCA@%$ALLOCA%g --- 3451,3471 ---- s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g + s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g + s%@PACKAGE@%$PACKAGE%g + s%@VERSION@%$VERSION%g + s%@ACLOCAL@%$ACLOCAL%g + s%@AUTOCONF@%$AUTOCONF%g + s%@AUTOMAKE@%$AUTOMAKE%g + s%@AUTOHEADER@%$AUTOHEADER%g + s%@MAKEINFO@%$MAKEINFO%g + s%@SET_MAKE@%$SET_MAKE%g + s%@subdirs@%$subdirs%g + s%@MAINT_MAKEFILE_TRUE@%$MAINT_MAKEFILE_TRUE%g + s%@MAINT_MAKEFILE_FALSE@%$MAINT_MAKEFILE_FALSE%g + s%@CC@%$CC%g s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g s%@ALLOCA@%$ALLOCA%g *************** *** 2979,2998 **** CEOF EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile]", defaulting infile="outfile.in". case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac ! # Adjust relative srcdir, etc. for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` --- 3475,3530 ---- CEOF EOF + + cat >> $CONFIG_STATUS <<\EOF + + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. + ac_file=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_cmds # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds="" + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi + EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac ! # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` *************** *** 3020,3025 **** --- 3552,3558 ---- [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac + echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." *************** *** 3028,3041 **** # $configure_input" ;; *) ac_comsub= ;; esac sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g ! " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file fi; done ! rm -f conftest.subs # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. --- 3561,3576 ---- # $configure_input" ;; *) ac_comsub= ;; esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g ! " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done ! rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. *************** *** 3056,3066 **** ac_eC=' ' ac_eD='%g' ! CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile]", defaulting infile="outfile.in". case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac --- 3591,3607 ---- ac_eC=' ' ac_eD='%g' ! if test "${CONFIG_HEADERS+set}" != set; then ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac *************** *** 3068,3074 **** echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ! cp $ac_given_srcdir/$ac_file_in conftest.in EOF --- 3609,3616 ---- echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! cat $ac_file_inputs > conftest.in EOF *************** *** 3096,3103 **** # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. - # Maximum number of lines to put in a single here document. - ac_max_here_lines=12 rm -f conftest.tail while : --- 3638,3643 ---- *************** *** 3139,3146 **** --- 3679,3692 ---- fi fi; done + EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h + # Makefile uses this timestamp file to know when to remake Makefile, # build.sh, and glob/Makefile. touch stamp-config *************** *** 3198,3210 **** ac_popdir=`pwd` cd $ac_config_dir case "$srcdir" in .) # No --srcdir option. We are building in place. ac_sub_srcdir=$srcdir ;; /*) # Absolute path. ac_sub_srcdir=$srcdir/$ac_config_dir ;; *) # Relative path. ! ac_sub_srcdir=../$srcdir/$ac_config_dir ;; esac # Check for guested configure; otherwise get Cygnus style configure. --- 3744,3759 ---- ac_popdir=`pwd` cd $ac_config_dir + # A "../" for each directory in /$ac_config_dir. + ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` + case "$srcdir" in .) # No --srcdir option. We are building in place. ac_sub_srcdir=$srcdir ;; /*) # Absolute path. ac_sub_srcdir=$srcdir/$ac_config_dir ;; *) # Relative path. ! ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; esac # Check for guested configure; otherwise get Cygnus style configure. *************** *** 3221,3228 **** if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` case "$cache_file" in /*) ac_sub_cache_file=$cache_file ;; *) # Relative path. --- 3770,3775 ---- diff -crP ../make-3.75/configure.bat ./configure.bat *** ../make-3.75/configure.bat Fri Mar 17 15:56:53 1995 --- ./configure.bat Wed Aug 27 16:31:07 1997 *************** *** 1,44 **** @echo off ! echo Configuring MAKE for go32 ! rem This batch file assumes a unix-type "sed" program ! update configh.dos config.h ! echo # Makefile generated by "configure.bat"> Makefile ! if exist config.sed del config.sed ! ! echo ": try_sl ">> config.sed ! echo "/\\$/ { ">> config.sed ! echo " N ">> config.sed ! echo " s/[ ]*\\\n[ ]*/ / ">> config.sed ! echo " b try_sl ">> config.sed ! echo "} ">> config.sed ! ! echo "s/@srcdir@/./ ">> config.sed ! echo "s/@CC@/gcc/ ">> config.sed ! echo "s/@CFLAGS@/-O2 -g/ ">> config.sed ! echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H/ ">> config.sed ! echo "s/@LDFLAGS@// ">> config.sed ! echo "s/@RANLIB@/ranlib/ ">> config.sed ! echo "s/@DEFS@// ">> config.sed ! echo "s/@REMOTE@/stub/ ">> config.sed ! echo "s/@ALLOCA@// ">> config.sed ! echo "s/@LIBS@// ">> config.sed ! echo "s/@LIBOBJS@// ">> config.sed ! echo "s/@SET_MAKE@// ">> config.sed ! echo "s/^Makefile *:/_Makefile:/ ">> config.sed ! echo "s/^config.h *:/_config.h:/ ">> config.sed ! echo "s/^defines *=.*$/defines =/ ">> config.sed ! echo "/mv -f make.new make/d ">> config.sed ! ! echo "s/cd glob; $(MAKE)/$(MAKE) -C glob/ ">> config.sed ! ! sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed ! sed -f config2.sed Makefile.in >> Makefile ! del config.sed ! del config2.sed ! ! cd glob ! call configure ! cd .. --- 1,44 ---- @echo off ! echo Configuring MAKE for DJGPP ! rem The SmallEnv trick protects against too small environment block, ! rem in which case the values will be truncated and the whole thing ! rem goes awry. COMMAND.COM will say "Out of environment space", but ! rem many people don't care, so we force them to care by refusing to go. ! ! rem Where is the srcdir? ! set XSRC=. ! if not "%XSRC%"=="." goto SmallEnv ! if "%1%"=="" goto SrcDone ! set XSRC=%1 ! if not "%XSRC%"=="%1" goto SmallEnv ! ! :SrcDone ! ! update %XSRC%/configh.dos ./config.h ! ! rem Do they have Make? ! redir -o junk.$$$ -eo make -n -f NUL ! rem REDIR will return 1 if it cannot run Make. ! rem If it can run Make, it will usually return 2, ! rem but 0 is also OK with us. ! if errorlevel 2 goto MakeOk ! if not errorlevel 1 goto MakeOk ! if exist junk.$$$ del junk.$$$ ! echo No Make program found--use DOSBUILD.BAT to build Make. ! goto End ! ! rem They do have Make. Generate the Makefile. ! ! :MakeOk ! del junk.$$$ ! update %XSRC%/Makefile.DOS ./Makefile ! echo Done. ! if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%" ! goto End ! :SmallEnv ! echo Your environment is too small. Please enlarge it and run me again. ! :End ! set XRSC= diff -crP ../make-3.75/configure.in ./configure.in *** ../make-3.75/configure.in Sat Jul 20 05:30:04 1996 --- ./configure.in Tue Sep 16 10:17:28 1997 *************** *** 1,14 **** dnl Process this file with autoconf to produce a configure script. ! AC_REVISION([$Id: configure.in,v 1.52 1996/07/20 09:30:04 roland Exp $]) ! AC_PREREQ(2.10)dnl dnl Minimum Autoconf version required. AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir. ! AC_CONFIG_HEADER(config.h) ! AC_CONFIG_SUBDIRS(glob) dnl Run configure in glob subdirectory. AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_INSTALL AC_PROG_CPP dnl Later checks need this. AC_AIX AC_ISC_POSIX AC_MINIX --- 1,21 ---- dnl Process this file with autoconf to produce a configure script. ! AC_REVISION([$Id: configure.in,v 1.58 1997/09/16 14:17:28 psmith Exp $]) ! AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required. AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir. ! ! AM_INIT_AUTOMAKE(make, 3.76) ! AM_CONFIG_HEADER(config.h) ! AC_CONFIG_SUBDIRS(glob) ! ! AM_CONDITIONAL(MAINT_MAKEFILE, test -r $srcdir/maintMakefile) ! ! dnl Regular configure stuff AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_INSTALL AC_PROG_CPP dnl Later checks need this. + AC_ARG_PROGRAM AC_AIX AC_ISC_POSIX AC_MINIX *************** *** 38,44 **** fi AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl ! AC_CHECK_FUNCS(psignal mktemp \ dup2 getcwd sigsetmask getgroups setlinebuf \ seteuid setegid setreuid setregid strerror strsignal) AC_CHECK_SYMBOL(sys_siglist) --- 45,51 ---- fi AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl ! AC_CHECK_FUNCS(memmove psignal mktemp pstat_getdynamic \ dup2 getcwd sigsetmask getgroups setlinebuf \ seteuid setegid setreuid setregid strerror strsignal) AC_CHECK_SYMBOL(sys_siglist) *************** *** 46,51 **** --- 53,59 ---- AC_FUNC_VFORK AC_FUNC_SETVBUF_REVERSED AC_FUNC_GETLOADAVG + AC_CHECK_LIB(kstat, kstat_open) AC_FUNC_STRCOLL # Check out the wait reality. diff -crP ../make-3.75/dir.c ./dir.c *** ../make-3.75/dir.c Thu Jul 25 20:04:12 1996 --- ./dir.c Wed Aug 27 16:31:09 1997 *************** *** 1,5 **** /* Directory hashing for GNU Make. ! Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Directory hashing for GNU Make. ! Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 44,50 **** #define NAMLEN(d) _D_NAMLEN(d) #endif ! #if (defined (POSIX) || defined (WIN32)) && !defined (__GNU_LIBRARY__) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ #define REAL_DIR_ENTRY(dp) 1 --- 44,50 ---- #define NAMLEN(d) _D_NAMLEN(d) #endif ! #if (defined (POSIX) || defined (WINDOWS32)) && !defined (__GNU_LIBRARY__) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ #define REAL_DIR_ENTRY(dp) 1 *************** *** 56,64 **** #ifdef __MSDOS__ #include ! #if (DJGPP > 1) ! #include ! int __opendir_flags = 0; #endif static char * --- 56,66 ---- #ifdef __MSDOS__ #include ! #include ! ! /* If it's MSDOS that doesn't have _USE_LFN, disable LFN support. */ ! #ifndef _USE_LFN ! #define _USE_LFN 0 #endif static char * *************** *** 69,82 **** char *df; int i; ! #if (DJGPP > 1) ! if (_USE_LFN) ! /* Using long file names; do no transformation. */ return filename; - #endif - if (filename == 0) - return 0; if (strpbrk (filename, "\"*+,;<=>?[\\]|") != 0) return filename; --- 71,81 ---- char *df; int i; ! if (filename == 0 || _USE_LFN) return filename; + /* FIXME: what about filenames which violate + 8+3 constraints, like "config.h.in", or ".emacs"? */ if (strpbrk (filename, "\"*+,;<=>?[\\]|") != 0) return filename; *************** *** 106,112 **** } #endif /* __MSDOS__ */ ! #ifdef WIN32 #include "pathstuff.h" #endif --- 105,111 ---- } #endif /* __MSDOS__ */ ! #ifdef WINDOWS32 #include "pathstuff.h" #endif *************** *** 180,192 **** { *s++ = 0; st->st_dev = (char *)vms_hash (name); } else { st->st_dev = 0; s = name; } ! h = vms_hash (s); st->st_ino[0] = h & 0xff; st->st_ino[1] = h & 0xff00; st->st_ino[2] = h >> 16; --- 179,194 ---- { *s++ = 0; st->st_dev = (char *)vms_hash (name); + h = vms_hash (s); + *(s-1) = ':'; } else { st->st_dev = 0; s = name; + h = vms_hash (s); } ! st->st_ino[0] = h & 0xff; st->st_ino[1] = h & 0xff00; st->st_ino[2] = h >> 16; *************** *** 206,214 **** struct directory_contents *next; dev_t dev; /* Device and inode numbers of this dir. */ ! #ifdef WIN32 /* ! * Inode means nothing on WIN32. Even file key information is * unreliable because it is random per file open and undefined * for remote filesystems. The most unique attribute I can * come up with is the fully qualified name of the directory. Beware --- 208,216 ---- struct directory_contents *next; dev_t dev; /* Device and inode numbers of this dir. */ ! #ifdef WINDOWS32 /* ! * Inode means nothing on WINDOWS32. Even file key information is * unreliable because it is random per file open and undefined * for remote filesystems. The most unique attribute I can * come up with is the fully qualified name of the directory. Beware *************** *** 217,229 **** */ char *path_key; int mtime; /* controls check for stale directory cache */ #else #ifdef VMS ino_t ino[3]; #else ino_t ino; #endif ! #endif /* WIN32 */ struct dirfile **files; /* Files in this directory. */ DIR *dirstream; /* Stream reading this directory. */ }; --- 219,235 ---- */ char *path_key; int mtime; /* controls check for stale directory cache */ + int fs_flags; /* FS_FAT, FS_NTFS, ... */ + #define FS_FAT 0x1 + #define FS_NTFS 0x2 + #define FS_UNKNOWN 0x4 #else #ifdef VMS ino_t ino[3]; #else ino_t ino; #endif ! #endif /* WINDOWS32 */ struct dirfile **files; /* Files in this directory. */ DIR *dirstream; /* Stream reading this directory. */ }; *************** *** 279,286 **** register unsigned int hash = 0; register char *p; register struct directory *dir; ! #ifdef WIN32 char* w32_path; #endif #ifdef VMS if ((*name == '.') && (*(name+1) == 0)) --- 285,297 ---- register unsigned int hash = 0; register char *p; register struct directory *dir; ! #ifdef WINDOWS32 char* w32_path; + char fs_label[BUFSIZ]; + char fs_type[BUFSIZ]; + long fs_serno; + long fs_flags; + long fs_len; #endif #ifdef VMS if ((*name == '.') && (*(name+1) == 0)) *************** *** 327,333 **** struct directory_contents *dc; ! #ifdef WIN32 w32_path = w32ify(name, 1); hash = ((unsigned int) st.st_dev << 16) | (unsigned int) st.st_ctime; #else --- 338,344 ---- struct directory_contents *dc; ! #ifdef WINDOWS32 w32_path = w32ify(name, 1); hash = ((unsigned int) st.st_dev << 16) | (unsigned int) st.st_ctime; #else *************** *** 343,349 **** hash %= DIRECTORY_BUCKETS; for (dc = directories_contents[hash]; dc != 0; dc = dc->next) ! #ifdef WIN32 if (!strcmp(dc->path_key, w32_path)) #else if (dc->dev == st.st_dev --- 354,360 ---- hash %= DIRECTORY_BUCKETS; for (dc = directories_contents[hash]; dc != 0; dc = dc->next) ! #ifdef WINDOWS32 if (!strcmp(dc->path_key, w32_path)) #else if (dc->dev == st.st_dev *************** *** 354,360 **** #else && dc->ino == st.st_ino) #endif ! #endif /* WIN32 */ break; if (dc == 0) --- 365,371 ---- #else && dc->ino == st.st_ino) #endif ! #endif /* WINDOWS32 */ break; if (dc == 0) *************** *** 366,374 **** /* Enter it in the contents hash table. */ dc->dev = st.st_dev; ! #ifdef WIN32 dc->path_key = strdup(w32_path); dc->mtime = st.st_mtime; #else #ifdef VMS dc->ino[0] = st.st_ino[0]; --- 377,403 ---- /* Enter it in the contents hash table. */ dc->dev = st.st_dev; ! #ifdef WINDOWS32 dc->path_key = strdup(w32_path); dc->mtime = st.st_mtime; + + /* + * NTFS is the only WINDOWS32 filesystem that bumps mtime + * on a directory when files are added/deleted from + * a directory. + */ + w32_path[3] = '\0'; + if (GetVolumeInformation(w32_path, + fs_label, sizeof (fs_label), + &fs_serno, &fs_len, + &fs_flags, fs_type, sizeof (fs_type)) == FALSE) + dc->fs_flags = FS_UNKNOWN; + else if (!strcmp(fs_type, "FAT")) + dc->fs_flags = FS_FAT; + else if (!strcmp(fs_type, "NTFS")) + dc->fs_flags = FS_NTFS; + else + dc->fs_flags = FS_UNKNOWN; #else #ifdef VMS dc->ino[0] = st.st_ino[0]; *************** *** 377,393 **** #else dc->ino = st.st_ino; #endif ! #endif /* WIN32 */ dc->next = directories_contents[hash]; directories_contents[hash] = dc; - #if defined (__MSDOS__) && (DJGPP > 1) - if (_USE_LFN) - /* We are using long filenames, so tell opendir not - to mess with them. */ - __opendir_flags = __OPENDIR_PRESERVE_CASE; - #endif - dc->dirstream = opendir (name); if (dc->dirstream == 0) { --- 406,415 ---- #else dc->ino = st.st_ino; #endif ! #endif /* WINDOWS32 */ dc->next = directories_contents[hash]; directories_contents[hash] = dc; dc->dirstream = opendir (name); if (dc->dirstream == 0) { *************** *** 432,438 **** register char *p; register struct dirfile *df; register struct dirent *d; ! #ifdef WIN32 struct stat st; int rehash = 0; #endif --- 454,460 ---- register char *p; register struct dirfile *df; register struct dirent *d; ! #ifdef WINDOWS32 struct stat st; int rehash = 0; #endif *************** *** 483,493 **** if (dir->dirstream == 0) { ! #ifdef WIN32 ! /* Check to see if directory has changed since last read */ if (dir->path_key && ! stat(dir->path_key, &st) == 0 && ! st.st_mtime > dir->mtime) { /* reset date stamp to show most recent re-process */ dir->mtime = st.st_mtime; --- 505,520 ---- if (dir->dirstream == 0) { ! #ifdef WINDOWS32 ! /* ! * Check to see if directory has changed since last read. FAT ! * filesystems force a rehash always as mtime does not change ! * on directories (ugh!). ! */ if (dir->path_key && ! (dir->fs_flags & FS_FAT || ! (stat(dir->path_key, &st) == 0 && ! st.st_mtime > dir->mtime))) { /* reset date stamp to show most recent re-process */ dir->mtime = st.st_mtime; *************** *** 519,525 **** for (i = 0; i < len; ++i) HASHI (newhash, d->d_name[i]); newhash %= DIRFILE_BUCKETS; ! #ifdef WIN32 /* * If re-reading a directory, check that this file isn't already * in the cache. --- 546,552 ---- for (i = 0; i < len; ++i) HASHI (newhash, d->d_name[i]); newhash %= DIRFILE_BUCKETS; ! #ifdef WINDOWS32 /* * If re-reading a directory, check that this file isn't already * in the cache. *************** *** 543,549 **** dir->files[newhash] = df; df->name = savestring (d->d_name, len); df->impossible = 0; ! #ifdef WIN32 } #endif /* Check if the name matches the one we're searching for. */ --- 570,576 ---- dir->files[newhash] = df; df->name = savestring (d->d_name, len); df->impossible = 0; ! #ifdef WINDOWS32 } #endif /* Check if the name matches the one we're searching for. */ *************** *** 599,610 **** return dir_file_exists_p ("[]", name); #else /* !VMS */ dirend = rindex (name, '/'); ! #ifdef WIN32 ! if (!dirend) ! dirend = rindex(name, '\\'); ! #endif /* WIN32 */ ! if (dirend == 0) ! return dir_file_exists_p (".", name); if (dirend == 0) #ifndef _AMIGA return dir_file_exists_p (".", name); --- 626,641 ---- return dir_file_exists_p ("[]", name); #else /* !VMS */ dirend = rindex (name, '/'); ! #if defined (WINDOWS32) || defined (__MSDOS__) ! /* Forward and backslashes might be mixed. We need the rightmost one. */ ! { ! char *bslash = rindex(name, '\\'); ! if (!dirend || bslash > dirend) ! dirend = bslash; ! /* The case of "d:file" is unhandled. But I don't think ! such names can happen here. */ ! } ! #endif /* WINDOWS32 || __MSDOS__ */ if (dirend == 0) #ifndef _AMIGA return dir_file_exists_p (".", name); *************** *** 613,621 **** #endif /* AMIGA */ #endif /* VMS */ ! dirname = (char *) alloca (dirend - name + 1); ! bcopy (name, dirname, dirend - name); ! dirname[dirend - name] = '\0'; return dir_file_exists_p (dirname, dirend + 1); } --- 644,657 ---- #endif /* AMIGA */ #endif /* VMS */ ! if (dirend == name) ! dirname = "/"; ! else ! { ! dirname = (char *) alloca (dirend - name + 1); ! bcopy (name, dirname, dirend - name); ! dirname[dirend - name] = '\0'; ! } return dir_file_exists_p (dirname, dirend + 1); } *************** *** 640,645 **** --- 676,691 ---- dir = find_directory ("[]"); #else dirend = rindex (p, '/'); + #if defined (WINDOWS32) || defined (__MSDOS__) + /* Forward and backslashes might be mixed. We need the rightmost one. */ + { + char *bslash = rindex(p, '\\'); + if (!dirend || bslash > dirend) + dirend = bslash; + /* The case of "d:file" is unhandled. But I don't think + such names can happen here. */ + } + #endif /* WINDOWS32 or __MSDOS__ */ if (dirend == 0) #ifdef _AMIGA dir = find_directory (""); *************** *** 649,657 **** #endif /* VMS */ else { ! char *dirname = (char *) alloca (dirend - p + 1); ! bcopy (p, dirname, dirend - p); ! dirname[dirend - p] = '\0'; dir = find_directory (dirname); filename = p = dirend + 1; } --- 695,709 ---- #endif /* VMS */ else { ! char *dirname; ! if (dirend == p) ! dirname = "/"; ! else ! { ! dirname = (char *) alloca (dirend - p + 1); ! bcopy (p, dirname, dirend - p); ! dirname[dirend - p] = '\0'; ! } dir = find_directory (dirname); filename = p = dirend + 1; } *************** *** 666,675 **** structure for it, but leave it out of the contents hash table. */ dir->contents = (struct directory_contents *) xmalloc (sizeof (struct directory_contents)); ! #ifdef WIN32 dir->contents->path_key = NULL; dir->contents->mtime = 0; ! #else /* WIN32 */ #ifdef VMS dir->contents->dev = 0; dir->contents->ino[0] = dir->contents->ino[1] = --- 718,727 ---- structure for it, but leave it out of the contents hash table. */ dir->contents = (struct directory_contents *) xmalloc (sizeof (struct directory_contents)); ! #ifdef WINDOWS32 dir->contents->path_key = NULL; dir->contents->mtime = 0; ! #else /* WINDOWS32 */ #ifdef VMS dir->contents->dev = 0; dir->contents->ino[0] = dir->contents->ino[1] = *************** *** 677,683 **** #else dir->contents->dev = dir->contents->ino = 0; #endif ! #endif /* WIN32 */ dir->contents->files = 0; dir->contents->dirstream = 0; } --- 729,735 ---- #else dir->contents->dev = dir->contents->ino = 0; #endif ! #endif /* WINDOWS32 */ dir->contents->files = 0; dir->contents->dirstream = 0; } *************** *** 718,727 **** dir = find_directory ("[]")->contents; #else dirend = rindex (filename, '/'); ! #ifdef WIN32 ! if (!dirend) ! dirend = rindex (filename, '\\'); ! #endif /* WIN32 */ if (dirend == 0) #ifdef _AMIGA dir = find_directory ("")->contents; --- 770,785 ---- dir = find_directory ("[]")->contents; #else dirend = rindex (filename, '/'); ! #if defined (WINDOWS32) || defined (__MSDOS__) ! /* Forward and backslashes might be mixed. We need the rightmost one. */ ! { ! char *bslash = rindex(filename, '\\'); ! if (!dirend || bslash > dirend) ! dirend = bslash; ! /* The case of "d:file" is unhandled. But I don't think ! such names can happen here. */ ! } ! #endif /* WINDOWS32 || __MSDOS__ */ if (dirend == 0) #ifdef _AMIGA dir = find_directory ("")->contents; *************** *** 731,739 **** #endif /* VMS */ else { ! char *dirname = (char *) alloca (dirend - filename + 1); ! bcopy (p, dirname, dirend - p); ! dirname[dirend - p] = '\0'; dir = find_directory (dirname)->contents; p = filename = dirend + 1; } --- 789,803 ---- #endif /* VMS */ else { ! char *dirname; ! if (dirend == filename) ! dirname = "/"; ! else ! { ! dirname = (char *) alloca (dirend - filename + 1); ! bcopy (p, dirname, dirend - p); ! dirname[dirend - p] = '\0'; ! } dir = find_directory (dirname)->contents; p = filename = dirend + 1; } *************** *** 791,800 **** if (dir->contents == 0) printf ("# %s: could not be stat'd.\n", dir->name); else if (dir->contents->files == 0) ! #ifdef WIN32 printf ("# %s (key %s, mtime %d): could not be opened.\n", dir->name, dir->contents->path_key,dir->contents->mtime); ! #else /* WIN32 */ #ifdef VMS printf ("# %s (device %d, inode [%d,%d,%d]): could not be opened.\n", dir->name, dir->contents->dev, --- 855,864 ---- if (dir->contents == 0) printf ("# %s: could not be stat'd.\n", dir->name); else if (dir->contents->files == 0) ! #ifdef WINDOWS32 printf ("# %s (key %s, mtime %d): could not be opened.\n", dir->name, dir->contents->path_key,dir->contents->mtime); ! #else /* WINDOWS32 */ #ifdef VMS printf ("# %s (device %d, inode [%d,%d,%d]): could not be opened.\n", dir->name, dir->contents->dev, *************** *** 805,811 **** dir->name, (long int) dir->contents->dev, (long int) dir->contents->ino); #endif ! #endif /* WIN32 */ else { register unsigned int f = 0, im = 0; --- 869,875 ---- dir->name, (long int) dir->contents->dev, (long int) dir->contents->ino); #endif ! #endif /* WINDOWS32 */ else { register unsigned int f = 0, im = 0; *************** *** 817,826 **** ++im; else ++f; ! #ifdef WIN32 printf ("# %s (key %s, mtime %d): ", dir->name, dir->contents->path_key, dir->contents->mtime); ! #else /* WIN32 */ #ifdef VMS printf ("# %s (device %d, inode [%d,%d,%d]): ", dir->name, dir->contents->dev, --- 881,890 ---- ++im; else ++f; ! #ifdef WINDOWS32 printf ("# %s (key %s, mtime %d): ", dir->name, dir->contents->path_key, dir->contents->mtime); ! #else /* WINDOWS32 */ #ifdef VMS printf ("# %s (device %d, inode [%d,%d,%d]): ", dir->name, dir->contents->dev, *************** *** 830,836 **** printf ("# %s (device %d, inode %d): ", dir->name, dir->contents->dev, dir->contents->ino); #endif ! #endif /* WIN32 */ if (f == 0) fputs ("No", stdout); else --- 894,900 ---- printf ("# %s (device %d, inode %d): ", dir->name, dir->contents->dev, dir->contents->ino); #endif ! #endif /* WINDOWS32 */ if (f == 0) fputs ("No", stdout); else diff -crP ../make-3.75/dosbuild.bat ./dosbuild.bat *** ../make-3.75/dosbuild.bat Wed Dec 31 19:00:00 1969 --- ./dosbuild.bat Mon Apr 7 02:54:40 1997 *************** *** 0 **** --- 1,42 ---- + @echo Building Make for MSDOS + @rem Echo ON so they will see what is going on. + @echo on + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g misc.c -o misc.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g main.c -o main.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g read.c -o read.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g remake.c -o remake.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g rule.c -o rule.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g implicit.c -o implicit.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g default.c -o default.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g variable.c -o variable.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g function.c -o function.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g vpath.c -o vpath.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g version.c -o version.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g ar.c -o ar.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g arscan.c -o arscan.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g signame.c -o signame.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g remote-stub.c -o remote-stub.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt.c -o getopt.o + gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt1.c -o getopt1.o + @cd glob + @if exist libglob.a del libglob.a + gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g glob.c -o glob.o + gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g fnmatch.c -o fnmatch.o + ar rv libglob.a glob.o fnmatch.o + @echo off + cd .. + echo commands.o > respf.$$$ + for %%f in (job dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$ + for %%f in (expand function vpath version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$ + echo glob/libglob.a >> respf.$$$ + @echo Linking... + @echo on + gcc -o make.new @respf.$$$ + @if exist make.exe echo Make.exe is now built! + @if not exist make.exe echo Make.exe build failed... + @if exist make.exe del respf.$$$ diff -crP ../make-3.75/file.c ./file.c *** ../make-3.75/file.c Sun Jul 14 12:30:06 1996 --- ./file.c Wed Aug 27 16:31:10 1997 *************** *** 1,5 **** /* Target file hash table management for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Target file hash table management for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 87,93 **** for (f = files[hashval]; f != 0; f = f->next) { ! if (strieq (f->name, name)) { return f; } --- 87,93 ---- for (f = files[hashval]; f != 0; f = f->next) { ! if (strieq (f->hname, name)) { return f; } *************** *** 128,134 **** hashval %= FILE_BUCKETS; for (f = files[hashval]; f != 0; f = f->next) ! if (strieq (f->name, name)) break; if (f != 0 && !f->double_colon) --- 128,134 ---- hashval %= FILE_BUCKETS; for (f = files[hashval]; f != 0; f = f->next) ! if (strieq (f->hname, name)) break; if (f != 0 && !f->double_colon) *************** *** 141,147 **** new = (struct file *) xmalloc (sizeof (struct file)); bzero ((char *) new, sizeof (struct file)); ! new->name = name; new->update_status = -1; if (f == 0) --- 141,147 ---- new = (struct file *) xmalloc (sizeof (struct file)); bzero ((char *) new, sizeof (struct file)); ! new->name = new->hname = name; new->update_status = -1; if (f == 0) *************** *** 162,177 **** return new; } ! /* Rename FILE to NAME. This is not as simple as resetting ! the `name' member, since it must be put in a new hash bucket, and possibly merged with an existing file called NAME. */ void ! rename_file (file, name) register struct file *file; char *name; { ! char *oldname = file->name; register unsigned int oldhash; register char *n; --- 162,177 ---- return new; } ! /* Rehash FILE to NAME. This is not as simple as resetting ! the `hname' member, since it must be put in a new hash bucket, and possibly merged with an existing file called NAME. */ void ! rehash_file (file, name) register struct file *file; char *name; { ! char *oldname = file->hname; register unsigned int oldhash; register char *n; *************** *** 187,192 **** --- 187,209 ---- file_hash_enter (file, name, oldhash, file->name); } + /* Rename FILE to NAME. This is not as simple as resetting + the `name' member, since it must be put in a new hash bucket, + and possibly merged with an existing file called NAME. */ + + void + rename_file (file, name) + register struct file *file; + char *name; + { + rehash_file(file, name); + while (file) + { + file->name = file->hname; + file = file->prev; + } + } + void file_hash_enter (file, name, oldhash, oldname) register struct file *file; *************** *** 208,216 **** /* Look for an existing file under the new name. */ for (oldfile = files[newbucket]; oldfile != 0; oldfile = oldfile->next) ! if (strieq (oldfile->name, name)) break; if (oldhash != 0 && (newbucket != oldbucket || oldfile != 0)) { /* Remove FILE from its hash bucket. */ --- 225,236 ---- /* Look for an existing file under the new name. */ for (oldfile = files[newbucket]; oldfile != 0; oldfile = oldfile->next) ! if (strieq (oldfile->hname, name)) break; + /* If the old file is the same as the new file, something's wrong. */ + assert (oldfile != file); + if (oldhash != 0 && (newbucket != oldbucket || oldfile != 0)) { /* Remove FILE from its hash bucket. */ *************** *** 228,236 **** /* Give FILE its new name. */ ! file->name = name; for (f = file->double_colon; f != 0; f = f->prev) ! f->name = name; if (oldfile == 0) { --- 248,256 ---- /* Give FILE its new name. */ ! file->hname = name; for (f = file->double_colon; f != 0; f = f->prev) ! f->hname = name; if (oldfile == 0) { *************** *** 319,324 **** --- 339,345 ---- MERGE (is_target); MERGE (cmd_target); MERGE (phony); + MERGE (ignore_vpath); #undef MERGE file->renamed = oldfile; *************** *** 520,528 **** struct file *f; { register struct dep *d; ! #ifdef VMS ! extern char *cvt_time PARAMS ((unsigned long)); ! #endif putchar ('\n'); if (!f->is_target) puts ("# Not a target:"); --- 541,547 ---- struct file *f; { register struct dep *d; ! putchar ('\n'); if (!f->is_target) puts ("# Not a target:"); *************** *** 558,570 **** else if (f->last_mtime == (time_t) -1) puts ("# File does not exist."); else - #ifdef VMS - printf ("# Last modified %.24s (%0lx)\n", - cvt_time(f->last_mtime), (unsigned long) f->last_mtime); - #else printf ("# Last modified %.24s (%ld)\n", ctime (&f->last_mtime), (long int) f->last_mtime); - #endif printf ("# File has%s been updated.\n", f->updated ? "" : " not"); switch (f->command_state) --- 577,584 ---- diff -crP ../make-3.75/filedef.h ./filedef.h *** ../make-3.75/filedef.h Wed Mar 20 09:58:04 1996 --- ./filedef.h Wed Aug 27 16:31:10 1997 *************** *** 1,5 **** /* Definition of target file data structures for GNU Make. ! Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Definition of target file data structures for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 24,29 **** --- 24,31 ---- { struct file *next; char *name; + char *hname; /* Hashed filename */ + char *vpath; /* VPATH/vpath pathname */ struct dep *deps; struct commands *cmds; /* Commands to execute for this target. */ int command_flags; /* Flags OR'd in for cmds; see commands.h. */ *************** *** 77,82 **** --- 79,85 ---- unsigned int secondary:1; unsigned int dontcare:1; /* Nonzero if no complaint is to be made if this target cannot be remade. */ + unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name */ }; /* Number of intermediate files entered. */ *************** *** 88,94 **** extern struct file *lookup_file (), *enter_file (); extern void remove_intermediates (), snap_deps (); ! extern void rename_file (), file_hash_enter (); extern void set_command_state (); --- 91,97 ---- extern struct file *lookup_file (), *enter_file (); extern void remove_intermediates (), snap_deps (); ! extern void rename_file (), rehash_file (), file_hash_enter (); extern void set_command_state (); *************** *** 111,120 **** targets, which need to be considered newer than anything that depends on them, even if said dependents' modtimes are in the future. ! NOTE: This assumes 32-bit `time_t's, but I cannot think of a portable way ! to produce the largest representable integer of a given signed type. */ ! #define NEW_MTIME ((time_t) 0x7fffffff) ! #define check_renamed(file) \ while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */ --- 114,125 ---- targets, which need to be considered newer than anything that depends on them, even if said dependents' modtimes are in the future. ! If time_t is unsigned, its maximum value is the same as "(time_t) -1", ! so use one less than that, because -1 is used for non-existing files. */ ! #define NEW_MTIME \ ! (INTEGER_TYPE_SIGNED (time_t) \ ! ? INTEGER_TYPE_MAXIMUM (time_t) \ ! : (INTEGER_TYPE_MAXIMUM (time_t) - 1)) #define check_renamed(file) \ while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */ diff -crP ../make-3.75/function.c ./function.c *** ../make-3.75/function.c Sat Jun 22 15:26:47 1996 --- ./function.c Tue Sep 16 10:17:29 1997 *************** *** 1,5 **** /* Variable function expansion for GNU Make. ! Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Variable function expansion for GNU Make. ! Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 23,36 **** #include "job.h" #include "commands.h" - #ifdef __MSDOS__ - #include - #include - #endif #ifdef _AMIGA #include "amiga.h" #endif ! #ifdef WIN32 #include #include #include "sub_proc.h" --- 23,32 ---- #include "job.h" #include "commands.h" #ifdef _AMIGA #include "amiga.h" #endif ! #ifdef WINDOWS32 #include #include #include "sub_proc.h" *************** *** 164,177 **** if (len < pattern_prepercent_len + pattern_postpercent_len) fail = 1; ! /* Does the prefix match? */ if (!fail && pattern_prepercent_len > 0 && (*t != *pattern || t[pattern_prepercent_len - 1] != pattern_percent[-1] || strncmp (t + 1, pattern + 1, pattern_prepercent_len - 1))) fail = 1; ! /* Does the suffix match? */ if (!fail && pattern_postpercent_len > 0 && (t[len - 1] != pattern_percent[pattern_postpercent_len] || t[len - pattern_postpercent_len] != pattern_percent[1] --- 160,173 ---- if (len < pattern_prepercent_len + pattern_postpercent_len) fail = 1; ! /* Does the prefix match? */ if (!fail && pattern_prepercent_len > 0 && (*t != *pattern || t[pattern_prepercent_len - 1] != pattern_percent[-1] || strncmp (t + 1, pattern + 1, pattern_prepercent_len - 1))) fail = 1; ! /* Does the suffix match? */ if (!fail && pattern_postpercent_len > 0 && (t[len - 1] != pattern_percent[pattern_postpercent_len] || t[len - pattern_postpercent_len] != pattern_percent[1] *************** *** 235,240 **** --- 231,237 ---- function_firstword, function_word, function_words, + function_wordlist, function_findstring, function_strip, function_join, *************** *** 271,276 **** --- 268,274 ---- { "firstword", 9, function_firstword }, { "word", 4, function_word }, { "words", 5, function_words }, + { "wordlist", 8, function_wordlist }, { "findstring", 10, function_findstring }, { "strip", 5, function_strip }, { "join", 4, function_join }, *************** *** 320,331 **** The output is written into VARIABLE_BUFFER starting at O. */ /* Note this absorbs a semicolon and is safe to use in conditionals. */ ! #define BADARGS(func) \ ! if (reading_filename != 0) \ ! makefile_fatal (reading_filename, *reading_lineno_ptr, \ ! "insufficient arguments to function `%s'", \ ! func); \ ! else \ fatal ("insufficient arguments to function `%s'", func) static char * --- 318,329 ---- The output is written into VARIABLE_BUFFER starting at O. */ /* Note this absorbs a semicolon and is safe to use in conditionals. */ ! #define BADARGS(func) \ ! if (reading_filename != 0) \ ! makefile_fatal (reading_filename, *reading_lineno_ptr, \ ! "insufficient arguments to function `%s'", \ ! func); \ ! else \ fatal ("insufficient arguments to function `%s'", func) static char * *************** *** 336,342 **** char *end; { char *p, *p2, *p3; ! unsigned int i, len; int doneany = 0; int count; char endparen = *end, startparen = *end == ')' ? '(' : '{'; --- 334,340 ---- char *end; { char *p, *p2, *p3; ! unsigned int i, j, len; int doneany = 0; int count; char endparen = *end, startparen = *end == ')' ? '(' : '{'; *************** *** 350,362 **** #ifndef VMS /* not supported for vms yet */ case function_shell: { ! #ifdef WIN32 ! SECURITY_ATTRIBUTES saAttr; ! HANDLE hIn; ! HANDLE hErr; ! HANDLE hChildOutRd; ! HANDLE hChildOutWr; ! HANDLE hProcess; #endif char **argv; char *error_prefix; --- 348,363 ---- #ifndef VMS /* not supported for vms yet */ case function_shell: { ! #ifdef WINDOWS32 ! SECURITY_ATTRIBUTES saAttr; ! HANDLE hIn; ! HANDLE hErr; ! HANDLE hChildOutRd; ! HANDLE hChildOutWr; ! HANDLE hProcess; ! #endif ! #ifdef __MSDOS__ ! FILE *fpipe; #endif char **argv; char *error_prefix; *************** *** 369,383 **** /* Expand the command line. */ text = expand_argument (text, end); /* Construct the argument list. */ argv = construct_command_argv (text, (char **) NULL, (struct file *) 0); if (argv == 0) break; #ifndef _AMIGA /* Using a target environment for `shell' loses in cases like: ! export var = $(shell echo foobie) because target_environment hits a loop trying to expand $(var) to put it in the environment. This is even more confusing when var was not explicitly exported, but just appeared in the --- 370,386 ---- /* Expand the command line. */ text = expand_argument (text, end); + #ifndef __MSDOS__ /* Construct the argument list. */ argv = construct_command_argv (text, (char **) NULL, (struct file *) 0); if (argv == 0) break; + #endif #ifndef _AMIGA /* Using a target environment for `shell' loses in cases like: ! export var = $(shell echo foobie) because target_environment hits a loop trying to expand $(var) to put it in the environment. This is even more confusing when var was not explicitly exported, but just appeared in the *************** *** 388,394 **** /* Construct the environment. */ envp = target_environment ((struct file *) 0); #endif ! #endif /* Not Amiga. */ /* For error messages. */ if (reading_filename != 0) --- 391,397 ---- /* Construct the environment. */ envp = target_environment ((struct file *) 0); #endif ! #endif /* Not Amiga. */ /* For error messages. */ if (reading_filename != 0) *************** *** 400,480 **** else error_prefix = ""; ! #if !defined(__MSDOS__) && !defined(_AMIGA) ! # ifdef WIN32 ! saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); ! saAttr.bInheritHandle = TRUE; ! saAttr.lpSecurityDescriptor = NULL; ! ! if (DuplicateHandle(GetCurrentProcess(), ! GetStdHandle(STD_INPUT_HANDLE), ! GetCurrentProcess(), ! &hIn, ! 0, ! TRUE, ! DUPLICATE_SAME_ACCESS) == FALSE) { ! fatal("create_child_process: DuplicateHandle(In) failed (e=%d)\n", ! GetLastError()); ! } ! if (DuplicateHandle(GetCurrentProcess(), ! GetStdHandle(STD_ERROR_HANDLE), ! GetCurrentProcess(), ! &hErr, ! 0, ! TRUE, ! DUPLICATE_SAME_ACCESS) == FALSE) { ! fatal("create_child_process: DuplicateHandle(Err) failed (e=%d)\n", ! GetLastError()); ! } ! ! if (!CreatePipe(&hChildOutRd, &hChildOutWr, &saAttr, 0)) ! fatal("CreatePipe() failed (e=%d)\n", GetLastError()); ! ! hProcess = process_init_fd(hIn, hChildOutWr, hErr); ! ! if (!hProcess) ! fatal("expand_function: process_init_fd() failed\n"); ! else ! process_register(hProcess); ! ! /* make sure that CreateProcess() has Path it needs */ ! sync_Path_environment(); ! ! if (!process_begin(hProcess, argv, envp, argv[0], NULL)) ! pid = (int) hProcess; ! else ! fatal("expand_function: unable to launch process (e=%d)\n", ! process_last_err(hProcess)); ! ! /* set up to read data from child */ ! pipedes[0] = _open_osfhandle((long) hChildOutRd, O_RDONLY); ! ! /* this will be closed almost right away */ ! pipedes[1] = _open_osfhandle((long) hChildOutWr, O_APPEND); ! # else /* WIN32 */ if (pipe (pipedes) < 0) { perror_with_name (error_prefix, "pipe"); break; } pid = vfork (); if (pid < 0) perror_with_name (error_prefix, "fork"); else if (pid == 0) child_execute_job (0, pipedes[1], argv, envp); else ! # endif /* WIN32 */ { /* We are the parent. */ char *buffer; unsigned int maxlen; int cc; - - /* Free the storage only the child needed. */ - free (argv[0]); - free ((char *) argv); #if 0 for (i = 0; envp[i] != 0; ++i) free (envp[i]); --- 403,531 ---- else error_prefix = ""; ! #ifndef _AMIGA ! # ifdef WINDOWS32 ! saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); ! saAttr.bInheritHandle = TRUE; ! saAttr.lpSecurityDescriptor = NULL; ! ! if (DuplicateHandle(GetCurrentProcess(), ! GetStdHandle(STD_INPUT_HANDLE), ! GetCurrentProcess(), ! &hIn, ! 0, ! TRUE, ! DUPLICATE_SAME_ACCESS) == FALSE) { ! fatal("create_child_process: DuplicateHandle(In) failed (e=%d)\n", ! GetLastError()); ! } ! if (DuplicateHandle(GetCurrentProcess(), ! GetStdHandle(STD_ERROR_HANDLE), ! GetCurrentProcess(), ! &hErr, ! 0, ! TRUE, ! DUPLICATE_SAME_ACCESS) == FALSE) { ! fatal("create_child_process: DuplicateHandle(Err) failed (e=%d)\n", ! GetLastError()); ! } ! ! if (!CreatePipe(&hChildOutRd, &hChildOutWr, &saAttr, 0)) ! fatal("CreatePipe() failed (e=%d)\n", GetLastError()); ! ! hProcess = process_init_fd(hIn, hChildOutWr, hErr); ! ! if (!hProcess) ! fatal("expand_function: process_init_fd() failed\n"); ! else ! process_register(hProcess); ! ! /* make sure that CreateProcess() has Path it needs */ ! sync_Path_environment(); ! ! if (!process_begin(hProcess, argv, envp, argv[0], NULL)) ! pid = (int) hProcess; ! else ! fatal("expand_function: unable to launch process (e=%d)\n", ! process_last_err(hProcess)); ! ! /* set up to read data from child */ ! pipedes[0] = _open_osfhandle((long) hChildOutRd, O_RDONLY); ! ! /* this will be closed almost right away */ ! pipedes[1] = _open_osfhandle((long) hChildOutWr, O_APPEND); ! # else /* WINDOWS32 */ ! # ifdef __MSDOS__ ! { ! /* MSDOS can't fork, but it has `popen'. ! (Bwt, why isn't `popen' used in all the versions?) */ ! struct variable *sh = lookup_variable ("SHELL", 5); ! int e; ! extern int dos_command_running, dos_status; ! ! /* Make sure not to bother processing an empty line. */ ! while (isblank (*text)) ! ++text; ! if (*text == '\0') ! break; ! ! if (sh) ! { ! char buf[PATH_MAX + 7]; ! /* This makes sure $SHELL value is used by $(shell), even ! though the target environment is not passed to it. */ ! sprintf (buf, "SHELL=%s", sh->value); ! putenv (buf); ! } ! ! e = errno; ! errno = 0; ! dos_command_running = 1; ! dos_status = 0; ! fpipe = popen (text, "rt"); ! dos_command_running = 0; ! if (!fpipe || dos_status) ! { ! pipedes[0] = -1; ! pid = -1; ! if (dos_status) ! errno = EINTR; ! else if (errno == 0) ! errno = ENOMEM; ! shell_function_completed = -1; ! } ! else ! { ! pipedes[0] = fileno (fpipe); ! pid = 42; ! errno = e; ! shell_function_completed = 1; ! } ! } ! if (pipedes[0] < 0) ! # else /* ! __MSDOS__ */ if (pipe (pipedes) < 0) + # endif /* __MSDOS__ */ { perror_with_name (error_prefix, "pipe"); break; } + # ifndef __MSDOS__ pid = vfork (); if (pid < 0) perror_with_name (error_prefix, "fork"); else if (pid == 0) child_execute_job (0, pipedes[1], argv, envp); else ! # endif /* ! __MSDOS__ */ ! # endif /* WINDOWS32 */ { /* We are the parent. */ char *buffer; unsigned int maxlen; int cc; #if 0 for (i = 0; envp[i] != 0; ++i) free (envp[i]); *************** *** 483,499 **** /* Record the PID for reap_children. */ shell_function_pid = pid; shell_function_completed = 0; /* Set up and read from the pipe. */ maxlen = 200; buffer = (char *) xmalloc (maxlen + 1); - /* Close the write side of the pipe. */ - (void) close (pipedes[1]); - /* Read from the pipe until it gets EOF. */ i = 0; do --- 534,555 ---- /* Record the PID for reap_children. */ shell_function_pid = pid; + #ifndef __MSDOS__ shell_function_completed = 0; + /* Free the storage only the child needed. */ + free (argv[0]); + free ((char *) argv); + + /* Close the write side of the pipe. */ + (void) close (pipedes[1]); + #endif /* Set up and read from the pipe. */ maxlen = 200; buffer = (char *) xmalloc (maxlen + 1); /* Read from the pipe until it gets EOF. */ i = 0; do *************** *** 516,522 **** --- 572,583 ---- #endif /* Close the read side of the pipe. */ + #ifdef __MSDOS__ + if (fpipe) + (void) pclose (fpipe); + #else (void) close (pipedes[0]); + #endif /* Loop until child_handler sets shell_function_completed to the status of our child shell. */ *************** *** 545,629 **** if (i > 0) { if (buffer[i - 1] == '\n') ! buffer[--i] = '\0'; else buffer[i] = '\0'; p = buffer; ! while ((p = index (p, '\n')) != 0) ! *p++ = ' '; o = variable_buffer_output (o, buffer, i); } } free (buffer); } ! #else /* MSDOS or Amiga */ ! #ifndef _AMIGA ! { ! /* MS-DOS can't do fork, but it can do spawn. However, this ! means that we don't have an opportunity to reopen stdout to ! trap it. Thus, we save our own stdout onto a new descriptor ! and dup a temp file's descriptor onto our stdout temporarily. ! After we spawn the shell program, we dup our own stdout back ! to the stdout descriptor. The buffer reading is the same as ! above, except that we're now reading from a file. */ ! ! int save_stdout; ! int child_stdout; ! char tmp_output[FILENAME_MAX]; ! FILE *child_stream; ! unsigned int maxlen = 200; ! int cc; ! char *buffer; ! ! strcpy (tmp_output, "shXXXXXX"); ! mktemp (tmp_output); ! child_stdout = open (tmp_output, ! O_WRONLY|O_CREAT|O_TRUNC|O_TEXT, 0644); ! save_stdout = dup (1); ! dup2 (child_stdout, 1); ! spawnvp (P_WAIT, argv[0], argv); ! dup2 (save_stdout, 1); ! close (child_stdout); ! close (save_stdout); ! ! child_stdout = open (tmp_output, O_RDONLY|O_TEXT, 0644); ! ! buffer = xmalloc (maxlen); ! i = 0; ! do ! { ! if (i == maxlen) ! { ! maxlen += 512; ! buffer = (char *) xrealloc (buffer, maxlen + 1); ! } ! ! cc = read (child_stdout, &buffer[i], maxlen - i); ! if (cc > 0) ! i += cc; ! } while (cc > 0); ! ! close (child_stdout); ! unlink (tmp_output); ! ! if (i > 0) ! { ! if (buffer[i - 1] == '\n') ! buffer[--i] = '\0'; ! else ! buffer[i] = '\0'; ! p = buffer; ! while ((p = index (p, '\n')) != 0) ! *p++ = ' '; ! o = variable_buffer_output (o, buffer, i); ! } ! free (buffer); ! } ! #else /* Amiga */ { /* Amiga can't fork nor spawn, but I can start a program with ! redirection of my choice. The rest is the same as above. */ #include #include --- 606,646 ---- if (i > 0) { if (buffer[i - 1] == '\n') ! { ! if (i > 1 && buffer[i - 2] == '\r') ! --i; ! buffer[--i] = '\0'; ! } else buffer[i] = '\0'; + p = buffer; ! for (p2=p; *p != '\0'; ++p) ! { ! if (p[0] == '\r' && p[1] == '\n') ! continue; ! if (*p == '\n') ! *p2++ = ' '; ! else ! *p2++ = *p; ! } ! *p2 = '\0'; o = variable_buffer_output (o, buffer, i); } } free (buffer); } ! #else /* Amiga */ { /* Amiga can't fork nor spawn, but I can start a program with ! redirection of my choice. However, this means that we ! don't have an opportunity to reopen stdout to trap it. Thus, ! we save our own stdout onto a new descriptor and dup a temp ! file's descriptor onto our stdout temporarily. After we ! spawn the shell program, we dup our own stdout back to the ! stdout descriptor. The buffer reading is the same as above, ! except that we're now reading from a file. */ #include #include *************** *** 695,702 **** } free (buffer); } ! #endif /* Not Amiga. */ ! #endif /* MSDOS or Amiga. */ free (text); break; --- 712,718 ---- } free (buffer); } ! #endif /* Not Amiga. */ free (text); break; *************** *** 1046,1053 **** text = expand_argument (text, end); p2 = text; ! while ((p = find_next_token (&p2, &i)) != 0) { o = variable_buffer_output (o, p, i); o = variable_buffer_output (o, " ", 1); doneany = 1; --- 1062,1076 ---- text = expand_argument (text, end); p2 = text; ! while (*p2 != '\0') { + while (isspace(*p2)) + ++p2; + p = p2; + for (i=0; *p2 != '\0' && !isspace(*p2); ++p2, ++i) + {} + if (!i) + break; o = variable_buffer_output (o, p, i); o = variable_buffer_output (o, " ", 1); doneany = 1; *************** *** 1194,1199 **** --- 1217,1307 ---- free (text); break; + case function_wordlist: + /* Get two comma-separated arguments and expand each one. */ + count = 0; + for (p = text; p < end; ++p) + { + if (*p == startparen) + ++count; + else if (*p == endparen) + --count; + else if (*p == ',' && count <= 0) + break; + } + if (p == end) + BADARGS ("wordlist"); + text = expand_argument (text, p); + + /* Check the first argument. */ + for (p2 = text; *p2 != '\0'; ++p2) + if (*p2 < '0' || *p2 > '9') + { + if (reading_filename != 0) + makefile_fatal (reading_filename, *reading_lineno_ptr, + "non-numeric first argument to `wordlist' function"); + else + fatal ("non-numeric first argument to `wordlist' function"); + } + i = (unsigned int)atoi(text); + free (text); + + /* Check the next argument */ + for (p2 = p + 1; isblank(*p2); ++p2) + {} + count = 0; + for (p = p2; p < end; ++p) + { + if (*p == startparen) + ++count; + else if (*p == endparen) + --count; + else if (*p == ',' && count <= 0) + break; + } + if (p == end) + BADARGS ("wordlist"); + text = expand_argument (p2, p); + + for (p2 = text; *p2 != '\0'; ++p2) + if (*p2 < '0' || *p2 > '9') + { + if (reading_filename != 0) + makefile_fatal (reading_filename, *reading_lineno_ptr, + "non-numeric second argument to `wordlist' function"); + else + fatal ("non-numeric second argument to `wordlist' function"); + } + j = (unsigned int)atoi(text); + free (text); + + if (j > i) + j -= i; + else + { + unsigned int k; + k = j; + j = i - j; + i = k; + } + ++j; + + /* Extract the requested words */ + text = expand_argument (p + 1, end); + p2 = text; + + while (((p = find_next_token (&p2, &len)) != 0) && --i) + {} + if (p) + { + while (--j && (find_next_token (&p2, &len) != 0)) + {} + o = variable_buffer_output (o, p, p2 - p); + } + + free (text); + break; + case function_findstring: /* Get two comma-separated arguments and expand each one. */ count = 0; *************** *** 1270,1294 **** { p = p2 + len; #ifdef VMS ! while (p >= p2 && *p != (function == function_dir ? ']' : '.')) #else ! while (p >= p2 && *p != (function == function_dir ? '/' : '.')) #endif --p; ! if (p >= p2) ! { ! if (function == function_dir) ! ++p; ! o = variable_buffer_output (o, p2, p - p2); ! } else if (function == function_dir) #ifdef VMS ! o = variable_buffer_output (o, "[]", 2); #else #ifndef _AMIGA ! o = variable_buffer_output (o, "./", 2); #else ! /* o = o */; /* Just a nop... */ #endif /* AMIGA */ #endif /* !VMS */ else --- 1378,1412 ---- { p = p2 + len; #ifdef VMS ! while (p >= p2 && *p != ']' ! && (function != function_basename || *p != '.')) #else ! # ifdef __MSDOS__ ! while (p >= p2 && *p != '/' && *p != '\\' ! && (function != function_basename || *p != '.')) ! # else ! while (p >= p2 && *p != '/' ! && (function != function_basename || *p != '.')) ! # endif #endif --p; ! if (p >= p2 && (function == function_dir)) ! o = variable_buffer_output (o, p2, ++p - p2); ! else if (p >= p2 && (*p == '.')) ! o = variable_buffer_output (o, p2, p - p2); ! #if defined(WINDOWS32) || defined(__MSDOS__) ! /* Handle the "d:foobar" case */ ! else if (p2[0] && p2[1] == ':' && function == function_dir) ! o = variable_buffer_output (o, p2, 2); ! #endif else if (function == function_dir) #ifdef VMS ! o = variable_buffer_output (o, "[]", 2); #else #ifndef _AMIGA ! o = variable_buffer_output (o, "./", 2); #else ! /* o = o */; /* Just a nop... */ #endif /* AMIGA */ #endif /* !VMS */ else *************** *** 1315,1331 **** { p = p2 + len; #ifdef VMS ! while (p >= p2 && *p != (function == function_notdir ? ']' : '.')) #else ! while (p >= p2 && *p != (function == function_notdir ? '/' : '.')) #endif --p; if (p >= p2) { if (function == function_notdir) ++p; o = variable_buffer_output (o, p, len - (p - p2)); } else if (function == function_notdir) o = variable_buffer_output (o, p2, len); --- 1433,1466 ---- { p = p2 + len; #ifdef VMS ! while (p >= p2 && *p != ']' ! && (function != function_suffix || *p != '.')) #else ! # ifdef __MSDOS__ ! while (p >= p2 && *p != '/' && *p != '\\' ! && (function != function_suffix || *p != '.')) ! # else ! while (p >= p2 && *p != '/' ! && (function != function_suffix || *p != '.')) ! # endif #endif --p; if (p >= p2) { if (function == function_notdir) ++p; + else if (*p != '.') + continue; o = variable_buffer_output (o, p, len - (p - p2)); } + #if defined(WINDOWS32) || defined(__MSDOS__) + /* Handle the case of "d:foo/bar". */ + else if (function == function_notdir && p2[0] && p2[1] == ':') + { + p = p2 + 2; + o = variable_buffer_output (o, p, len - (p - p2)); + } + #endif else if (function == function_notdir) o = variable_buffer_output (o, p2, len); diff -crP ../make-3.75/getloadavg.c ./getloadavg.c *** ../make-3.75/getloadavg.c Sat Jun 22 15:26:48 1996 --- ./getloadavg.c Tue Jul 22 17:35:43 1997 *************** *** 1,5 **** /* Get the system load averages. ! Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* Get the system load averages. ! Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify *************** *** 19,24 **** --- 19,32 ---- /* Compile-time symbols that this file uses: + HAVE_PSTAT_GETDYNAMIC Define this if your system has the + pstat_getdynamic function. I think it + is unique to HPUX9. The best way to get the + definition is through the AC_FUNC_GETLOADAVG + macro that comes with autoconf 2.13 or newer. + If that isn't an option, then just put + AC_CHECK_FUNCS(pstat_getdynamic) in your + configure.in file. FIXUP_KERNEL_SYMBOL_ADDR() Adjust address in returned struct nlist. KERNEL_FILE Pathname of the kernel to nlist. LDAV_CVT() Scale the load average from the kernel. *************** *** 43,49 **** DGUX eunice UNIX emulator under VMS. hpux ! MSDOS No-op for MSDOS. NeXT sgi sequent Sequent Dynix 3.x.x (BSD) --- 51,57 ---- DGUX eunice UNIX emulator under VMS. hpux ! __MSDOS__ No-op for MSDOS. NeXT sgi sequent Sequent Dynix 3.x.x (BSD) *************** *** 52,58 **** UMAX UMAX4_3 VMS ! WIN32 No-op for Windows95/NT. __linux__ Linux: assumes /proc filesystem mounted. Support from Michael K. Johnson. __NetBSD__ NetBSD: assumes /kern filesystem mounted. --- 60,66 ---- UMAX UMAX4_3 VMS ! WINDOWS32 No-op for Windows95/NT. __linux__ Linux: assumes /proc filesystem mounted. Support from Michael K. Johnson. __NetBSD__ NetBSD: assumes /kern filesystem mounted. *************** *** 65,71 **** /* This should always be first. */ #ifdef HAVE_CONFIG_H ! #include #endif #include --- 73,79 ---- /* This should always be first. */ #ifdef HAVE_CONFIG_H ! # include #endif #include *************** *** 73,80 **** /* Both the Emacs and non-Emacs sections want this. Some configuration files' definitions for the LOAD_AVE_CVT macro (like sparc.h's) use macros like FSCALE, defined here. */ ! #ifdef unix ! #include #endif --- 81,88 ---- /* Both the Emacs and non-Emacs sections want this. Some configuration files' definitions for the LOAD_AVE_CVT macro (like sparc.h's) use macros like FSCALE, defined here. */ ! #if defined (unix) || defined (__unix) ! # include #endif *************** *** 103,127 **** LOAD_AVE_CVT, but future machine config files should just define LDAV_CVT directly. */ ! #if !defined(LDAV_CVT) && defined(LOAD_AVE_CVT) ! #define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0) ! #endif ! #if !defined (BSD) && defined (ultrix) /* Ultrix behaves like BSD on Vaxen. */ ! #define BSD ! #endif ! #ifdef NeXT /* NeXT in the 2.{0,1,2} releases defines BSD in , which conflicts with the definition understood in this file, that this really is BSD. */ ! #undef BSD /* NeXT defines FSCALE in . However, we take FSCALE being defined to mean that the nlist method should be used, which is not true. */ ! #undef FSCALE ! #endif /* Set values that are different from the defaults, which are set a little farther down with #ifndef. */ --- 111,135 ---- LOAD_AVE_CVT, but future machine config files should just define LDAV_CVT directly. */ ! # if !defined(LDAV_CVT) && defined(LOAD_AVE_CVT) ! # define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0) ! # endif ! # if !defined (BSD) && defined (ultrix) /* Ultrix behaves like BSD on Vaxen. */ ! # define BSD ! # endif ! # ifdef NeXT /* NeXT in the 2.{0,1,2} releases defines BSD in , which conflicts with the definition understood in this file, that this really is BSD. */ ! # undef BSD /* NeXT defines FSCALE in . However, we take FSCALE being defined to mean that the nlist method should be used, which is not true. */ ! # undef FSCALE ! # endif /* Set values that are different from the defaults, which are set a little farther down with #ifndef. */ *************** *** 129,484 **** /* Some shorthands. */ ! #if defined (HPUX) && !defined (hpux) ! #define hpux ! #endif ! ! #if defined(hp300) && !defined(hpux) ! #define MORE_BSD ! #endif ! ! #if defined(ultrix) && defined(mips) ! #define decstation ! #endif ! ! #if (defined(sun) && defined(SVR4)) || defined (SOLARIS2) ! #define SUNOS_5 ! #endif ! ! #if defined (__osf__) && (defined (__alpha) || defined (__alpha__)) ! #define OSF_ALPHA ! #include ! #endif ! ! #if defined (__osf__) && (defined (mips) || defined (__mips__)) ! #define OSF_MIPS ! #include ! #endif /* UTek's /bin/cc on the 4300 has no architecture specific cpp define by default, but _MACH_IND_SYS_TYPES is defined in . Combine that with a couple of other things and we'll have a unique match. */ ! #if !defined (tek4300) && defined (unix) && defined (m68k) && defined (mc68000) && defined (mc68020) && defined (_MACH_IND_SYS_TYPES) ! #define tek4300 /* Define by emacs, but not by other users. */ ! #endif /* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */ ! #ifndef LOAD_AVE_TYPE ! ! #ifdef MORE_BSD ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef sun ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef decstation ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef _SEQUENT_ ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef sgi ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef SVR4 ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef sony_news ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef sequent ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef OSF_ALPHA ! #define LOAD_AVE_TYPE long ! #endif ! ! #if defined (ardent) && defined (titan) ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef tek4300 ! #define LOAD_AVE_TYPE long ! #endif ! ! #if defined(alliant) && defined(i860) /* Alliant FX/2800 */ ! #define LOAD_AVE_TYPE long ! #endif ! ! #ifdef _AIX ! #define LOAD_AVE_TYPE long ! #endif ! #ifdef convex ! #define LOAD_AVE_TYPE double ! #ifndef LDAV_CVT ! #define LDAV_CVT(n) (n) ! #endif ! #endif ! #endif /* No LOAD_AVE_TYPE. */ ! #ifdef OSF_ALPHA /* defines an incorrect value for FSCALE on Alpha OSF/1, according to ghazi@noc.rutgers.edu. */ ! #undef FSCALE ! #define FSCALE 1024.0 ! #endif ! #if defined(alliant) && defined(i860) /* Alliant FX/2800 */ /* defines an incorrect value for FSCALE on an Alliant FX/2800 Concentrix 2.2, according to ghazi@noc.rutgers.edu. */ ! #undef FSCALE ! #define FSCALE 100.0 ! #endif ! #ifndef FSCALE /* SunOS and some others define FSCALE in sys/param.h. */ ! #ifdef MORE_BSD ! #define FSCALE 2048.0 ! #endif ! ! #if defined(MIPS) || defined(SVR4) || defined(decstation) ! #define FSCALE 256 ! #endif ! #if defined (sgi) || defined (sequent) /* Sometimes both MIPS and sgi are defined, so FSCALE was just defined above under #ifdef MIPS. But we want the sgi value. */ ! #undef FSCALE ! #define FSCALE 1000.0 ! #endif ! ! #if defined (ardent) && defined (titan) ! #define FSCALE 65536.0 ! #endif ! ! #ifdef tek4300 ! #define FSCALE 100.0 ! #endif ! ! #ifdef _AIX ! #define FSCALE 65536.0 ! #endif ! ! #endif /* Not FSCALE. */ ! ! #if !defined (LDAV_CVT) && defined (FSCALE) ! #define LDAV_CVT(n) (((double) (n)) / FSCALE) ! #endif /* VAX C can't handle multi-line #ifs, or lines longer that 256 characters. */ ! #ifndef NLIST_STRUCT ! #ifdef MORE_BSD ! #define NLIST_STRUCT ! #endif ! #ifdef sun ! #define NLIST_STRUCT ! #endif ! #ifdef decstation ! #define NLIST_STRUCT ! #endif ! #ifdef hpux ! #define NLIST_STRUCT ! #endif ! #if defined (_SEQUENT_) || defined (sequent) ! #define NLIST_STRUCT ! #endif ! #ifdef sgi ! #define NLIST_STRUCT ! #endif ! #ifdef SVR4 ! #define NLIST_STRUCT ! #endif ! #ifdef sony_news ! #define NLIST_STRUCT ! #endif ! #ifdef OSF_ALPHA ! #define NLIST_STRUCT ! #endif ! #if defined (ardent) && defined (titan) ! #define NLIST_STRUCT ! #endif ! #ifdef tek4300 ! #define NLIST_STRUCT ! #endif ! #ifdef butterfly ! #define NLIST_STRUCT ! #endif ! #if defined(alliant) && defined(i860) /* Alliant FX/2800 */ ! #define NLIST_STRUCT ! #endif ! #ifdef _AIX ! #define NLIST_STRUCT ! #endif ! #endif /* defined (NLIST_STRUCT) */ ! #if defined(sgi) || (defined(mips) && !defined(BSD)) ! #define FIXUP_KERNEL_SYMBOL_ADDR(nl) ((nl)[0].n_value &= ~(1 << 31)) ! #endif ! #if !defined (KERNEL_FILE) && defined (sequent) ! #define KERNEL_FILE "/dynix" ! #endif ! #if !defined (KERNEL_FILE) && defined (hpux) ! #define KERNEL_FILE "/hp-ux" ! #endif ! #if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || defined(SVR4) || (defined (ardent) && defined (titan))) ! #define KERNEL_FILE "/unix" ! #endif ! #if !defined (LDAV_SYMBOL) && defined (alliant) ! #define LDAV_SYMBOL "_Loadavg" ! #endif ! #if !defined(LDAV_SYMBOL) && ((defined(hpux) && !defined(hp9000s300)) || defined(_SEQUENT_) || defined(SVR4) || defined(ISC) || defined(sgi) || (defined (ardent) && defined (titan)) || defined (_AIX)) ! #define LDAV_SYMBOL "avenrun" ! #endif ! #ifdef HAVE_UNISTD_H ! #include ! #endif ! #include /* LOAD_AVE_TYPE should only get defined if we're going to use the nlist method. */ ! #if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL)) ! #define LOAD_AVE_TYPE double ! #endif ! ! #ifdef LOAD_AVE_TYPE ! ! #ifndef VMS ! #ifndef NLIST_STRUCT ! #include ! #else /* NLIST_STRUCT */ ! #include ! #endif /* NLIST_STRUCT */ ! ! #ifdef SUNOS_5 ! #include ! #include ! #endif ! ! #ifndef KERNEL_FILE ! #define KERNEL_FILE "/vmunix" ! #endif /* KERNEL_FILE */ ! ! #ifndef LDAV_SYMBOL ! #define LDAV_SYMBOL "_avenrun" ! #endif /* LDAV_SYMBOL */ ! ! #else /* VMS */ ! ! #ifndef eunice ! #include ! #include ! #else /* eunice */ ! #include ! #endif /* eunice */ ! #endif /* VMS */ ! ! #ifndef LDAV_CVT ! #define LDAV_CVT(n) ((double) (n)) ! #endif /* !LDAV_CVT */ ! ! #endif /* LOAD_AVE_TYPE */ ! ! #ifdef NeXT ! #ifdef HAVE_MACH_MACH_H ! #include ! #else ! #include ! #endif ! #endif /* NeXT */ ! ! #ifdef sgi ! #include ! #endif /* sgi */ ! ! #ifdef UMAX ! #include ! #include ! #include ! #include ! #include ! ! #ifdef UMAX_43 ! #include ! #include ! #include ! #include ! #include ! #else /* Not UMAX_43. */ ! #include ! #include ! #include ! #include ! #include ! #include ! #endif /* Not UMAX_43. */ ! #endif /* UMAX */ ! ! #ifdef DGUX ! #include ! #endif ! ! #if defined(HAVE_FCNTL_H) || defined(_POSIX_VERSION) ! #include ! #else ! #include ! #endif /* Avoid static vars inside a function since in HPUX they dump as pure. */ ! #ifdef NeXT static processor_set_t default_set; static int getloadavg_initialized; ! #endif /* NeXT */ ! #ifdef UMAX static unsigned int cpus = 0; static unsigned int samples; ! #endif /* UMAX */ ! #ifdef DGUX static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */ ! #endif /* DGUX */ ! #ifdef LOAD_AVE_TYPE /* File descriptor open to /dev/kmem or VMS load ave driver. */ static int channel; /* Nonzero iff channel is valid. */ --- 137,522 ---- /* Some shorthands. */ ! # if defined (HPUX) && !defined (hpux) ! # define hpux ! # endif ! ! # if defined (__hpux) && !defined (hpux) ! # define hpux ! # endif ! ! # if defined (__sun) && !defined (sun) ! # define sun ! # endif ! ! # if defined(hp300) && !defined(hpux) ! # define MORE_BSD ! # endif ! ! # if defined(ultrix) && defined(mips) ! # define decstation ! # endif ! ! # if defined (__SVR4) && !defined (SVR4) ! # define SVR4 ! # endif ! ! # if (defined(sun) && defined(SVR4)) || defined (SOLARIS2) ! # define SUNOS_5 ! # endif ! ! # if defined (__osf__) && (defined (__alpha) || defined (__alpha__)) ! # define OSF_ALPHA ! # include ! # include ! # include ! # include ! # endif ! ! # if defined (__osf__) && (defined (mips) || defined (__mips__)) ! # define OSF_MIPS ! # include ! # endif /* UTek's /bin/cc on the 4300 has no architecture specific cpp define by default, but _MACH_IND_SYS_TYPES is defined in . Combine that with a couple of other things and we'll have a unique match. */ ! # if !defined (tek4300) && defined (unix) && defined (m68k) && defined (mc68000) && defined (mc68020) && defined (_MACH_IND_SYS_TYPES) ! # define tek4300 /* Define by emacs, but not by other users. */ ! # endif /* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */ ! # ifndef LOAD_AVE_TYPE ! # ifdef MORE_BSD ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef sun ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef decstation ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef _SEQUENT_ ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef sgi ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef SVR4 ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef sony_news ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef sequent ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef OSF_ALPHA ! # define LOAD_AVE_TYPE long ! # endif ! ! # if defined (ardent) && defined (titan) ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef tek4300 ! # define LOAD_AVE_TYPE long ! # endif ! ! # if defined(alliant) && defined(i860) /* Alliant FX/2800 */ ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef _AIX ! # define LOAD_AVE_TYPE long ! # endif ! ! # ifdef convex ! # define LOAD_AVE_TYPE double ! # ifndef LDAV_CVT ! # define LDAV_CVT(n) (n) ! # endif ! # endif ! # endif /* No LOAD_AVE_TYPE. */ ! # ifdef OSF_ALPHA /* defines an incorrect value for FSCALE on Alpha OSF/1, according to ghazi@noc.rutgers.edu. */ ! # undef FSCALE ! # define FSCALE 1024.0 ! # endif ! # if defined(alliant) && defined(i860) /* Alliant FX/2800 */ /* defines an incorrect value for FSCALE on an Alliant FX/2800 Concentrix 2.2, according to ghazi@noc.rutgers.edu. */ ! # undef FSCALE ! # define FSCALE 100.0 ! # endif ! # ifndef FSCALE /* SunOS and some others define FSCALE in sys/param.h. */ ! # ifdef MORE_BSD ! # define FSCALE 2048.0 ! # endif ! ! # if defined(MIPS) || defined(SVR4) || defined(decstation) ! # define FSCALE 256 ! # endif ! # if defined (sgi) || defined (sequent) /* Sometimes both MIPS and sgi are defined, so FSCALE was just defined above under #ifdef MIPS. But we want the sgi value. */ ! # undef FSCALE ! # define FSCALE 1000.0 ! # endif ! ! # if defined (ardent) && defined (titan) ! # define FSCALE 65536.0 ! # endif ! ! # ifdef tek4300 ! # define FSCALE 100.0 ! # endif ! ! # ifdef _AIX ! # define FSCALE 65536.0 ! # endif ! ! # endif /* Not FSCALE. */ ! ! # if !defined (LDAV_CVT) && defined (FSCALE) ! # define LDAV_CVT(n) (((double) (n)) / FSCALE) ! # endif /* VAX C can't handle multi-line #ifs, or lines longer that 256 characters. */ ! # ifndef NLIST_STRUCT ! # ifdef MORE_BSD ! # define NLIST_STRUCT ! # endif ! # ifdef sun ! # define NLIST_STRUCT ! # endif ! # ifdef decstation ! # define NLIST_STRUCT ! # endif ! # ifdef hpux ! # define NLIST_STRUCT ! # endif ! # if defined (_SEQUENT_) || defined (sequent) ! # define NLIST_STRUCT ! # endif ! # ifdef sgi ! # define NLIST_STRUCT ! # endif ! # ifdef SVR4 ! # define NLIST_STRUCT ! # endif ! # ifdef sony_news ! # define NLIST_STRUCT ! # endif ! # ifdef OSF_ALPHA ! # define NLIST_STRUCT ! # endif ! # if defined (ardent) && defined (titan) ! # define NLIST_STRUCT ! # endif ! # ifdef tek4300 ! # define NLIST_STRUCT ! # endif ! # ifdef butterfly ! # define NLIST_STRUCT ! # endif ! # if defined(alliant) && defined(i860) /* Alliant FX/2800 */ ! # define NLIST_STRUCT ! # endif ! # ifdef _AIX ! # define NLIST_STRUCT ! # endif ! # endif /* defined (NLIST_STRUCT) */ ! # if defined(sgi) || (defined(mips) && !defined(BSD)) ! # define FIXUP_KERNEL_SYMBOL_ADDR(nl) ((nl)[0].n_value &= ~(1 << 31)) ! # endif ! # if !defined (KERNEL_FILE) && defined (sequent) ! # define KERNEL_FILE "/dynix" ! # endif ! # if !defined (KERNEL_FILE) && defined (hpux) ! # define KERNEL_FILE "/hp-ux" ! # endif ! # if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || (defined (ardent) && defined (titan))) ! # define KERNEL_FILE "/unix" ! # endif ! # if !defined (LDAV_SYMBOL) && defined (alliant) ! # define LDAV_SYMBOL "_Loadavg" ! # endif ! # if !defined(LDAV_SYMBOL) && ((defined(hpux) && !defined(hp9000s300)) || defined(_SEQUENT_) || defined(SVR4) || defined(ISC) || defined(sgi) || (defined (ardent) && defined (titan)) || defined (_AIX)) ! # define LDAV_SYMBOL "avenrun" ! # endif ! # ifdef HAVE_UNISTD_H ! # include ! # endif ! # include /* LOAD_AVE_TYPE should only get defined if we're going to use the nlist method. */ ! # if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL)) ! # define LOAD_AVE_TYPE double ! # endif ! ! # ifdef LOAD_AVE_TYPE ! ! # ifndef VMS ! # ifndef __linux__ ! # ifndef NLIST_STRUCT ! # include ! # else /* NLIST_STRUCT */ ! # include ! # endif /* NLIST_STRUCT */ ! ! # ifdef SUNOS_5 ! # include ! # include ! # include ! # endif ! ! # if defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC) ! # include ! # endif ! ! # ifndef KERNEL_FILE ! # define KERNEL_FILE "/vmunix" ! # endif /* KERNEL_FILE */ ! ! # ifndef LDAV_SYMBOL ! # define LDAV_SYMBOL "_avenrun" ! # endif /* LDAV_SYMBOL */ ! # endif /* __linux__ */ ! ! # else /* VMS */ ! ! # ifndef eunice ! # include ! # include ! # else /* eunice */ ! # include ! # endif /* eunice */ ! # endif /* VMS */ ! ! # ifndef LDAV_CVT ! # define LDAV_CVT(n) ((double) (n)) ! # endif /* !LDAV_CVT */ ! ! # endif /* LOAD_AVE_TYPE */ ! ! # if defined(__GNU__) && !defined (NeXT) ! /* Note that NeXT Openstep defines __GNU__ even though it should not. */ ! /* GNU system acts much like NeXT, for load average purposes, ! but not exactly. */ ! # define NeXT ! # define host_self mach_host_self ! # endif ! ! # ifdef NeXT ! # ifdef HAVE_MACH_MACH_H ! # include ! # else ! # include ! # endif ! # endif /* NeXT */ ! ! # ifdef sgi ! # include ! # endif /* sgi */ ! ! # ifdef UMAX ! # include ! # include ! # include ! # include ! # include ! ! # ifdef UMAX_43 ! # include ! # include ! # include ! # include ! # include ! # else /* Not UMAX_43. */ ! # include ! # include ! # include ! # include ! # include ! # include ! # endif /* Not UMAX_43. */ ! # endif /* UMAX */ ! ! # ifdef DGUX ! # include ! # endif ! ! # if defined(HAVE_FCNTL_H) || defined(_POSIX_VERSION) ! # include ! # else ! # include ! # endif /* Avoid static vars inside a function since in HPUX they dump as pure. */ ! # ifdef NeXT static processor_set_t default_set; static int getloadavg_initialized; ! # endif /* NeXT */ ! # ifdef UMAX static unsigned int cpus = 0; static unsigned int samples; ! # endif /* UMAX */ ! # ifdef DGUX static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */ ! # endif /* DGUX */ ! # ifdef LOAD_AVE_TYPE /* File descriptor open to /dev/kmem or VMS load ave driver. */ static int channel; /* Nonzero iff channel is valid. */ *************** *** 486,500 **** /* Offset in kmem to seek to read load average, or 0 means invalid. */ static long offset; ! #if !defined(VMS) && !defined(sgi) static struct nlist nl[2]; ! #endif /* Not VMS or sgi */ ! #ifdef SUNOS_5 static kvm_t *kd; ! #endif /* SUNOS_5 */ ! #endif /* LOAD_AVE_TYPE */ /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. --- 524,538 ---- /* Offset in kmem to seek to read load average, or 0 means invalid. */ static long offset; ! # if !defined(VMS) && !defined(sgi) && !defined(__linux__) static struct nlist nl[2]; ! # endif /* Not VMS or sgi */ ! # ifdef SUNOS_5 static kvm_t *kd; ! # endif /* SUNOS_5 */ ! # endif /* LOAD_AVE_TYPE */ /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. *************** *** 508,528 **** { int elem = 0; /* Return value. */ ! #ifdef NO_GET_LOAD_AVG ! #define LDAV_DONE /* Set errno to zero to indicate that there was no particular error; this function just can't work at all on this system. */ errno = 0; elem = -1; ! #endif ! #if !defined (LDAV_DONE) && defined (__linux__) ! #define LDAV_DONE ! #undef LOAD_AVE_TYPE ! #ifndef LINUX_LDAV_FILE ! #define LINUX_LDAV_FILE "/proc/loadavg" ! #endif char ldavgbuf[40]; double load_ave[3]; --- 546,630 ---- { int elem = 0; /* Return value. */ ! # ifdef NO_GET_LOAD_AVG ! # define LDAV_DONE /* Set errno to zero to indicate that there was no particular error; this function just can't work at all on this system. */ errno = 0; elem = -1; ! # endif ! # if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT) ! /* Use libkstat because we don't have to be root. */ ! # define LDAV_DONE ! kstat_ctl_t *kc; ! kstat_t *ksp; ! kstat_named_t *kn; ! ! kc = kstat_open (); ! if (kc == 0) ! return -1; ! ksp = kstat_lookup (kc, "unix", 0, "system_misc"); ! if (ksp == 0 ) ! return -1; ! if (kstat_read (kc, ksp, 0) == -1) ! return -1; ! ! kn = kstat_data_lookup (ksp, "avenrun_1min"); ! if (kn == 0) ! { ! /* Return -1 if no load average information is available. */ ! nelem = 0; ! elem = -1; ! } ! ! if (nelem >= 1) ! loadavg[elem++] = (double) kn->value.ul/FSCALE; ! ! if (nelem >= 2) ! { ! kn = kstat_data_lookup (ksp, "avenrun_5min"); ! if (kn != 0) ! { ! loadavg[elem++] = (double) kn->value.ul/FSCALE; ! ! if (nelem >= 3) ! { ! kn = kstat_data_lookup (ksp, "avenrun_15min"); ! if (kn != 0) ! loadavg[elem++] = (double) kn->value.ul/FSCALE; ! } ! } ! } ! ! kstat_close (kc); ! # endif /* HAVE_LIBKSTAT */ ! ! # if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC) ! /* Use pstat_getdynamic() because we don't have to be root. */ ! # define LDAV_DONE ! # undef LOAD_AVE_TYPE ! ! struct pst_dynamic dyn_info; ! if (pstat_getdynamic (&dyn_info, sizeof (dyn_info), 0, 0) < 0) ! return -1; ! if (nelem > 0) ! loadavg[elem++] = dyn_info.psd_avg_1_min; ! if (nelem > 1) ! loadavg[elem++] = dyn_info.psd_avg_5_min; ! if (nelem > 2) ! loadavg[elem++] = dyn_info.psd_avg_15_min; ! ! # endif /* hpux && HAVE_PSTAT_GETDYNAMIC */ ! ! # if !defined (LDAV_DONE) && defined (__linux__) ! # define LDAV_DONE ! # undef LOAD_AVE_TYPE ! ! # ifndef LINUX_LDAV_FILE ! # define LINUX_LDAV_FILE "/proc/loadavg" ! # endif char ldavgbuf[40]; double load_ave[3]; *************** *** 546,560 **** return elem; ! #endif /* __linux__ */ ! #if !defined (LDAV_DONE) && defined (__NetBSD__) ! #define LDAV_DONE ! #undef LOAD_AVE_TYPE ! ! #ifndef NETBSD_LDAV_FILE ! #define NETBSD_LDAV_FILE "/kern/loadavg" ! #endif unsigned long int load_ave[3], scale; int count; --- 648,662 ---- return elem; ! # endif /* __linux__ */ ! # if !defined (LDAV_DONE) && defined (__NetBSD__) ! # define LDAV_DONE ! # undef LOAD_AVE_TYPE ! ! # ifndef NETBSD_LDAV_FILE ! # define NETBSD_LDAV_FILE "/kern/loadavg" ! # endif unsigned long int load_ave[3], scale; int count; *************** *** 575,584 **** return elem; ! #endif /* __NetBSD__ */ ! #if !defined (LDAV_DONE) && defined (NeXT) ! #define LDAV_DONE /* The NeXT code was adapted from iscreen 3.2. */ host_t host; --- 677,686 ---- return elem; ! # endif /* __NetBSD__ */ ! # if !defined (LDAV_DONE) && defined (NeXT) ! # define LDAV_DONE /* The NeXT code was adapted from iscreen 3.2. */ host_t host; *************** *** 598,604 **** { info_count = PROCESSOR_SET_BASIC_INFO_COUNT; if (processor_set_info (default_set, PROCESSOR_SET_BASIC_INFO, &host, ! (processor_set_info_t) &info, &info_count) != KERN_SUCCESS) getloadavg_initialized = 0; else --- 700,706 ---- { info_count = PROCESSOR_SET_BASIC_INFO_COUNT; if (processor_set_info (default_set, PROCESSOR_SET_BASIC_INFO, &host, ! (processor_set_info_t) &info, &info_count) != KERN_SUCCESS) getloadavg_initialized = 0; else *************** *** 610,619 **** if (!getloadavg_initialized) return -1; ! #endif /* NeXT */ ! #if !defined (LDAV_DONE) && defined (UMAX) ! #define LDAV_DONE /* UMAX 4.2, which runs on the Encore Multimax multiprocessor, does not have a /dev/kmem. Information about the workings of the running kernel can be gathered with inq_stats system calls. --- 712,721 ---- if (!getloadavg_initialized) return -1; ! # endif /* NeXT */ ! # if !defined (LDAV_DONE) && defined (UMAX) ! # define LDAV_DONE /* UMAX 4.2, which runs on the Encore Multimax multiprocessor, does not have a /dev/kmem. Information about the workings of the running kernel can be gathered with inq_stats system calls. *************** *** 680,689 **** if (nelem > 0) loadavg[elem++] = load / samples / cpus; ! #endif /* UMAX */ ! #if !defined (LDAV_DONE) && defined (DGUX) ! #define LDAV_DONE /* This call can return -1 for an error, but with good args it's not supposed to fail. The first argument is for no apparent reason of type `long int *'. */ --- 782,791 ---- if (nelem > 0) loadavg[elem++] = load / samples / cpus; ! # endif /* UMAX */ ! # if !defined (LDAV_DONE) && defined (DGUX) ! # define LDAV_DONE /* This call can return -1 for an error, but with good args it's not supposed to fail. The first argument is for no apparent reason of type `long int *'. */ *************** *** 697,706 **** loadavg[elem++] = load_info.five_minute; if (nelem > 2) loadavg[elem++] = load_info.fifteen_minute; ! #endif /* DGUX */ ! #if !defined (LDAV_DONE) && defined (apollo) ! #define LDAV_DONE /* Apollo code from lisch@mentorg.com (Ray Lischner). This system call is not documented. The load average is obtained as --- 799,808 ---- loadavg[elem++] = load_info.five_minute; if (nelem > 2) loadavg[elem++] = load_info.fifteen_minute; ! # endif /* DGUX */ ! # if !defined (LDAV_DONE) && defined (apollo) ! # define LDAV_DONE /* Apollo code from lisch@mentorg.com (Ray Lischner). This system call is not documented. The load average is obtained as *************** *** 722,731 **** loadavg[elem++] = load_ave[1] / 65536.0; if (nelem > 2) loadavg[elem++] = load_ave[2] / 65536.0; ! #endif /* apollo */ ! #if !defined (LDAV_DONE) && defined (OSF_MIPS) ! #define LDAV_DONE struct tbl_loadavg load_ave; table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); --- 824,833 ---- loadavg[elem++] = load_ave[1] / 65536.0; if (nelem > 2) loadavg[elem++] = load_ave[2] / 65536.0; ! # endif /* apollo */ ! # if !defined (LDAV_DONE) && defined (OSF_MIPS) ! # define LDAV_DONE struct tbl_loadavg load_ave; table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); *************** *** 733,752 **** = (load_ave.tl_lscale == 0 ? load_ave.tl_avenrun.d[0] : (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale)); ! #endif /* OSF_MIPS */ ! #if !defined (LDAV_DONE) && (defined (MSDOS) || defined (WIN32)) ! #define LDAV_DONE /* A faithful emulation is going to have to be saved for a rainy day. */ for ( ; elem < nelem; elem++) { loadavg[elem] = 0.0; } ! #endif /* MSDOS */ ! #if !defined (LDAV_DONE) && defined (OSF_ALPHA) ! #define LDAV_DONE struct tbl_loadavg load_ave; table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); --- 835,854 ---- = (load_ave.tl_lscale == 0 ? load_ave.tl_avenrun.d[0] : (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale)); ! # endif /* OSF_MIPS */ ! # if !defined (LDAV_DONE) && (defined (__MSDOS__) || defined (WINDOWS32)) ! # define LDAV_DONE /* A faithful emulation is going to have to be saved for a rainy day. */ for ( ; elem < nelem; elem++) { loadavg[elem] = 0.0; } ! # endif /* __MSDOS__ || WINDOWS32 */ ! # if !defined (LDAV_DONE) && defined (OSF_ALPHA) ! # define LDAV_DONE struct tbl_loadavg load_ave; table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); *************** *** 755,785 **** = (load_ave.tl_lscale == 0 ? load_ave.tl_avenrun.d[elem] : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale)); ! #endif /* OSF_ALPHA */ ! #if !defined (LDAV_DONE) && defined (VMS) /* VMS specific code -- read from the Load Ave driver. */ LOAD_AVE_TYPE load_ave[3]; static int getloadavg_initialized = 0; ! #ifdef eunice struct { int dsc$w_length; char *dsc$a_pointer; } descriptor; ! #endif /* Ensure that there is a channel open to the load ave device. */ if (!getloadavg_initialized) { /* Attempt to open the channel. */ ! #ifdef eunice descriptor.dsc$w_length = 18; descriptor.dsc$a_pointer = "$$VMS_LOAD_AVERAGE"; ! #else $DESCRIPTOR (descriptor, "LAV0:"); ! #endif if (sys$assign (&descriptor, &channel, 0, 0) & 1) getloadavg_initialized = 1; } --- 857,887 ---- = (load_ave.tl_lscale == 0 ? load_ave.tl_avenrun.d[elem] : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale)); ! # endif /* OSF_ALPHA */ ! # if !defined (LDAV_DONE) && defined (VMS) /* VMS specific code -- read from the Load Ave driver. */ LOAD_AVE_TYPE load_ave[3]; static int getloadavg_initialized = 0; ! # ifdef eunice struct { int dsc$w_length; char *dsc$a_pointer; } descriptor; ! # endif /* Ensure that there is a channel open to the load ave device. */ if (!getloadavg_initialized) { /* Attempt to open the channel. */ ! # ifdef eunice descriptor.dsc$w_length = 18; descriptor.dsc$a_pointer = "$$VMS_LOAD_AVERAGE"; ! # else $DESCRIPTOR (descriptor, "LAV0:"); ! # endif if (sys$assign (&descriptor, &channel, 0, 0) & 1) getloadavg_initialized = 1; } *************** *** 795,870 **** if (!getloadavg_initialized) return -1; ! #endif /* VMS */ ! #if !defined (LDAV_DONE) && defined(LOAD_AVE_TYPE) && !defined(VMS) /* UNIX-specific code -- read the average from /dev/kmem. */ ! #define LDAV_PRIVILEGED /* This code requires special installation. */ LOAD_AVE_TYPE load_ave[3]; /* Get the address of LDAV_SYMBOL. */ if (offset == 0) { ! #ifndef sgi ! #ifndef NLIST_STRUCT strcpy (nl[0].n_name, LDAV_SYMBOL); strcpy (nl[1].n_name, ""); ! #else /* NLIST_STRUCT */ ! #ifdef NLIST_NAME_UNION nl[0].n_un.n_name = LDAV_SYMBOL; nl[1].n_un.n_name = 0; ! #else /* not NLIST_NAME_UNION */ nl[0].n_name = LDAV_SYMBOL; nl[1].n_name = 0; ! #endif /* not NLIST_NAME_UNION */ ! #endif /* NLIST_STRUCT */ ! #ifndef SUNOS_5 if ( ! #if !(defined (_AIX) && !defined (ps2)) nlist (KERNEL_FILE, nl) ! #else /* _AIX */ knlist (nl, 1, sizeof (nl[0])) ! #endif >= 0) /* Omit "&& nl[0].n_type != 0 " -- it breaks on Sun386i. */ { ! #ifdef FIXUP_KERNEL_SYMBOL_ADDR FIXUP_KERNEL_SYMBOL_ADDR (nl); ! #endif offset = nl[0].n_value; } ! #endif /* !SUNOS_5 */ ! #else /* sgi */ ! int ldav_off; ! ! ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN); ! if (ldav_off != -1) ! offset = (long) ldav_off & 0x7fffffff; ! #endif /* sgi */ ! } /* Make sure we have /dev/kmem open. */ if (!getloadavg_initialized) { ! #ifndef SUNOS_5 channel = open ("/dev/kmem", 0); if (channel >= 0) { /* Set the channel to close on exec, so it does not litter any child's descriptor table. */ ! #ifdef FD_SETFD ! #ifndef FD_CLOEXEC ! #define FD_CLOEXEC 1 ! #endif (void) fcntl (channel, F_SETFD, FD_CLOEXEC); ! #endif getloadavg_initialized = 1; } ! #else /* SUNOS_5 */ /* We pass 0 for the kernel, corefile, and swapfile names to use the currently running kernel. */ kd = kvm_open (0, 0, 0, O_RDONLY, 0); --- 897,972 ---- if (!getloadavg_initialized) return -1; ! # endif /* VMS */ ! # if !defined (LDAV_DONE) && defined(LOAD_AVE_TYPE) && !defined(VMS) /* UNIX-specific code -- read the average from /dev/kmem. */ ! # define LDAV_PRIVILEGED /* This code requires special installation. */ LOAD_AVE_TYPE load_ave[3]; /* Get the address of LDAV_SYMBOL. */ if (offset == 0) { ! # ifndef sgi ! # ifndef NLIST_STRUCT strcpy (nl[0].n_name, LDAV_SYMBOL); strcpy (nl[1].n_name, ""); ! # else /* NLIST_STRUCT */ ! # ifdef NLIST_NAME_UNION nl[0].n_un.n_name = LDAV_SYMBOL; nl[1].n_un.n_name = 0; ! # else /* not NLIST_NAME_UNION */ nl[0].n_name = LDAV_SYMBOL; nl[1].n_name = 0; ! # endif /* not NLIST_NAME_UNION */ ! # endif /* NLIST_STRUCT */ ! # ifndef SUNOS_5 if ( ! # if !(defined (_AIX) && !defined (ps2)) nlist (KERNEL_FILE, nl) ! # else /* _AIX */ knlist (nl, 1, sizeof (nl[0])) ! # endif >= 0) /* Omit "&& nl[0].n_type != 0 " -- it breaks on Sun386i. */ { ! # ifdef FIXUP_KERNEL_SYMBOL_ADDR FIXUP_KERNEL_SYMBOL_ADDR (nl); ! # endif offset = nl[0].n_value; } ! # endif /* !SUNOS_5 */ ! # else /* sgi */ ! int ldav_off; ! ! ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN); ! if (ldav_off != -1) ! offset = (long) ldav_off & 0x7fffffff; ! # endif /* sgi */ ! } /* Make sure we have /dev/kmem open. */ if (!getloadavg_initialized) { ! # ifndef SUNOS_5 channel = open ("/dev/kmem", 0); if (channel >= 0) { /* Set the channel to close on exec, so it does not litter any child's descriptor table. */ ! # ifdef FD_SETFD ! # ifndef FD_CLOEXEC ! # define FD_CLOEXEC 1 ! # endif (void) fcntl (channel, F_SETFD, FD_CLOEXEC); ! # endif getloadavg_initialized = 1; } ! # else /* SUNOS_5 */ /* We pass 0 for the kernel, corefile, and swapfile names to use the currently running kernel. */ kd = kvm_open (0, 0, 0, O_RDONLY, 0); *************** *** 875,888 **** offset = nl[0].n_value; getloadavg_initialized = 1; } ! #endif /* SUNOS_5 */ } /* If we can, get the load average values. */ if (offset && getloadavg_initialized) { /* Try to read the load. */ ! #ifndef SUNOS_5 if (lseek (channel, offset, 0) == -1L || read (channel, (char *) load_ave, sizeof (load_ave)) != sizeof (load_ave)) --- 977,990 ---- offset = nl[0].n_value; getloadavg_initialized = 1; } ! # endif /* SUNOS_5 */ } /* If we can, get the load average values. */ if (offset && getloadavg_initialized) { /* Try to read the load. */ ! # ifndef SUNOS_5 if (lseek (channel, offset, 0) == -1L || read (channel, (char *) load_ave, sizeof (load_ave)) != sizeof (load_ave)) *************** *** 890,910 **** close (channel); getloadavg_initialized = 0; } ! #else /* SUNOS_5 */ if (kvm_read (kd, offset, (char *) load_ave, sizeof (load_ave)) != sizeof (load_ave)) { kvm_close (kd); getloadavg_initialized = 0; } ! #endif /* SUNOS_5 */ } if (offset == 0 || !getloadavg_initialized) return -1; ! #endif /* LOAD_AVE_TYPE and not VMS */ ! #if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) /* Including VMS. */ if (nelem > 0) loadavg[elem++] = LDAV_CVT (load_ave[0]); if (nelem > 1) --- 992,1012 ---- close (channel); getloadavg_initialized = 0; } ! # else /* SUNOS_5 */ if (kvm_read (kd, offset, (char *) load_ave, sizeof (load_ave)) != sizeof (load_ave)) { kvm_close (kd); getloadavg_initialized = 0; } ! # endif /* SUNOS_5 */ } if (offset == 0 || !getloadavg_initialized) return -1; ! # endif /* LOAD_AVE_TYPE and not VMS */ ! # if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) /* Including VMS. */ if (nelem > 0) loadavg[elem++] = LDAV_CVT (load_ave[0]); if (nelem > 1) *************** *** 912,928 **** if (nelem > 2) loadavg[elem++] = LDAV_CVT (load_ave[2]); ! #define LDAV_DONE ! #endif /* !LDAV_DONE && LOAD_AVE_TYPE */ ! #ifdef LDAV_DONE return elem; ! #else /* Set errno to zero to indicate that there was no particular error; this function just can't work at all on this system. */ errno = 0; return -1; ! #endif } #endif /* ! HAVE_GETLOADAVG */ --- 1014,1030 ---- if (nelem > 2) loadavg[elem++] = LDAV_CVT (load_ave[2]); ! # define LDAV_DONE ! # endif /* !LDAV_DONE && LOAD_AVE_TYPE */ ! # ifdef LDAV_DONE return elem; ! # else /* Set errno to zero to indicate that there was no particular error; this function just can't work at all on this system. */ errno = 0; return -1; ! # endif } #endif /* ! HAVE_GETLOADAVG */ diff -crP ../make-3.75/getopt.c ./getopt.c *** ../make-3.75/getopt.c Wed Aug 28 17:11:44 1996 --- ./getopt.c Fri Sep 5 17:01:56 1997 *************** *** 3,25 **** "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! ! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. ! This program 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, or (at your option) any ! later version. ! ! This program 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. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ --- 3,28 ---- "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! ! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. ! NOTE: The canonical source of this file is maintained with the GNU C Library. ! Bugs can be reported to bug-glibc@prep.ai.mit.edu. ! ! This program 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, or (at your option) any ! later version. ! ! This program 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. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ *************** *** 49,55 **** program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ ! #if defined (_LIBC) || !defined (__GNU_LIBRARY__) /* This needs to come after some library #include --- 52,66 ---- program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ ! #define GETOPT_INTERFACE_VERSION 2 ! #if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 ! #include ! #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION ! #define ELIDE_CODE ! #endif ! #endif ! ! #ifndef ELIDE_CODE /* This needs to come after some library #include *************** *** 68,74 **** #endif #endif ! #if defined (_WIN32) && !defined (__CYGWIN32__) /* It's not Unix, really. See? Capital letters. */ #include #define getpid() GetCurrentProcessId() --- 79,85 ---- #endif #endif ! #if defined (WINDOWS32) && !defined (__CYGWIN32__) /* It's not Unix, really. See? Capital letters. */ #include #define getpid() GetCurrentProcessId() *************** *** 115,128 **** On entry to `getopt', zero means this is the first call; initialize. ! When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ ! /* XXX 1003.2 says this must be 1 before any call. */ ! int optind = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. --- 126,145 ---- On entry to `getopt', zero means this is the first call; initialize. ! When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ ! /* 1003.2 says this must be 1 before any call. */ ! int optind = 1; ! ! /* Formerly, initialization of getopt depended on optind==0, which ! causes problems with re-calling getopt as programs generally don't ! know that. */ ! ! int __getopt_initialized = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. *************** *** 171,177 **** The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only ! `--' can cause `getopt' to return EOF with `optind' != ARGC. */ static enum { --- 188,194 ---- The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only ! `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { *************** *** 232,243 **** static int first_nonopt; static int last_nonopt; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ ! static const char *nonoption_flags; static int nonoption_flags_len; /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. --- 249,294 ---- static int first_nonopt; static int last_nonopt; + #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ ! /* Defined in getopt_init.c */ ! extern char *__getopt_nonoption_flags; ! ! static int nonoption_flags_max_len; static int nonoption_flags_len; + static int original_argc; + static char *const *original_argv; + + extern pid_t __libc_pid; + + /* Make sure the environment variable bash 2.0 puts in the environment + is valid for the getopt call we must make sure that the ARGV passed + to getopt is that one passed to the process. */ + static void + __attribute__ ((unused)) + store_args_and_env (int argc, char *const *argv) + { + /* XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ + original_argc = argc; + original_argv = argv; + } + text_set_element (__libc_subinit, store_args_and_env); + + # define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } + #else /* !_LIBC */ + # define SWAP_FLAGS(ch1, ch2) + #endif /* _LIBC */ + /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. *************** *** 265,270 **** --- 316,343 ---- It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ + #ifdef _LIBC + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); + memset (&new_str[nonoption_flags_max_len], '\0', + top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } + #endif + while (top > middle && middle > bottom) { if (top - middle > middle - bottom) *************** *** 279,284 **** --- 352,358 ---- tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; *************** *** 295,300 **** --- 369,375 ---- tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; *************** *** 310,326 **** /* Initialize the internal data when the first call is made. */ #if defined (__STDC__) && __STDC__ ! static const char *_getopt_initialize (const char *); #endif static const char * ! _getopt_initialize (optstring) const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ ! first_nonopt = last_nonopt = optind = 1; nextchar = NULL; --- 385,403 ---- /* Initialize the internal data when the first call is made. */ #if defined (__STDC__) && __STDC__ ! static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * ! _getopt_initialize (argc, argv, optstring) ! int argc; ! char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ ! first_nonopt = last_nonopt = optind; nextchar = NULL; *************** *** 343,362 **** else ordering = PERMUTE; ! if (posixly_correct == NULL) { ! /* Bash 2.0 puts a special variable in the environment for each ! command it runs, specifying which ARGV elements are the results of ! file name wildcard expansion and therefore should not be ! considered as options. */ ! char var[100]; ! sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ()); ! nonoption_flags = getenv (var); ! if (nonoption_flags == NULL) ! nonoption_flags_len = 0; ! else ! nonoption_flags_len = strlen (nonoption_flags); } return optstring; } --- 420,457 ---- else ordering = PERMUTE; ! #ifdef _LIBC ! if (posixly_correct == NULL ! && argc == original_argc && argv == original_argv) { ! if (nonoption_flags_max_len == 0) ! { ! if (__getopt_nonoption_flags == NULL ! || __getopt_nonoption_flags[0] == '\0') ! nonoption_flags_max_len = -1; ! else ! { ! const char *orig_str = __getopt_nonoption_flags; ! int len = nonoption_flags_max_len = strlen (orig_str); ! if (nonoption_flags_max_len < argc) ! nonoption_flags_max_len = argc; ! __getopt_nonoption_flags = ! (char *) malloc (nonoption_flags_max_len); ! if (__getopt_nonoption_flags == NULL) ! nonoption_flags_max_len = -1; ! else ! { ! memcpy (__getopt_nonoption_flags, orig_str, len); ! memset (&__getopt_nonoption_flags[len], '\0', ! nonoption_flags_max_len - len); ! } ! } ! } ! nonoption_flags_len = nonoption_flags_max_len; } + else + nonoption_flags_len = 0; + #endif return optstring; } *************** *** 374,380 **** updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. ! If there are no more option characters, `getopt' returns `EOF'. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) --- 469,475 ---- updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. ! If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) *************** *** 428,445 **** { optarg = NULL; ! if (optind == 0) { ! optstring = _getopt_initialize (optstring); ! optind = 1; /* Don't scan ARGV[0], the program name. */ } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag ! from the shell indicating it is not an option. */ #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ ! && nonoption_flags[optind] == '1')) if (nextchar == NULL || *nextchar == '\0') { --- 523,547 ---- { optarg = NULL; ! if (optind == 0 || !__getopt_initialized) { ! if (optind == 0) ! optind = 1; /* Don't scan ARGV[0], the program name. */ ! optstring = _getopt_initialize (argc, argv, optstring); ! __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag ! from the shell indicating it is not an option. The later information ! is only used when the used in the GNU libc. */ ! #ifdef _LIBC #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ ! && __getopt_nonoption_flags[optind] == '1')) ! #else ! #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') ! #endif if (nextchar == NULL || *nextchar == '\0') { *************** *** 497,503 **** that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; ! return EOF; } /* If we have come to a non-option and did not permute it, --- 599,605 ---- that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; ! return -1; } /* If we have come to a non-option and did not permute it, *************** *** 506,512 **** if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) ! return EOF; optarg = argv[optind++]; return 1; } --- 608,614 ---- if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) ! return -1; optarg = argv[optind++]; return 1; } *************** *** 542,548 **** const struct option *pfound = NULL; int exact = 0; int ambig = 0; ! int indfound; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) --- 644,650 ---- const struct option *pfound = NULL; int exact = 0; int ambig = 0; ! int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) *************** *** 553,559 **** for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { ! if (nameend - nextchar == strlen (p->name)) { /* Exact match found. */ pfound = p; --- 655,662 ---- for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { ! if ((unsigned int) (nameend - nextchar) ! == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; *************** *** 689,694 **** --- 792,921 ---- optopt = c; return '?'; } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr) + { + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, _("%s: option requires an argument -- %c\n"), + argv[0], c); + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (opterr) + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (opterr) + fprintf (stderr, _("\ + %s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (opterr) + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } if (temp[1] == ':') { if (temp[2] == ':') *************** *** 751,757 **** 0); } ! #endif /* _LIBC or not __GNU_LIBRARY__. */ #ifdef TEST --- 978,984 ---- 0); } ! #endif /* Not ELIDE_CODE. */ #ifdef TEST *************** *** 771,777 **** int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); ! if (c == EOF) break; switch (c) --- 998,1004 ---- int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); ! if (c == -1) break; switch (c) diff -crP ../make-3.75/getopt.h ./getopt.h *** ../make-3.75/getopt.h Wed Feb 28 02:39:54 1996 --- ./getopt.h Tue Sep 16 10:17:30 1997 *************** *** 1,20 **** /* Declarations for getopt. ! Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. ! This program 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, or (at your option) any ! later version. ! ! This program 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. */ #ifndef _GETOPT_H #define _GETOPT_H 1 --- 1,23 ---- /* Declarations for getopt. ! Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. ! NOTE: The canonical source of this file is maintained with the GNU C Library. ! Bugs can be reported to bug-glibc@prep.ai.mit.edu. ! ! This program 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, or (at your option) any ! later version. ! ! This program 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. */ #ifndef _GETOPT_H #define _GETOPT_H 1 *************** *** 37,43 **** On entry to `getopt', zero means this is the first call; initialize. ! When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next --- 40,46 ---- On entry to `getopt', zero means this is the first call; initialize. ! When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next diff -crP ../make-3.75/getopt1.c ./getopt1.c *** ../make-3.75/getopt1.c Wed Feb 28 02:39:54 1996 --- ./getopt1.c Thu Sep 4 17:01:51 1997 *************** *** 1,21 **** /* getopt_long and getopt_long_only entry points for GNU getopt. ! Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994 ! Free Software Foundation, Inc. ! This program 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, or (at your option) any ! later version. ! ! This program 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. */ #ifdef HAVE_CONFIG_H #include --- 1,23 ---- /* getopt_long and getopt_long_only entry points for GNU getopt. ! Copyright (C) 1987,88,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. ! NOTE: The canonical source of this file is maintained with the GNU C Library. ! Bugs can be reported to bug-glibc@prep.ai.mit.edu. ! ! This program 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, or (at your option) any ! later version. ! ! This program 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. */ #ifdef HAVE_CONFIG_H #include *************** *** 41,55 **** program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ ! #if defined (_LIBC) || !defined (__GNU_LIBRARY__) /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include - #else - char *getenv (); #endif #ifndef NULL --- 43,63 ---- program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ ! #define GETOPT_INTERFACE_VERSION 2 ! #if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 ! #include ! #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION ! #define ELIDE_CODE ! #endif ! #endif ! ! #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL *************** *** 84,90 **** } ! #endif /* _LIBC or not __GNU_LIBRARY__. */ #ifdef TEST --- 92,98 ---- } ! #endif /* Not ELIDE_CODE. */ #ifdef TEST *************** *** 115,121 **** c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); ! if (c == EOF) break; switch (c) --- 123,129 ---- c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); ! if (c == -1) break; switch (c) diff -crP ../make-3.75/glob/COPYING.LIB ./glob/COPYING.LIB *** ../make-3.75/glob/COPYING.LIB Mon Jun 3 16:28:41 1991 --- ./glob/COPYING.LIB Thu Oct 7 20:11:55 1993 *************** *** 133,139 **** on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. ! 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an --- 133,139 ---- on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. ! 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an diff -crP ../make-3.75/glob/ChangeLog ./glob/ChangeLog *** ../make-3.75/glob/ChangeLog Wed Dec 31 19:00:00 1969 --- ./glob/ChangeLog Mon Aug 18 14:11:37 1997 *************** *** 0 **** --- 1,44 ---- + Tue Aug 12 10:52:34 1997 Paul D. Smith + + * configure.in: Require autoconf 2.12. + + * glob: Updates from latest GNU libc glob code. + + * glob.c,glob.h,fnmatch.h: Change all WIN32 references to WINDOWS32. + + * glob.h: OSF4 defines macros in such a way that GLOB_ALTDIRFUNC + is not defined. Added a test to the #if which defines it if + _GNU_SOURCE is defined; that's set by both glob.c and GNU make. + + * glob.c: SunOS4 w/ cc needs #include , since assert.h + requires stderr but doesn't include stdio.h :-/. + (next_brace_sub): De-protoize function definition. + (glob): Cast __alloca(); on SunOS4 it uses the default return type + of int. + (glob): Irix defines getlogin_r() to return a char*; move the + extern for that into the _LIBC area since it isn't used except in + LIBC anyway. Likewise, move extern getlogin() into the "else". + + Sat Jul 20 21:55:31 1996 Roland McGrath + + Win32 hacks from . + * posix/glob.c [WIN32]: Don't include ; don't use d_ino; + use void * for my_realloc; include for alloca. + (glob) [WIN32]: Use "c:/users/default" for ~ if no HOME variable. + * posix/fnmatch.h [WIN32]: Use prototypes even if [!__STDC__]. + * posix/glob.h: Likewise. + + Fri Jul 19 16:56:41 1996 Roland McGrath + + * posix/glob.h [!_AMIGA && !VMS]: Check this instead of just [!_AMIGA] + for `struct stat;' forward decl. + + Sat Jun 22 10:44:09 1996 Roland McGrath + + * posix/glob.c: Include only [HAVE_ALLOCA_H], not [sparc]. + + Fri Jun 21 00:27:51 1996 Roland McGrath + + * posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr + only for ?s, not for *s. Fix from Chet Ramey. + diff -crP ../make-3.75/glob/Makefile.am ./glob/Makefile.am *** ../make-3.75/glob/Makefile.am Wed Dec 31 19:00:00 1969 --- ./glob/Makefile.am Mon Aug 18 14:11:38 1997 *************** *** 0 **** --- 1,10 ---- + # -*-Makefile-*-, or close enough + + AUTOMAKE_OPTIONS = 1.2 foreign + + noinst_LIBRARIES = libglob.a + + libglob_a_SOURCES = glob.c glob.h fnmatch.c fnmatch.h + + EXTRA_DIST = COPYING.LIB Makefile.ami SCOPTIONS SMakefile \ + configure.bat diff -crP ../make-3.75/glob/Makefile.in ./glob/Makefile.in *** ../make-3.75/glob/Makefile.in Mon Jan 16 15:49:01 1995 --- ./glob/Makefile.in Tue Sep 16 13:13:48 1997 *************** *** 1,66 **** ! # Makefile for standalone distribution of libglob.a (fnmatch, glob). ! # Copyright (C) 1991, 92, 93, 94, 95 Free Software Foundation, Inc. ! # This file is part of the GNU C Library. ! # This library is free software; you can redistribute it and/or ! # modify it under the terms of the GNU Library General Public License ! # as published by the Free Software Foundation; either version 2 of ! # the License, or (at your option) any later version. ! ! # This library 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 ! # Library General Public License for more details. ! ! # You should have received a copy of the GNU Library General Public ! # License along with this library; see the file COPYING.LIB. If ! # not, write to the Free Software Foundation, Inc., 675 Mass Ave, ! # Cambridge, MA 02139, USA. - # Ultrix 2.2 make doesn't expand the value of VPATH. - VPATH = @srcdir@ - # This must repeat the value, because configure will remove `VPATH = .'. srcdir = @srcdir@ CC = @CC@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ - # Information determined by configure. - DEFS = @DEFS@ ! # How to invoke ar. ! AR = @AR@ ! ARFLAGS = rv ! # How to invoke ranlib. ! RANLIB = @RANLIB@ ! .PHONY: all ! all: libglob.a ! libglob.a: glob.o fnmatch.o ! $(AR) $(ARFLAGS) $@ glob.o fnmatch.o ! $(RANLIB) $@ ! ! # For some reason, Unix make wants the dependencies on the source files. ! # Otherwise it refuses to use an implicit rule! ! # And, get this: it doesn't work to use $(srcdir)/foo.c!! ! glob.o: $(srcdir)/glob.h $(srcdir)/fnmatch.h glob.c ! fnmatch.o: $(srcdir)/fnmatch.h fnmatch.c .c.o: ! $(CC) -I. -I$(srcdir) -c \ ! $(DEFS) $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) ! .PHONY: clean realclean glob-clean glob-realclean distclean ! clean glob-clean: ! -rm -f libglob.a *.o core ! distclean glob-realclean: clean ! -rm -f TAGS tags Makefile config.status config.h config.log ! realcean: distclean ! ! # For inside the C library. ! glob.tar glob.tar.Z: ! $(MAKE) -C .. $@ --- 1,273 ---- ! # Makefile.in generated automatically by automake 1.2 from Makefile.am ! # Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ! # This Makefile.in is free software; the Free Software Foundation ! # gives unlimited permission to copy, distribute and modify it. ! # -*-Makefile-*-, or close enough ! ! ! SHELL = /bin/sh srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ + sbindir = @sbindir@ + libexecdir = @libexecdir@ + datadir = @datadir@ + sysconfdir = @sysconfdir@ + sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + + top_builddir = . + + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOMAKE = @AUTOMAKE@ + AUTOHEADER = @AUTOHEADER@ + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + transform = @program_transform_name@ + + NORMAL_INSTALL = true + PRE_INSTALL = true + POST_INSTALL = true + NORMAL_UNINSTALL = true + PRE_UNINSTALL = true + POST_UNINSTALL = true + AR = @AR@ CC = @CC@ + CPP = @CPP@ + MAKEINFO = @MAKEINFO@ + PACKAGE = @PACKAGE@ + RANLIB = @RANLIB@ + VERSION = @VERSION@ + + AUTOMAKE_OPTIONS = 1.2 foreign + + noinst_LIBRARIES = libglob.a + + libglob_a_SOURCES = glob.c glob.h fnmatch.c fnmatch.h + + EXTRA_DIST = COPYING.LIB Makefile.ami SCOPTIONS SMakefile \ + configure.bat + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs + CONFIG_CLEAN_FILES = + LIBRARIES = $(noinst_LIBRARIES) + + + DEFS = @DEFS@ -I. -I$(srcdir) CPPFLAGS = @CPPFLAGS@ + LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ + libglob_a_LIBADD = + libglob_a_OBJECTS = glob.o fnmatch.o CFLAGS = @CFLAGS@ + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) + LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + DIST_COMMON = COPYING.LIB ChangeLog Makefile.am Makefile.in aclocal.m4 \ + configure configure.in ! DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gtar ! GZIP = --best ! SOURCES = $(libglob_a_SOURCES) ! OBJECTS = $(libglob_a_OBJECTS) ! ! default: all ! ! .SUFFIXES: ! .SUFFIXES: .c .o ! $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ! cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile ! ! Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ! cd $(top_builddir) \ ! && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! ! $(ACLOCAL_M4): configure.in ! cd $(srcdir) && $(ACLOCAL) ! config.status: $(srcdir)/configure ! $(SHELL) ./config.status --recheck ! $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ! cd $(srcdir) && $(AUTOCONF) ! mostlyclean-noinstLIBRARIES: ! ! clean-noinstLIBRARIES: ! test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) ! ! distclean-noinstLIBRARIES: ! ! maintainer-clean-noinstLIBRARIES: .c.o: ! $(COMPILE) -c $< ! ! mostlyclean-compile: ! rm -f *.o core ! ! clean-compile: ! distclean-compile: ! rm -f *.tab.c ! ! maintainer-clean-compile: ! ! libglob.a: $(libglob_a_OBJECTS) $(libglob_a_DEPENDENCIES) ! rm -f libglob.a ! $(AR) cru libglob.a $(libglob_a_OBJECTS) $(libglob_a_LIBADD) ! $(RANLIB) libglob.a ! ! tags: TAGS ! ! ID: $(HEADERS) $(SOURCES) ! here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS) ! ! TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) ! tags=; \ ! here=`pwd`; \ ! test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$$tags" \ ! || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) -o $$here/TAGS) ! ! mostlyclean-tags: ! ! clean-tags: ! ! distclean-tags: ! rm -f TAGS ID ! ! maintainer-clean-tags: ! ! distdir = $(PACKAGE)-$(VERSION) ! top_distdir = $(distdir) ! ! # This target untars the dist file and tries a VPATH configuration. Then ! # it guarantees that the distribution is self-contained by making another ! # tarfile. ! distcheck: dist ! rm -rf $(distdir) ! GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz ! mkdir $(distdir)/=build ! mkdir $(distdir)/=inst ! dc_install_base=`cd $(distdir)/=inst && pwd`; \ ! cd $(distdir)/=build \ ! && ../configure --srcdir=.. --prefix=$$dc_install_base \ ! && $(MAKE) \ ! && $(MAKE) dvi \ ! && $(MAKE) check \ ! && $(MAKE) install \ ! && $(MAKE) installcheck \ ! && $(MAKE) dist ! rm -rf $(distdir) ! @echo "========================"; \ ! echo "$(distdir).tar.gz is ready for distribution"; \ ! echo "========================" ! dist: distdir ! -chmod -R a+r $(distdir) ! GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) ! rm -rf $(distdir) ! dist-all: distdir ! -chmod -R a+r $(distdir) ! GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) ! rm -rf $(distdir) ! distdir: $(DISTFILES) ! rm -rf $(distdir) ! mkdir $(distdir) ! -chmod 777 $(distdir) ! @for file in $(DISTFILES); do \ ! d=$(srcdir); \ ! test -f $(distdir)/$$file \ ! || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ ! || cp -p $$d/$$file $(distdir)/$$file; \ ! done ! fnmatch.o fnmatch.lo: fnmatch.c fnmatch.h ! glob.o glob.lo: glob.c fnmatch.h glob.h ! ! info: ! dvi: ! check: all ! $(MAKE) ! installcheck: ! install-exec: ! @$(NORMAL_INSTALL) ! ! install-data: ! @$(NORMAL_INSTALL) ! ! install: install-exec install-data all ! @: ! ! uninstall: ! ! all: Makefile $(LIBRARIES) ! ! install-strip: ! $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install ! installdirs: ! ! ! mostlyclean-generic: ! test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) ! ! clean-generic: ! test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) ! ! distclean-generic: ! rm -f Makefile $(DISTCLEANFILES) ! rm -f config.cache config.log stamp-h stamp-h[0-9]* ! test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ! ! maintainer-clean-generic: ! test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) ! test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) ! mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \ ! mostlyclean-tags mostlyclean-generic ! ! clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \ ! mostlyclean ! ! distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \ ! distclean-generic clean ! rm -f config.status ! ! maintainer-clean: maintainer-clean-noinstLIBRARIES \ ! maintainer-clean-compile maintainer-clean-tags \ ! maintainer-clean-generic distclean ! @echo "This command is intended for maintainers to use;" ! @echo "it deletes files that may require special tools to rebuild." ! rm -f config.status ! ! .PHONY: default mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ ! clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ ! mostlyclean-compile distclean-compile clean-compile \ ! maintainer-clean-compile tags mostlyclean-tags distclean-tags \ ! clean-tags maintainer-clean-tags distdir info dvi installcheck \ ! install-exec install-data install uninstall all installdirs \ ! mostlyclean-generic distclean-generic clean-generic \ ! maintainer-clean-generic clean mostlyclean distclean maintainer-clean ! ! ! # Tell versions [3.59,3.63) of GNU make to not export all variables. ! # Otherwise a system limit (for SysV at least) may be exceeded. ! .NOEXPORT: diff -crP ../make-3.75/glob/aclocal.m4 ./glob/aclocal.m4 *** ../make-3.75/glob/aclocal.m4 Wed Dec 31 19:00:00 1969 --- ./glob/aclocal.m4 Tue Sep 16 11:00:32 1997 *************** *** 0 **** --- 1,92 ---- + dnl aclocal.m4 generated automatically by aclocal 1.2 + + # Do all the work for Automake. This macro actually does too much -- + # some checks are only needed if your package does certain things. + # But this isn't really a big deal. + + # serial 1 + + dnl Usage: + dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + + AC_DEFUN(AM_INIT_AUTOMAKE, + [AC_REQUIRE([AM_PROG_INSTALL]) + PACKAGE=[$1] + AC_SUBST(PACKAGE) + VERSION=[$2] + AC_SUBST(VERSION) + dnl test to see if srcdir already configured + if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi + ifelse([$3],, + AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") + AC_DEFINE_UNQUOTED(VERSION, "$VERSION")) + AM_SANITY_CHECK + AC_ARG_PROGRAM + dnl FIXME This is truly gross. + missing_dir=`cd $ac_aux_dir && pwd` + AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) + AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) + AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) + AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) + AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) + AC_PROG_MAKE_SET]) + + + # serial 1 + + AC_DEFUN(AM_PROG_INSTALL, + [AC_REQUIRE([AC_PROG_INSTALL]) + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + AC_SUBST(INSTALL_SCRIPT)dnl + ]) + + # + # Check to make sure that the build environment is sane. + # + + AC_DEFUN(AM_SANITY_CHECK, + [AC_MSG_CHECKING([whether build environment is sane]) + # Just in case + sleep 1 + echo timestamp > conftestfile + # Do `set' in a subshell so we don't clobber the current shell's + # arguments. Must try -L first in case configure is actually a + # symlink; some systems play weird games with the mod time of symlinks + # (eg FreeBSD returns the mod time of the symlink's containing + # directory). + if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$@" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + test "[$]2" = conftestfile + ) + then + # Ok. + : + else + AC_MSG_ERROR([newly created file is older than distributed files! + Check your system clock]) + fi + rm -f conftest* + AC_MSG_RESULT(yes)]) + + dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) + dnl The program must properly implement --version. + AC_DEFUN(AM_MISSING_PROG, + [AC_MSG_CHECKING(for working $2) + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. + if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) + else + $1="$3/missing $2" + AC_MSG_RESULT(missing) + fi + AC_SUBST($1)]) + diff -crP ../make-3.75/glob/configure ./glob/configure *** ../make-3.75/glob/configure Sat Mar 2 05:01:02 1996 --- ./glob/configure Tue Sep 16 11:00:37 1997 *************** *** 1,8 **** #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.7 ! # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. --- 1,8 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.12 ! # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. *************** *** 49,54 **** --- 49,56 ---- # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= + # Maximum number of lines to put in a shell here document. + ac_max_here_lines=12 ac_prev= for ac_option *************** *** 330,336 **** verbose=yes ;; -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.7" exit 0 ;; -with-* | --with-*) --- 332,338 ---- verbose=yes ;; -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) *************** *** 432,442 **** done # NLS nuisances. ! # Only set LANG and LC_ALL to C if already set. ! # These must not be set unconditionally because not all systems understand ! # e.g. LANG=C (notably SCO). ! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LANG+set}" = set; then LANG=C; export LANG; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h --- 434,447 ---- done # NLS nuisances. ! # Only set these to C if already set. These must not be set unconditionally ! # because not all systems understand e.g. LANG=C (notably SCO). ! # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi + if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi + if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi + if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h *************** *** 498,503 **** --- 503,509 ---- ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. *************** *** 511,519 **** ac_n= ac_c='\c' ac_t= fi ! # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 517,758 ---- ac_n= ac_c='\c' ac_t= fi ! ! ac_aux_dir= ! for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ! if test -f $ac_dir/install-sh; then ! ac_aux_dir=$ac_dir ! ac_install_sh="$ac_aux_dir/install-sh -c" ! break ! elif test -f $ac_dir/install.sh; then ! ac_aux_dir=$ac_dir ! ac_install_sh="$ac_aux_dir/install.sh -c" ! break ! fi ! done ! if test -z "$ac_aux_dir"; then ! { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } ! fi ! ac_config_guess=$ac_aux_dir/config.guess ! ac_config_sub=$ac_aux_dir/config.sub ! ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ! ! # Find a good install program. We prefer a C program (faster), ! # so one script is as good as another. But avoid the broken or ! # incompatible versions: ! # SysV /etc/install, /usr/sbin/install ! # SunOS /usr/etc/install ! # IRIX /sbin/install ! # AIX /bin/install ! # AFS /usr/afsws/bin/install, which mishandles nonexistent args ! # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" ! # ./install, which can be erroneously created by make from ./install.sh. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:552: checking for a BSD compatible install" >&5 ! if test -z "$INSTALL"; then ! if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" ! for ac_dir in $PATH; do ! # Account for people who put trailing slashes in PATH elements. ! case "$ac_dir/" in ! /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! for ac_prog in ginstall installbsd scoinst install; do ! if test -f $ac_dir/$ac_prog; then ! if test $ac_prog = install && ! grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! # OSF/1 installbsd also uses dspmsg, but is usable. ! : ! else ! ac_cv_path_install="$ac_dir/$ac_prog -c" ! break 2 ! fi ! fi ! done ! ;; ! esac ! done ! IFS="$ac_save_IFS" ! ! fi ! if test "${ac_cv_path_install+set}" = set; then ! INSTALL="$ac_cv_path_install" ! else ! # As a last resort, use the slow shell script. We don't cache a ! # path for INSTALL within a source directory, because that will ! # break other packages using the cache if that directory is ! # removed, or if the path is relative. ! INSTALL="$ac_install_sh" ! fi ! fi ! echo "$ac_t""$INSTALL" 1>&6 ! ! # Use test -z because SunOS4 sh mishandles braces in ${var-val}. ! # It thinks the first close brace ends the variable substitution. ! test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! ! test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ! ! ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ! ! ! PACKAGE=glob ! ! VERSION=0.0 ! ! if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then ! { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } ! fi ! ! echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:614: checking whether build environment is sane" >&5 ! # Just in case ! sleep 1 ! echo timestamp > conftestfile ! # Do `set' in a subshell so we don't clobber the current shell's ! # arguments. Must try -L first in case configure is actually a ! # symlink; some systems play weird games with the mod time of symlinks ! # (eg FreeBSD returns the mod time of the symlink's containing ! # directory). ! if ( ! set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` ! if test "" = "X"; then ! # -L didn't work. ! set X `ls -t $srcdir/configure conftestfile` ! fi ! test "$2" = conftestfile ! ) ! then ! # Ok. ! : ! else ! { echo "configure: error: newly created file is older than distributed files! ! Check your system clock" 1>&2; exit 1; } ! fi ! rm -f conftest* ! echo "$ac_t""yes" 1>&6 ! if test "$program_transform_name" = s,x,x,; then ! program_transform_name= ! else ! # Double any \ or $. echo might interpret backslashes. ! cat <<\EOF_SED > conftestsed ! s,\\,\\\\,g; s,\$,$$,g ! EOF_SED ! program_transform_name="`echo $program_transform_name|sed -f conftestsed`" ! rm -f conftestsed ! fi ! test "$program_prefix" != NONE && ! program_transform_name="s,^,${program_prefix},; $program_transform_name" ! # Use a double $ so make ignores it. ! test "$program_suffix" != NONE && ! program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" ! ! # sed with no file args requires a program. ! test "$program_transform_name" = "" && program_transform_name="s,x,x," ! ! missing_dir=`cd $ac_aux_dir && pwd` ! echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:661: checking for working aclocal" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (aclocal --version) < /dev/null > /dev/null 2>&1; then ! ACLOCAL=aclocal ! echo "$ac_t""found" 1>&6 ! else ! ACLOCAL="$missing_dir/missing aclocal" ! echo "$ac_t""missing" 1>&6 ! fi ! ! echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:674: checking for working autoconf" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (autoconf --version) < /dev/null > /dev/null 2>&1; then ! AUTOCONF=autoconf ! echo "$ac_t""found" 1>&6 ! else ! AUTOCONF="$missing_dir/missing autoconf" ! echo "$ac_t""missing" 1>&6 ! fi ! ! echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:687: checking for working automake" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (automake --version) < /dev/null > /dev/null 2>&1; then ! AUTOMAKE=automake ! echo "$ac_t""found" 1>&6 ! else ! AUTOMAKE="$missing_dir/missing automake" ! echo "$ac_t""missing" 1>&6 ! fi ! ! echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:700: checking for working autoheader" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (autoheader --version) < /dev/null > /dev/null 2>&1; then ! AUTOHEADER=autoheader ! echo "$ac_t""found" 1>&6 ! else ! AUTOHEADER="$missing_dir/missing autoheader" ! echo "$ac_t""missing" 1>&6 ! fi ! ! echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:713: checking for working makeinfo" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (makeinfo --version) < /dev/null > /dev/null 2>&1; then ! MAKEINFO=makeinfo ! echo "$ac_t""found" 1>&6 ! else ! MAKEINFO="$missing_dir/missing makeinfo" ! echo "$ac_t""missing" 1>&6 ! fi ! ! echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:726: checking whether ${MAKE-make} sets \${MAKE}" >&5 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftestmake <<\EOF ! all: ! @echo 'ac_maketemp="${MAKE}"' ! EOF ! # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` ! if test -n "$ac_maketemp"; then ! eval ac_cv_prog_make_${ac_make}_set=yes ! else ! eval ac_cv_prog_make_${ac_make}_set=no ! fi ! rm -f conftestmake ! fi ! if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! SET_MAKE= ! else ! echo "$ac_t""no" 1>&6 ! SET_MAKE="MAKE=${MAKE-make}" ! fi ! ! ! # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:756: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 542,547 **** --- 781,787 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:785: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 588,594 **** --- 828,874 ---- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 + echo "configure:833: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' + ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no + fi + rm -fr conftest* + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 + echo "configure:867: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 + echo "configure:872: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 597,603 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 877,883 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** *** 605,633 **** fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes ! if test "${CFLAGS+set}" != set; then ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ! ac_cv_prog_gcc_g=yes else ! ac_cv_prog_gcc_g=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 ! if test $ac_cv_prog_gcc_g = yes; then ! CFLAGS="-g -O" ! else ! CFLAGS="-O" ! fi fi else GCC= --- 885,918 ---- fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + if test $ac_cv_prog_gcc = yes; then GCC=yes ! ac_test_CFLAGS="${CFLAGS+set}" ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS= ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:896: checking whether ${CC-cc} accepts -g" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ! ac_cv_prog_cc_g=yes else ! ac_cv_prog_cc_g=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ! if test "$ac_test_CFLAGS" = set; then ! CFLAGS="$ac_save_CFLAGS" ! elif test $ac_cv_prog_cc_g = yes; then ! CFLAGS="-g -O2" ! else ! CFLAGS="-O2" fi else GCC= *************** *** 637,642 **** --- 922,928 ---- # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:926: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 665,670 **** --- 951,957 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:955: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 691,696 **** --- 978,984 ---- fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 + echo "configure:982: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** *** 705,737 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 rm -rf conftest* CPP=/lib/cpp fi --- 993,1029 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi *************** *** 746,753 **** fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 cat > conftest.$ac_ext <&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 + echo "configure:1042: checking for AIX" >&5 cat > conftest.$ac_ext <&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 1061,1087 ---- rm -f conftest* ! ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 + echo "configure:1067: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 815,820 **** --- 1111,1117 ---- fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 + echo "configure:1115: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then *************** *** 835,849 **** fi echo $ac_n "checking for working const""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:1136: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_c_const" 1>&6 --- 1186,1201 ---- ; return 0; } EOF ! if { (eval echo configure:1190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 *************** *** 908,945 **** fi - # If we cannot run a trivial program, we must be cross compiling. - echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } - if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_cross=no - else - ac_cv_c_cross=yes - fi - fi - rm -fr conftest* - fi - - echo "$ac_t""$ac_cv_c_cross" 1>&6 - cross_compiling=$ac_cv_c_cross - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 1206,1218 ---- fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 + echo "configure:1211: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 947,959 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 rm -rf conftest* ac_cv_header_stdc=no fi --- 1220,1234 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi *************** *** 962,968 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 1237,1243 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** *** 980,986 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 1255,1261 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** *** 1000,1007 **** if test "$cross_compiling" = yes; then : else ! cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 1275,1282 ---- if test "$cross_compiling" = yes; then : else ! cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** *** 1012,1026 **** exit (0); } EOF ! { (eval echo configure:1016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then : else ac_cv_header_stdc=no fi - fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 --- 1287,1305 ---- exit (0); } EOF ! if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then : else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi + + fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 *************** *** 1033,1056 **** for ac_hdr in memory.h unistd.h string.h do ! ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi --- 1312,1338 ---- for ac_hdr in memory.h unistd.h string.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + echo "configure:1318: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi *************** *** 1058,1064 **** fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> ! int main() { return 0; } ! int t() { DIR *dirp = 0; ; return 0; } EOF ! if { (eval echo configure:1090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 + echo "configure:1359: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> ! int main() { DIR *dirp = 0; ; return 0; } EOF ! if { (eval echo configure:1372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 ! ac_lib_var=`echo dir | tr '.-/+' '___p'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 1392,1423 ---- done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then ! echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:1397: checking for opendir in -ldir" >&5 ! ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 1144,1169 **** fi else ! echo $ac_n "checking for -lx""... $ac_c" 1>&6 ! ac_lib_var=`echo x | tr '.-/+' '___p'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi --- 1433,1464 ---- fi else ! echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:1438: checking for opendir in -lx" >&5 ! ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi *************** *** 1181,1209 **** fi echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_closedir_void=yes else ! cat > conftest.$ac_ext < #include <$ac_header_dirent> int closedir(); main() { exit(closedir(opendir(".")) != 0); } EOF ! { (eval echo configure:1198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_closedir_void=no else ac_cv_func_closedir_void=yes fi - fi rm -fr conftest* fi echo "$ac_t""$ac_cv_func_closedir_void" 1>&6 if test $ac_cv_func_closedir_void = yes; then cat >> confdefs.h <<\EOF --- 1476,1509 ---- fi echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6 + echo "configure:1480: checking whether closedir returns void" >&5 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_closedir_void=yes else ! cat > conftest.$ac_ext < #include <$ac_header_dirent> int closedir(); main() { exit(closedir(opendir(".")) != 0); } EOF ! if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then ac_cv_func_closedir_void=no else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_func_closedir_void=yes fi rm -fr conftest* fi + fi + echo "$ac_t""$ac_cv_func_closedir_void" 1>&6 if test $ac_cv_func_closedir_void = yes; then cat >> confdefs.h <<\EOF *************** *** 1215,1241 **** # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < ! int main() { return 0; } ! int t() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:1231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* ac_cv_header_alloca_h=yes else rm -rf conftest* ac_cv_header_alloca_h=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 --- 1515,1542 ---- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 + echo "configure:1519: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < ! int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_alloca_h=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 *************** *** 1247,1257 **** fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1552: checking for alloca" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* ! ac_cv_func_alloca=yes else rm -rf conftest* ! ac_cv_func_alloca=no fi rm -f conftest* - fi ! echo "$ac_t""$ac_cv_func_alloca" 1>&6 ! if test $ac_cv_func_alloca = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA 1 EOF fi ! if test $ac_cv_func_alloca = no; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, --- 1572,1602 ---- # endif #endif ! int main() { char *p = (char *) alloca(1); ; return 0; } EOF ! if { (eval echo configure:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ! ac_cv_func_alloca_works=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ! ac_cv_func_alloca_works=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 ! if test $ac_cv_func_alloca_works = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA 1 EOF fi ! if test $ac_cv_func_alloca_works = no; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, *************** *** 1306,1316 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 + echo "configure:1612: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ char $ac_func(); ! int main() { return 0; } ! int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named --- 1638,1659 ---- if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 + echo "configure:1642: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func(); ! int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named *************** *** 1361,1376 **** ; return 0; } EOF ! if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <&6 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else ! cat > conftest.$ac_ext <&6 + echo "configure:1697: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi - fi rm -fr conftest* fi echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 cat >> confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then ac_cv_c_stack_direction=1 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_c_stack_direction=-1 fi rm -fr conftest* fi + fi + echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 cat >> confdefs.h <&6 ! if eval "test \"`echo '$''{'ac_cv_func_strcoll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! ac_cv_func_strcoll=no else ! cat > conftest.$ac_ext < main () --- 1741,1756 ---- fi ! echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 ! echo "configure:1746: checking for working strcoll" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! ac_cv_func_strcoll_works=no else ! cat > conftest.$ac_ext < main () *************** *** 1447,1464 **** strcoll ("123", "456") >= 0); } EOF ! { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } ! if test -s conftest && (./conftest; exit) 2>/dev/null; then ! ac_cv_func_strcoll=yes else ! ac_cv_func_strcoll=no ! fi fi rm -fr conftest* fi ! echo "$ac_t""$ac_cv_func_strcoll" 1>&6 ! if test $ac_cv_func_strcoll = yes; then cat >> confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF --- 1760,1781 ---- strcoll ("123", "456") >= 0); } EOF ! if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then ! ac_cv_func_strcoll_works=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_func_strcoll_works=no fi rm -fr conftest* fi ! fi ! ! echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6 ! if test $ac_cv_func_strcoll_works = yes; then cat >> confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF *************** *** 1482,1492 **** # --recheck option to rerun configure. # EOF # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | ! sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ ! >> confcache if cmp -s $cache_file confcache; then : else --- 1799,1823 ---- # --recheck option to rerun configure. # EOF + # The following way of writing the cache mishandles newlines in values, + # but we know of no workaround that is simple, portable, and efficient. + # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | ! case `(ac_space=' '; set) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ! ;; ! esac >> confcache if cmp -s $cache_file confcache; then : else *************** *** 1553,1559 **** echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.7" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; --- 1884,1890 ---- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *************** *** 1562,1567 **** --- 1893,1899 ---- done ac_given_srcdir=$srcdir + ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF *************** *** 1593,1598 **** --- 1925,1941 ---- s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g + s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g + s%@INSTALL_DATA@%$INSTALL_DATA%g + s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g + s%@PACKAGE@%$PACKAGE%g + s%@VERSION@%$VERSION%g + s%@ACLOCAL@%$ACLOCAL%g + s%@AUTOCONF@%$AUTOCONF%g + s%@AUTOMAKE@%$AUTOMAKE%g + s%@AUTOHEADER@%$AUTOHEADER%g + s%@MAKEINFO@%$MAKEINFO%g + s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g *************** *** 1601,1620 **** CEOF EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile]", defaulting infile="outfile.in". case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac ! # Adjust relative srcdir, etc. for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` --- 1944,1999 ---- CEOF EOF + + cat >> $CONFIG_STATUS <<\EOF + + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. + ac_file=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_cmds # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds="" + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi + EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac ! # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` *************** *** 1638,1643 **** --- 2017,2027 ---- top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." *************** *** 1646,1660 **** # $configure_input" ;; *) ac_comsub= ;; esac sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g ! " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file fi; done ! rm -f conftest.subs exit 0 EOF --- 2030,2051 ---- # $configure_input" ;; *) ac_comsub= ;; esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g ! s%@INSTALL@%$INSTALL%g ! " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done ! rm -f conftest.s* + EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF diff -crP ../make-3.75/glob/configure.bat ./glob/configure.bat *** ../make-3.75/glob/configure.bat Wed Mar 8 20:17:56 1995 --- ./glob/configure.bat Mon Apr 7 03:24:12 1997 *************** *** 1,5 **** @echo off ! echo Configuring glob for GO32 rem This batch file assumes a unix-type "sed" program echo # Makefile generated by "configure.bat"> Makefile --- 1,5 ---- @echo off ! echo Configuring glob for DJGPP rem This batch file assumes a unix-type "sed" program echo # Makefile generated by "configure.bat"> Makefile diff -crP ../make-3.75/glob/configure.in ./glob/configure.in *** ../make-3.75/glob/configure.in Wed Feb 22 21:29:09 1995 --- ./glob/configure.in Mon Aug 18 14:11:38 1997 *************** *** 1,6 **** dnl Process this file with autoconf to produce a configure script. AC_INIT(fnmatch.c) dnl A distinctive file to look for in srcdir. ! AC_PREREQ(2.1) dnl Minimum Autoconf version required. AC_PROG_CC AC_CHECK_PROG(AR, ar, ar, ar) AC_PROG_RANLIB --- 1,9 ---- dnl Process this file with autoconf to produce a configure script. AC_INIT(fnmatch.c) dnl A distinctive file to look for in srcdir. ! AC_PREREQ(2.12) dnl Minimum Autoconf version required. ! ! AM_INIT_AUTOMAKE(glob, 0.0, nodefs) ! AC_PROG_CC AC_CHECK_PROG(AR, ar, ar, ar) AC_PROG_RANLIB diff -crP ../make-3.75/glob/fnmatch.c ./glob/fnmatch.c *** ../make-3.75/glob/fnmatch.c Sat Jun 22 05:01:21 1996 --- ./glob/fnmatch.c Mon Apr 7 03:24:16 1997 *************** *** 1,27 **** ! /* Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc. ! This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! This library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this library; see the file COPYING.LIB. If ! not, write to the Free Software Foundation, Inc., 675 Mass Ave, ! Cambridge, MA 02139, USA. */ ! #ifdef HAVE_CONFIG_H ! #include #endif /* Enable GNU extensions in fnmatch.h. */ #ifndef _GNU_SOURCE ! #define _GNU_SOURCE 1 #endif #include --- 1,28 ---- ! /* Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc. ! This file is part of the GNU C Library. ! This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! This library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this library; see the file COPYING.LIB. If not, ! write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #if HAVE_CONFIG_H ! # include #endif /* Enable GNU extensions in fnmatch.h. */ #ifndef _GNU_SOURCE ! # define _GNU_SOURCE 1 #endif #include *************** *** 37,48 **** program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ ! #if defined (_LIBC) || !defined (__GNU_LIBRARY__) ! #ifndef errno extern int errno; ! #endif /* Match STRING against the filename pattern PATTERN, returning zero if it matches, nonzero if not. */ --- 38,58 ---- program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ ! #if defined _LIBC || !defined __GNU_LIBRARY__ ! # if defined STDC_HEADERS || !defined isascii ! # define ISASCII(c) 1 ! # else ! # define ISASCII(c) isascii(c) ! # endif ! ! # define ISUPPER(c) (ISASCII (c) && isupper (c)) ! ! ! # ifndef errno extern int errno; ! # endif /* Match STRING against the filename pattern PATTERN, returning zero if it matches, nonzero if not. */ *************** *** 55,62 **** register const char *p = pattern, *n = string; register char c; ! /* Note that this evalutes C many times. */ ! #define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c)) while ((c = *p++) != '\0') { --- 65,72 ---- register const char *p = pattern, *n = string; register char c; ! /* Note that this evaluates C many times. */ ! # define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c)) while ((c = *p++) != '\0') { *************** *** 225,230 **** --- 235,242 ---- return 0; return FNM_NOMATCH; + + # undef FOLD } #endif /* _LIBC or not __GNU_LIBRARY__. */ diff -crP ../make-3.75/glob/fnmatch.h ./glob/fnmatch.h *** ../make-3.75/glob/fnmatch.h Sun Jul 21 05:01:17 1996 --- ./glob/fnmatch.h Mon Aug 18 14:11:39 1997 *************** *** 1,22 **** ! /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. ! This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! This library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this library; see the file COPYING.LIB. If ! not, write to the Free Software Foundation, Inc., 675 Mass Ave, ! Cambridge, MA 02139, USA. */ #ifndef _FNMATCH_H - #define _FNMATCH_H 1 #ifdef __cplusplus --- 1,22 ---- ! /* Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc. ! This file is part of the GNU C Library. ! The GNU C Library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! The GNU C Library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with the GNU C Library; see the file COPYING.LIB. If not, ! write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 #ifdef __cplusplus *************** *** 24,30 **** #endif #if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \ ! || defined (WIN32)) #undef __P #define __P(protos) protos #else /* Not C++ or ANSI C. */ --- 24,30 ---- #endif #if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \ ! || defined (WINDOWS32)) #undef __P #define __P(protos) protos #else /* Not C++ or ANSI C. */ diff -crP ../make-3.75/glob/glob.c ./glob/glob.c *** ../make-3.75/glob/glob.c Sun Jul 21 05:01:18 1996 --- ./glob/glob.c Mon Aug 18 14:11:40 1997 *************** *** 1,19 **** ! /* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc. ! This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! This library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this library; see the file COPYING.LIB. If ! not, write to the Free Software Foundation, Inc., 675 Mass Ave, ! Cambridge, MA 02139, USA. */ /* AIX requires this to be the first thing in the file. */ #if defined (_AIX) && !defined (__GNUC__) --- 1,19 ---- ! /* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. ! This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! This library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this library; see the file COPYING.LIB. If not, ! write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* AIX requires this to be the first thing in the file. */ #if defined (_AIX) && !defined (__GNUC__) *************** *** 33,38 **** --- 33,44 ---- #include #include + /* Outcomment the following line for production quality code. */ + /* #define NDEBUG 1 */ + #include + + #include /* Needed on stupid SunOS for assert. */ + /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C *************** *** 52,62 **** #ifndef ELIDE_CODE ! #ifdef STDC_HEADERS #include #endif ! #ifdef HAVE_UNISTD_H #include #ifndef POSIX #ifdef _POSIX_VERSION --- 58,68 ---- #ifndef ELIDE_CODE ! #if defined(STDC_HEADERS) || defined(__GNU_LIBRARY__) #include #endif ! #if defined HAVE_UNISTD_H || defined _LIBC #include #ifndef POSIX #ifdef _POSIX_VERSION *************** *** 65,77 **** #endif #endif ! #if !defined (_AMIGA) && !defined (VMS) && !defined(WIN32) #include #endif #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) extern int errno; #endif #ifndef NULL #define NULL 0 --- 71,86 ---- #endif #endif ! #if !defined (_AMIGA) && !defined (VMS) && !defined(WINDOWS32) #include #endif #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) extern int errno; #endif + #ifndef __set_errno + #define __set_errno(val) errno = (val) + #endif #ifndef NULL #define NULL 0 *************** *** 106,112 **** #endif ! #if (defined (POSIX) || defined (WIN32)) && !defined (__GNU_LIBRARY__) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ #define REAL_DIR_ENTRY(dp) 1 --- 115,121 ---- #endif ! #if (defined (POSIX) || defined (WINDOWS32)) && !defined (__GNU_LIBRARY__) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ #define REAL_DIR_ENTRY(dp) 1 *************** *** 156,162 **** ((void) ((better_be_zero) == 0 ? (bzero((s), (n)), 0) : (abort(), 0))) #endif /* Not ANSI_STRING. */ ! #ifndef HAVE_STRCOLL #define strcoll strcmp #endif --- 165,171 ---- ((void) ((better_be_zero) == 0 ? (bzero((s), (n)), 0) : (abort(), 0))) #endif /* Not ANSI_STRING. */ ! #if !defined HAVE_STRCOLL && !defined _LIBC #define strcoll strcmp #endif *************** *** 166,172 **** __inline #endif #ifndef __SASC ! #ifdef WIN32 static void * #else static char * --- 175,181 ---- __inline #endif #ifndef __SASC ! #ifdef WINDOWS32 static void * #else static char * *************** *** 196,206 **** #include #else /* Not HAVE_ALLOCA_H. */ #ifndef _AIX ! #ifdef WIN32 #include #else extern char *alloca (); ! #endif /* WIN32 */ #endif /* Not _AIX. */ #endif /* sparc or HAVE_ALLOCA_H. */ #endif /* GCC. */ --- 205,215 ---- #include #else /* Not HAVE_ALLOCA_H. */ #ifndef _AIX ! #ifdef WINDOWS32 #include #else extern char *alloca (); ! #endif /* WINDOWS32 */ #endif /* Not _AIX. */ #endif /* sparc or HAVE_ALLOCA_H. */ #endif /* GCC. */ *************** *** 219,225 **** #endif #endif ! #ifndef STDC_HEADERS #undef size_t #define size_t unsigned int #endif --- 228,234 ---- #endif #endif ! #if !(defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)) #undef size_t #define size_t unsigned int #endif *************** *** 243,249 **** #undef GLOB_PERIOD #include - static int glob_pattern_p __P ((const char *pattern, int quote)); static int glob_in_dir __P ((const char *pattern, const char *directory, int flags, int (*errfunc) __P ((const char *, int)), --- 252,257 ---- *************** *** 251,262 **** static int prefix_array __P ((const char *prefix, char **array, size_t n)); static int collated_compare __P ((const __ptr_t, const __ptr_t)); /* Do glob searching for PATTERN, placing results in PGLOB. The bits defined above may be set in FLAGS. If a directory cannot be opened or read and ERRFUNC is not nil, it is called with the pathname that caused the error, and the `errno' value from the failing call; if it returns non-zero ! `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. Otherwise, `glob' returns zero. */ int --- 259,316 ---- static int prefix_array __P ((const char *prefix, char **array, size_t n)); static int collated_compare __P ((const __ptr_t, const __ptr_t)); + + /* Find the end of the sub-pattern in a brace expression. We define + this as an inline function if the compiler permits. */ + static + #if __GNUC__ - 0 >= 2 + inline + #endif + const char * + next_brace_sub (begin) + const char *begin; + { + unsigned int depth = 0; + const char *cp = begin; + + while (1) + { + if (depth == 0) + { + if (*cp != ',' && *cp != '}' && *cp != '\0') + { + if (*cp == '{') + ++depth; + ++cp; + continue; + } + } + else + { + while (*cp != '\0' && (*cp != '}' || depth > 0)) + { + if (*cp == '}') + --depth; + ++cp; + } + if (*cp == '\0') + /* An incorrectly terminated brace expression. */ + return NULL; + + continue; + } + break; + } + + return cp; + } + /* Do glob searching for PATTERN, placing results in PGLOB. The bits defined above may be set in FLAGS. If a directory cannot be opened or read and ERRFUNC is not nil, it is called with the pathname that caused the error, and the `errno' value from the failing call; if it returns non-zero ! `glob' returns GLOB_ABORTED; if it returns zero, the error is ignored. If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. Otherwise, `glob' returns zero. */ int *************** *** 274,280 **** if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) { ! errno = EINVAL; return -1; } --- 328,334 ---- if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) { ! __set_errno (EINVAL); return -1; } *************** *** 283,320 **** const char *begin = strchr (pattern, '{'); if (begin != NULL) { int firstc; ! size_t restlen; ! const char *p, *end, *next; ! unsigned int depth = 0; ! ! /* Find the end of the brace expression, by counting braces. ! While we're at it, notice the first comma at top brace level. */ ! end = begin + 1; ! next = NULL; ! while (1) { ! switch (*end++) { ! case ',': ! if (depth == 0 && next == NULL) ! next = end; ! continue; ! case '{': ! ++depth; ! continue; ! case '}': ! if (depth-- == 0) ! break; ! continue; ! case '\0': ! return glob (pattern, flags &~ GLOB_BRACE, errfunc, pglob); } - break; } ! restlen = strlen (end) + 1; ! if (next == NULL) ! next = end; /* We have a brace expression. BEGIN points to the opening {, NEXT points past the terminator of the first element, and END --- 337,395 ---- const char *begin = strchr (pattern, '{'); if (begin != NULL) { + /* Allocate working buffer large enough for our work. Note that + we have at least an opening and closing brace. */ int firstc; ! char *alt_start; ! const char *p; ! const char *next; ! const char *rest; ! size_t rest_len; ! #ifdef __GNUC__ ! char onealt[strlen (pattern) - 1]; ! #else ! char *onealt = (char *) malloc (strlen (pattern) - 1); ! if (onealt == NULL) ! { ! if (!(flags & GLOB_APPEND)) ! globfree (pglob); ! return GLOB_NOSPACE; ! } ! #endif ! ! /* We know the prefix for all sub-patterns. */ ! memcpy (onealt, pattern, begin - pattern); ! alt_start = &onealt[begin - pattern]; ! ! /* Find the first sub-pattern and at the same time find the ! rest after the closing brace. */ ! next = next_brace_sub (begin + 1); ! if (next == NULL) ! { ! /* It is an illegal expression. */ ! #ifndef __GNUC__ ! free (onealt); ! #endif ! return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); ! } ! ! /* Now find the end of the whole brace expression. */ ! rest = next; ! while (*rest != '}') { ! rest = next_brace_sub (rest + 1); ! if (rest == NULL) { ! /* It is an illegal expression. */ ! #ifndef __GNUC__ ! free (onealt); ! #endif ! return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); } } ! /* Please note that we now can be sure the brace expression ! is well-formed. */ ! rest_len = strlen (++rest) + 1; /* We have a brace expression. BEGIN points to the opening {, NEXT points past the terminator of the first element, and END *************** *** 331,402 **** } firstc = pglob->gl_pathc; - /* In this loop P points to the beginning of the current element - and NEXT points past its terminator. */ p = begin + 1; while (1) { - /* Construct a whole name that is one of the brace - alternatives in a temporary buffer. */ int result; ! size_t bufsz = (begin - pattern) + (next - 1 - p) + restlen; ! #ifdef __GNUC__ ! char onealt[bufsz]; ! #else ! char *onealt = malloc (bufsz); ! if (onealt == NULL) ! { ! if (!(flags & GLOB_APPEND)) ! globfree (pglob); ! return GLOB_NOSPACE; ! } ! #endif ! memcpy (onealt, pattern, begin - pattern); ! memcpy (&onealt[begin - pattern], p, next - 1 - p); ! memcpy (&onealt[(begin - pattern) + (next - 1 - p)], ! end, restlen); result = glob (onealt, ! ((flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC)) | ! GLOB_APPEND), errfunc, pglob); ! #ifndef __GNUC__ ! free (onealt); ! #endif /* If we got an error, return it. */ if (result && result != GLOB_NOMATCH) { if (!(flags & GLOB_APPEND)) globfree (pglob); return result; } ! /* Advance past this alternative and process the next. */ ! p = next; ! depth = 0; ! scan: ! switch (*p++) ! { ! case ',': ! if (depth == 0) ! { ! /* Found the next alternative. Loop to glob it. */ ! next = p; ! continue; ! } ! goto scan; ! case '{': ! ++depth; ! goto scan; ! case '}': ! if (depth-- == 0) ! /* End of the brace expression. Break out of the loop. */ ! break; ! goto scan; ! } } ! if (pglob->gl_pathc == firstc && ! !(flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) return GLOB_NOMATCH; } } --- 406,452 ---- } firstc = pglob->gl_pathc; p = begin + 1; while (1) { int result; ! ! /* Construct the new glob expression. */ ! memcpy (alt_start, p, next - p); ! memcpy (&alt_start[next - p], rest, rest_len); ! result = glob (onealt, ! ((flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC)) ! | GLOB_APPEND), errfunc, pglob); /* If we got an error, return it. */ if (result && result != GLOB_NOMATCH) { + #ifndef __GNUC__ + free (onealt); + #endif if (!(flags & GLOB_APPEND)) globfree (pglob); return result; } ! if (*next == '}') ! /* We saw the last entry. */ ! break; ! ! p = next + 1; ! next = next_brace_sub (p); ! assert (next != NULL); } ! #ifndef __GNUC__ ! free (onealt); ! #endif ! ! if (pglob->gl_pathc != firstc) ! /* We found some entries. */ ! return 0; ! else if (!(flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) return GLOB_NOMATCH; } } *************** *** 449,503 **** #ifndef VMS if ((flags & GLOB_TILDE) && dirname[0] == '~') { ! if (dirname[1] == '\0') { /* Look up home directory. */ ! dirname = getenv ("HOME"); #ifdef _AMIGA ! if (dirname == NULL || dirname[0] == '\0') ! dirname = "SYS:"; #else ! #ifdef WIN32 ! if (dirname == NULL || dirname[0] == '\0') ! dirname = "c:/users/default"; /* poor default */ #else ! if (dirname == NULL || dirname[0] == '\0') { extern char *getlogin __P ((void)); ! char *name = getlogin (); ! if (name != NULL) { struct passwd *p = getpwnam (name); ! if (p != NULL) ! dirname = p->pw_dir; } } ! if (dirname == NULL || dirname[0] == '\0') ! dirname = (char *) "~"; /* No luck. */ ! #endif /* WIN32 */ ! #endif } else { ! #ifdef _AMIGA ! if (dirname == NULL || dirname[0] == '\0') ! dirname = "SYS:"; ! #else ! #ifdef WIN32 ! if (dirname == NULL || dirname[0] == '\0') ! dirname = "c:/users/default"; /* poor default */ ! #else /* Look up specific user's home directory. */ ! struct passwd *p = getpwnam (dirname + 1); ! if (p != NULL) ! dirname = p->pw_dir; ! #endif /* WIN32 */ #endif } } #endif /* Not VMS. */ ! if (glob_pattern_p (dirname, !(flags & GLOB_NOESCAPE))) { /* The directory name contains metacharacters, so we have to glob for the directory, and then glob for --- 499,625 ---- #ifndef VMS if ((flags & GLOB_TILDE) && dirname[0] == '~') { ! if (dirname[1] == '\0' || dirname[1] == '/') { /* Look up home directory. */ ! char *home_dir = getenv ("HOME"); #ifdef _AMIGA ! if (home_dir == NULL || home_dir[0] == '\0') ! home_dir = "SYS:"; #else ! #ifdef WINDOWS32 ! if (home_dir == NULL || home_dir[0] == '\0') ! home_dir = "c:/users/default"; /* poor default */ #else ! if (home_dir == NULL || home_dir[0] == '\0') { + int success; + #if defined HAVE_GETLOGIN_R || defined _LIBC + extern int getlogin_r __P ((char *, size_t)); + size_t buflen = sysconf (_SC_LOGIN_NAME_MAX) + 1; + char *name; + + if (buflen == 0) + /* `sysconf' does not support _SC_LOGIN_NAME_MAX. Try + a moderate value. */ + buflen = 16; + name = (char *) __alloca (buflen); + + success = getlogin_r (name, buflen) >= 0; + #else extern char *getlogin __P ((void)); ! char *name; ! ! success = (name = getlogin ()) != NULL; ! #endif ! if (success) { + #if defined HAVE_GETPWNAM_R || defined _LIBC + size_t pwbuflen = sysconf (_SC_GETPW_R_SIZE_MAX); + char *pwtmpbuf; + struct passwd pwbuf, *p; + + pwtmpbuf = (char *) __alloca (pwbuflen); + + success = (__getpwnam_r (name, &pwbuf, pwtmpbuf, + pwbuflen, &p) >= 0); + #else struct passwd *p = getpwnam (name); ! success = p != NULL; ! #endif ! if (success) ! home_dir = p->pw_dir; } } ! if (home_dir == NULL || home_dir[0] == '\0') ! home_dir = (char *) "~"; /* No luck. */ ! #endif /* WINDOWS32 */ ! #endif ! /* Now construct the full directory. */ ! if (dirname[1] == '\0') ! dirname = home_dir; ! else ! { ! char *newp; ! size_t home_len = strlen (home_dir); ! newp = (char *) __alloca (home_len + dirlen); ! memcpy (newp, home_dir, home_len); ! memcpy (&newp[home_len], &dirname[1], dirlen); ! dirname = newp; ! } } + #if !defined _AMIGA && !defined WINDOWS32 else { ! char *end_name = strchr (dirname, '/'); ! char *user_name; ! char *home_dir; ! ! if (end_name == NULL) ! user_name = dirname + 1; ! else ! { ! user_name = (char *) __alloca (end_name - dirname); ! memcpy (user_name, dirname + 1, end_name - dirname); ! user_name[end_name - dirname - 1] = '\0'; ! } ! /* Look up specific user's home directory. */ ! { ! #if defined HAVE_GETPWNAM_R || defined _LIBC ! size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX); ! char *pwtmpbuf = (char *) __alloca (buflen); ! struct passwd pwbuf, *p; ! if (__getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) >= 0) ! home_dir = p->pw_dir; ! else ! home_dir = NULL; ! #else ! struct passwd *p = getpwnam (user_name); ! if (p != NULL) ! home_dir = p->pw_dir; ! else ! home_dir = NULL; #endif + } + /* If we found a home directory use this. */ + if (home_dir != NULL) + { + char *newp; + size_t home_len = strlen (home_dir); + size_t rest_len = end_name == NULL ? 0 : strlen (end_name); + newp = (char *) __alloca (home_len + rest_len + 1); + memcpy (newp, home_dir, home_len); + memcpy (&newp[home_len], end_name, rest_len); + newp[home_len + rest_len] = '\0'; + dirname = newp; + } } + #endif /* Not Amiga && not WINDOWS32. */ } #endif /* Not VMS. */ ! if (__glob_pattern_p (dirname, !(flags & GLOB_NOESCAPE))) { /* The directory name contains metacharacters, so we have to glob for the directory, and then glob for *************** *** 528,534 **** { globfree (&dirs); globfree (&files); ! return GLOB_ABEND; } } #endif /* SHELL. */ --- 650,656 ---- { globfree (&dirs); globfree (&files); ! return GLOB_ABORTED; } } #endif /* SHELL. */ *************** *** 724,731 **** /* Return nonzero if PATTERN contains any metacharacters. Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ ! static int ! glob_pattern_p (pattern, quote) const char *pattern; int quote; { --- 846,853 ---- /* Return nonzero if PATTERN contains any metacharacters. Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ ! int ! __glob_pattern_p (pattern, quote) const char *pattern; int quote; { *************** *** 756,761 **** --- 878,886 ---- return 0; } + #ifdef _LIBC + weak_alias (__glob_pattern_p, glob_pattern_p) + #endif /* Like `glob', but PATTERN is a final pathname component, *************** *** 780,786 **** struct globlink *names = NULL; size_t nfound = 0; ! if (!glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE))) { stream = NULL; flags |= GLOB_NOCHECK; --- 905,911 ---- struct globlink *names = NULL; size_t nfound = 0; ! if (!__glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE))) { stream = NULL; flags |= GLOB_NOCHECK; *************** *** 796,802 **** { if ((errfunc != NULL && (*errfunc) (directory, errno)) || (flags & GLOB_ERR)) ! return GLOB_ABEND; } else while (1) --- 921,927 ---- { if ((errfunc != NULL && (*errfunc) (directory, errno)) || (flags & GLOB_ERR)) ! return GLOB_ABORTED; } else while (1) *************** *** 838,844 **** } if (nfound == 0 && (flags & GLOB_NOMAGIC) && ! ! glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE))) flags |= GLOB_NOCHECK; if (nfound == 0 && (flags & GLOB_NOCHECK)) --- 963,969 ---- } if (nfound == 0 && (flags & GLOB_NOMAGIC) && ! ! __glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE))) flags |= GLOB_NOCHECK; if (nfound == 0 && (flags & GLOB_NOCHECK)) *************** *** 880,886 **** (*pglob->gl_closedir) (stream); else closedir ((DIR *) stream); ! errno = save; } return nfound == 0 ? GLOB_NOMATCH : 0; --- 1005,1011 ---- (*pglob->gl_closedir) (stream); else closedir ((DIR *) stream); ! __set_errno (save); } return nfound == 0 ? GLOB_NOMATCH : 0; *************** *** 891,897 **** (*pglob->gl_closedir) (stream); else closedir ((DIR *) stream); ! errno = save; } while (names != NULL) { --- 1016,1022 ---- (*pglob->gl_closedir) (stream); else closedir ((DIR *) stream); ! __set_errno (save); } while (names != NULL) { *************** *** 903,906 **** } #endif /* Not ELIDE_CODE. */ - --- 1028,1030 ---- diff -crP ../make-3.75/glob/glob.h ./glob/glob.h *** ../make-3.75/glob/glob.h Sun Jul 21 05:01:18 1996 --- ./glob/glob.h Wed Aug 27 16:43:43 1997 *************** *** 1,22 **** ! /* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc. ! This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! This library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this library; see the file COPYING.LIB. If ! not, write to the Free Software Foundation, Inc., 675 Mass Ave, ! Cambridge, MA 02139, USA. */ #ifndef _GLOB_H - #define _GLOB_H 1 #ifdef __cplusplus --- 1,21 ---- ! /* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. ! The GNU C Library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! The GNU C Library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with the GNU C Library; see the file COPYING.LIB. If not, ! write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifndef _GLOB_H #define _GLOB_H 1 #ifdef __cplusplus *************** *** 25,41 **** #endif #undef __ptr_t ! #if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \ ! || defined (WIN32)) ! #undef __P ! #define __P(protos) protos ! #define __ptr_t void * #else /* Not C++ or ANSI C. */ ! #undef __P ! #define __P(protos) () ! #undef const ! #define const ! #define __ptr_t char * #endif /* C++ or ANSI C. */ /* Bits set in the FLAGS argument to `glob'. */ --- 24,44 ---- #endif #undef __ptr_t ! #if (defined __cplusplus || (defined __STDC__ && __STDC__) \ ! || defined WINDOWS32) ! # undef __P ! # define __P(protos) protos ! # define __ptr_t void * ! # if !defined __GNUC__ || __GNUC__ < 2 ! # undef __const ! # define __const const ! # endif #else /* Not C++ or ANSI C. */ ! # undef __P ! # define __P(protos) () ! # undef __const ! # define __const ! # define __ptr_t char * #endif /* C++ or ANSI C. */ /* Bits set in the FLAGS argument to `glob'. */ *************** *** 47,72 **** #define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */ #define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */ #define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */ ! #define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \ GLOB_NOMAGIC|GLOB_TILDE) ! ! #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE) ! #define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */ ! #define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ ! #define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */ ! #define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */ ! #define GLOB_TILDE (1 <<12)/* Expand ~user and ~ to home directories. */ #endif /* Error returns from `glob'. */ #define GLOB_NOSPACE 1 /* Ran out of memory. */ ! #define GLOB_ABEND 2 /* Read error. */ #define GLOB_NOMATCH 3 /* No matches found. */ /* Structure describing a globbing run. */ ! #if !defined (_AMIGA) && !defined (VMS) /* Buggy compiler. */ struct stat; #endif typedef struct --- 50,86 ---- #define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */ #define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */ #define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */ ! ! #if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE \ ! || defined _GNU_SOURCE) ! # define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */ ! # define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ ! # define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */ ! # define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */ ! # define GLOB_TILDE (1 <<12)/* Expand ~user and ~ to home directories. */ ! # define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \ GLOB_NOMAGIC|GLOB_TILDE) ! #else ! # define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ ! GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ ! GLOB_PERIOD) #endif /* Error returns from `glob'. */ #define GLOB_NOSPACE 1 /* Ran out of memory. */ ! #define GLOB_ABORTED 2 /* Read error. */ #define GLOB_NOMATCH 3 /* No matches found. */ + #ifdef _GNU_SOURCE + /* Previous versions of this file defined GLOB_ABEND instead of + GLOB_ABORTED. Provide a compatibility definition here. */ + # define GLOB_ABEND GLOB_ABORTED + #endif + /* Structure describing a globbing run. */ ! #if !defined _AMIGA && !defined VMS /* Buggy compiler. */ struct stat; #endif typedef struct *************** *** 80,88 **** are used instead of the normal file access functions. */ void (*gl_closedir) __P ((void *)); struct dirent *(*gl_readdir) __P ((void *)); ! __ptr_t (*gl_opendir) __P ((const char *)); ! int (*gl_lstat) __P ((const char *, struct stat *)); ! int (*gl_stat) __P ((const char *, struct stat *)); } glob_t; /* Do glob searching for PATTERN, placing results in PGLOB. --- 94,102 ---- are used instead of the normal file access functions. */ void (*gl_closedir) __P ((void *)); struct dirent *(*gl_readdir) __P ((void *)); ! __ptr_t (*gl_opendir) __P ((__const char *)); ! int (*gl_lstat) __P ((__const char *, struct stat *)); ! int (*gl_stat) __P ((__const char *, struct stat *)); } glob_t; /* Do glob searching for PATTERN, placing results in PGLOB. *************** *** 93,105 **** `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. Otherwise, `glob' returns zero. */ ! extern int glob __P ((const char *__pattern, int __flags, ! int (*__errfunc) __P ((const char *, int)), glob_t *__pglob)); /* Free storage allocated in PGLOB by a previous `glob' call. */ extern void globfree __P ((glob_t *__pglob)); #ifdef __cplusplus } --- 107,129 ---- `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. Otherwise, `glob' returns zero. */ ! extern int glob __P ((__const char *__pattern, int __flags, ! int (*__errfunc) __P ((__const char *, int)), glob_t *__pglob)); /* Free storage allocated in PGLOB by a previous `glob' call. */ extern void globfree __P ((glob_t *__pglob)); + + #ifdef _GNU_SOURCE + /* Return nonzero if PATTERN contains any metacharacters. + Metacharacters can be quoted with backslashes if QUOTE is nonzero. + + This function is not part of the interface specified by POSIX.2 + but several programs want to use it. */ + extern int __glob_pattern_p __P ((__const char *__pattern, int __quote)); + extern int glob_pattern_p __P ((__const char *__pattern, int __quote)); + #endif #ifdef __cplusplus } diff -crP ../make-3.75/implicit.c ./implicit.c *** ../make-3.75/implicit.c Wed Mar 20 10:10:18 1996 --- ./implicit.c Wed Aug 27 16:31:12 1997 *************** *** 1,5 **** /* Implicit rule searching for GNU Make. ! Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Implicit rule searching for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 152,158 **** register struct rule *rule; register struct dep *dep; ! char *p; #ifndef NO_ARCHIVES if (archive || ar_name (filename)) --- 152,158 ---- register struct rule *rule; register struct dep *dep; ! char *p, *vp; #ifndef NO_ARCHIVES if (archive || ar_name (filename)) *************** *** 167,172 **** --- 167,183 ---- lastslash = rindex (filename, ']'); #else lastslash = rindex (filename, '/'); + #ifdef __MSDOS__ + /* Handle backslashes (possibly mixed with forward slashes) + and the case of "d:file". */ + { + char *bslash = rindex (filename, '\\'); + if (lastslash == 0 || bslash > lastslash) + lastslash = bslash; + if (lastslash == 0 && filename[0] && filename[1] == ':') + lastslash = filename + 1; + } + #endif #endif if (lastslash != 0 && lastslash[1] == '\0') lastslash = 0; *************** *** 388,397 **** } /* This code, given FILENAME = "lib/foo.o", dependency name "lib/foo.c", and VPATH=src, searches for "src/lib/foo.c". */ ! if (vpath_search (&p, (time_t *) 0)) { ! DEBUGP2 ("Found dependency as `%s'.%s\n", p, ""); ! found_files[deps_found++] = p; continue; } --- 399,410 ---- } /* This code, given FILENAME = "lib/foo.o", dependency name "lib/foo.c", and VPATH=src, searches for "src/lib/foo.c". */ ! vp = p; ! if (vpath_search (&vp, (time_t *) 0)) { ! DEBUGP2 ("Found dependency `%s' as VPATH `%s'\n", p, vp); ! strcpy(vp, p); ! found_files[deps_found++] = vp; continue; } *************** *** 554,560 **** dep->next = file->deps; file->deps = dep; } ! if (!checked_lastslash[foundrule]) /* Always allocate new storage, since STEM might be on the stack for an intermediate file. */ --- 567,573 ---- dep->next = file->deps; file->deps = dep; } ! if (!checked_lastslash[foundrule]) /* Always allocate new storage, since STEM might be on the stack for an intermediate file. */ diff -crP ../make-3.75/install-sh ./install-sh *** ../make-3.75/install-sh Sun Jul 14 12:30:07 1996 --- ./install-sh Wed Nov 20 16:28:45 1996 *************** *** 20,27 **** # when there is no Makefile. # # This script is compatible with the BSD install script, but was written ! # from scratch. ! # # set DOITPROG to echo to test this script --- 20,27 ---- # when there is no Makefile. # # This script is compatible with the BSD install script, but was written ! # from scratch. It can only install one file at a time, a restriction ! # shared with many OS's install programs. # set DOITPROG to echo to test this script diff -crP ../make-3.75/job.c ./job.c *** ../make-3.75/job.c Sun Jul 14 15:57:14 1996 --- ./job.c Fri Sep 5 17:01:57 1997 *************** *** 1,6 **** /* Job execution and handling for GNU Make. ! Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96 ! Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Job execution and handling for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 25,50 **** #include /* Default shell to use. */ ! #ifdef WIN32 char *default_shell = "sh.exe"; int no_default_sh_exe = 1; ! #else /* WIN32 */ ! #ifndef _AMIGA ! char default_shell[] = "/bin/sh"; ! #else char default_shell[] = ""; extern int MyExecute (char **); ! #endif ! #endif /* WIN32 */ #ifdef __MSDOS__ #include static int dos_pid = 123; ! static int dos_status; ! static char *dos_bname; ! static char *dos_bename; ! static int dos_batch_file; ! #endif /* MSDOS. */ #ifdef _AMIGA #include --- 24,56 ---- #include /* Default shell to use. */ ! #ifdef WINDOWS32 char *default_shell = "sh.exe"; int no_default_sh_exe = 1; ! #else /* WINDOWS32 */ ! #ifdef _AMIGA char default_shell[] = ""; extern int MyExecute (char **); ! #else ! #ifdef __MSDOS__ ! /* The default shell is a pointer so we can change it if Makefile ! says so. It is without an explicit path so we get a chance ! to search the $PATH for it (since MSDOS doesn't have standard ! directories we could trust). */ ! char *default_shell = "command.com"; ! #else /* __MSDOS__ */ ! char default_shell[] = "/bin/sh"; ! #endif /* __MSDOS__ */ ! #endif /* _AMIGA */ ! #endif /* WINDOWS32 */ #ifdef __MSDOS__ #include + static int execute_by_shell; static int dos_pid = 123; ! int dos_status; ! int dos_command_running; ! #endif /* __MSDOS__ */ #ifdef _AMIGA #include *************** *** 61,67 **** #include #endif ! #ifdef WIN32 #include #include #include --- 67,73 ---- #include #endif ! #ifdef WINDOWS32 #include #include #include *************** *** 73,79 **** static char *dos_bname; static char *dos_bename; static int dos_batch_file; ! #endif /* WIN32 */ #ifdef HAVE_FCNTL_H #include --- 79,85 ---- static char *dos_bname; static char *dos_bename; static int dos_batch_file; ! #endif /* WINDOWS32 */ #ifdef HAVE_FCNTL_H #include *************** *** 191,198 **** /* Chain of children waiting to run until the load average goes down. */ static struct child *waiting_jobs = 0; ! #ifdef WIN32 /* * The macro which references this function is defined in make.h. */ --- 197,208 ---- /* Chain of children waiting to run until the load average goes down. */ static struct child *waiting_jobs = 0; + + /* Non-zero if we use a *real* shell (always so on Unix). */ + + int unixy_shell = 1; ! #ifdef WINDOWS32 /* * The macro which references this function is defined in make.h. */ *************** *** 200,206 **** { return ((process_kill(pid, sig) == TRUE) ? 0 : -1); } ! #endif /* WIN32 */ /* Write an error message describing the exit status given in EXIT_CODE, EXIT_SIG, and COREDUMP, for the target TARGET_NAME. --- 210,216 ---- { return ((process_kill(pid, sig) == TRUE) ? 0 : -1); } ! #endif /* WINDOWS32 */ /* Write an error message describing the exit status given in EXIT_CODE, EXIT_SIG, and COREDUMP, for the target TARGET_NAME. *************** *** 342,348 **** } else if (pid == 0) { ! #if !defined(__MSDOS__) && !defined(_AMIGA) && !defined(WIN32) /* No remote children. Check for local children. */ if (any_local) --- 352,358 ---- } else if (pid == 0) { ! #if !defined(__MSDOS__) && !defined(_AMIGA) && !defined(WINDOWS32) /* No remote children. Check for local children. */ if (any_local) *************** *** 396,408 **** exit_sig = WIFSIGNALED (status) ? WTERMSIG (status) : 0; coredump = WCOREDUMP (status); } ! #else /* MSDOS, Amiga, WIN32. */ #ifdef __MSDOS__ /* Life is very different on MSDOS. */ pid = dos_pid - 1; status = dos_status; ! exit_code = dos_status; ! exit_sig = 0; coredump = 0; #endif /* __MSDOS__ */ #ifdef _AMIGA --- 406,420 ---- exit_sig = WIFSIGNALED (status) ? WTERMSIG (status) : 0; coredump = WCOREDUMP (status); } ! #else /* __MSDOS__, Amiga, WINDOWS32. */ #ifdef __MSDOS__ /* Life is very different on MSDOS. */ pid = dos_pid - 1; status = dos_status; ! exit_code = WEXITSTATUS (status); ! if (exit_code == 0xff) ! exit_code = -1; ! exit_sig = WIFSIGNALED (status) ? WTERMSIG (status) : 0; coredump = 0; #endif /* __MSDOS__ */ #ifdef _AMIGA *************** *** 413,419 **** exit_sig = 0; coredump = 0; #endif /* _AMIGA */ ! #ifdef WIN32 { HANDLE hPID; int err; --- 425,431 ---- exit_sig = 0; coredump = 0; #endif /* _AMIGA */ ! #ifdef WINDOWS32 { HANDLE hPID; int err; *************** *** 429,435 **** if (err) fprintf(stderr, "make (e=%d): %s", ! exit_code, map_win32_error_to_string(exit_code)); exit_sig = process_signal(hPID); --- 441,447 ---- if (err) fprintf(stderr, "make (e=%d): %s", ! exit_code, map_windows32_error_to_string(exit_code)); exit_sig = process_signal(hPID); *************** *** 446,453 **** } pid = (int) hPID; } ! #endif /* WIN32 */ ! #endif /* Not MSDOS. */ } else /* We got a remote child. */ --- 458,465 ---- } pid = (int) hPID; } ! #endif /* WINDOWS32 */ ! #endif /* Not __MSDOS__ */ } else /* We got a remote child. */ *************** *** 655,667 **** } #ifdef POSIX - #ifdef __MSDOS__ - void - unblock_sigs () - { - return; - } - #else void unblock_sigs () { --- 667,672 ---- *************** *** 670,676 **** sigprocmask (SIG_SETMASK, &empty, (sigset_t *) 0); } #endif - #endif /* Start a job to run the commands specified in CHILD. CHILD is updated to reflect the commands and ID of the child process. --- 675,680 ---- *************** *** 780,785 **** --- 784,808 ---- message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag)) ? "%s" : (char *) 0, p); + /* Optimize an empty command. People use this for timestamp rules, + and forking a useless shell all the time leads to inefficiency. */ + + #if !defined(VMS) && !defined(_AMIGA) + if ( + #ifdef __MSDOS__ + unixy_shell /* the test is complicated and we already did it */ + #else + (argv[0] && !strcmp(argv[0], "/bin/sh")) + #endif + && (argv[1] && !strcmp(argv[1], "-c")) + && (argv[2] && !strcmp(argv[2], ":")) + && argv[3] == NULL) + { + set_command_state (child->file, cs_running); + goto next_command; + } + #endif /* !VMS && !_AMIGA */ + /* Tell update_goal_chain that a command has been started on behalf of this target. It is important that this happens here and not in reap_children (where we used to do it), because reap_children might be *************** *** 805,813 **** fflush (stdout); fflush (stderr); - #ifndef WIN32 - #ifndef _AMIGA #ifndef VMS /* Set up a bad standard input that reads from a broken pipe. */ --- 828,835 ---- fflush (stdout); fflush (stderr); #ifndef VMS + #if !defined(WINDOWS32) && !defined(_AMIGA) && !defined(__MSDOS__) /* Set up a bad standard input that reads from a broken pipe. */ *************** *** 835,842 **** } } ! #endif /* !AMIGA */ ! #endif /* !WIN32 */ /* Decide whether to give this child the `good' standard input (one that points to the terminal or whatever), or the `bad' one --- 857,863 ---- } } ! #endif /* !WINDOWS32 && !_AMIGA && !__MSDOS__ */ /* Decide whether to give this child the `good' standard input (one that points to the terminal or whatever), or the `bad' one *************** *** 846,852 **** if (child->good_stdin) good_stdin_used = 1; ! #endif /* Not VMS */ child->deleted = 0; --- 867,873 ---- if (child->good_stdin) good_stdin_used = 1; ! #endif /* !VMS */ child->deleted = 0; *************** *** 856,862 **** child->environment = target_environment (child->file); #endif ! #if !defined(__MSDOS__) && !defined(_AMIGA) && !defined(WIN32) #ifndef VMS /* start_waiting_job has set CHILD->remote if we can start a remote job. */ --- 877,883 ---- child->environment = target_environment (child->file); #endif ! #if !defined(__MSDOS__) && !defined(_AMIGA) && !defined(WINDOWS32) #ifndef VMS /* start_waiting_job has set CHILD->remote if we can start a remote job. */ *************** *** 919,939 **** #endif /* !VMS */ } ! #else /* MSDOS or Amiga. */ #ifdef __MSDOS__ ! dos_status = spawnvpe (P_WAIT, argv[0], argv, child->environment); ! ++dead_children; ! child->pid = dos_pid++; ! if (dos_batch_file) ! { ! dos_batch_file = 0; ! remove (dos_bname); /* Ignore errors. */ ! if (access (dos_bename, 0)) ! dos_status = 1; ! else ! dos_status = 0; ! remove (dos_bename); ! } #endif /* __MSDOS__ */ #ifdef _AMIGA amiga_status = MyExecute (argv); --- 940,995 ---- #endif /* !VMS */ } ! #else /* __MSDOS__ or Amiga or WINDOWS32 */ #ifdef __MSDOS__ ! { ! int proc_return; ! ! block_sigs (); ! dos_status = 0; ! ! /* We call `system' to do the job of the SHELL, since stock DOS ! shell is too dumb. Our `system' knows how to handle long ! command lines even if pipes/redirection is needed; it will only ! call COMMAND.COM when its internal commands are used. */ ! if (execute_by_shell) ! { ! char *cmdline = argv[0]; ! /* We don't have a way to pass environment to `system', ! so we need to save and restore ours, sigh... */ ! char **parent_environ = environ; ! ! environ = child->environment; ! ! /* If we have a *real* shell, tell `system' to call ! it to do everything for us. */ ! if (unixy_shell) ! { ! /* A *real* shell on MSDOS may not support long ! command lines the DJGPP way, so we must use `system'. */ ! cmdline = argv[2]; /* get past "shell -c" */ ! } ! ! dos_command_running = 1; ! proc_return = system (cmdline); ! dos_command_running = 0; ! environ = parent_environ; ! execute_by_shell = 0; /* for the next time */ ! } ! else ! { ! dos_command_running = 1; ! proc_return = spawnvpe (P_WAIT, argv[0], argv, child->environment); ! dos_command_running = 0; ! } ! ! if (proc_return == -1) ! dos_status |= 0xff; ! else ! dos_status |= (proc_return & 0xff); ! ++dead_children; ! child->pid = dos_pid++; ! } #endif /* __MSDOS__ */ #ifdef _AMIGA amiga_status = MyExecute (argv); *************** *** 945,952 **** amiga_batch_file = 0; DeleteFile (amiga_bname); /* Ignore errors. */ } ! #endif /* Not Amiga */ ! #ifdef WIN32 { HANDLE hPID; char* arg0; --- 1001,1008 ---- amiga_batch_file = 0; DeleteFile (amiga_bname); /* Ignore errors. */ } ! #endif /* Amiga */ ! #ifdef WINDOWS32 { HANDLE hPID; char* arg0; *************** *** 976,983 **** fprintf(stderr, "\nCounted %d args in failed launch\n", i); } } ! #endif /* WIN32 */ ! #endif /* Not MSDOS. */ /* We are the parent side. Set the state to say the commands are running and return. */ --- 1032,1039 ---- fprintf(stderr, "\nCounted %d args in failed launch\n", i); } } ! #endif /* WINDOWS32 */ ! #endif /* __MSDOS__ or Amiga or WINDOWS32 */ /* We are the parent side. Set the state to say the commands are running and return. */ *************** *** 1101,1107 **** /* IN points to where in the line we are scanning. OUT points to where in the line we are writing. When we collapse a backslash-newline combination, ! IN gets ahead out OUT. */ in = out = cmds->command_lines[i]; while ((ref = index (in, '$')) != 0) --- 1157,1163 ---- /* IN points to where in the line we are scanning. OUT points to where in the line we are writing. When we collapse a backslash-newline combination, ! IN gets ahead of OUT. */ in = out = cmds->command_lines[i]; while ((ref = index (in, '$')) != 0) *************** *** 1295,1301 **** return; } ! #ifndef WIN32 #ifdef VMS #include #include --- 1351,1357 ---- return; } ! #ifndef WINDOWS32 #ifdef VMS #include #include *************** *** 1508,1514 **** #else /* !VMS */ ! #ifndef _AMIGA /* UNIX: Replace the current process with one executing the command in ARGV. STDIN_FD and STDOUT_FD are used as the process's stdin and stdout; ENVP is --- 1564,1570 ---- #else /* !VMS */ ! #if !defined (_AMIGA) && !defined (__MSDOS__) /* UNIX: Replace the current process with one executing the command in ARGV. STDIN_FD and STDOUT_FD are used as the process's stdin and stdout; ENVP is *************** *** 1531,1539 **** /* Run the command. */ exec_command (argv, envp); } ! #endif /* !AMIGA */ #endif /* !VMS */ ! #endif /* !WIN32 */ #ifndef _AMIGA /* Replace the current process with one running the command in ARGV, --- 1587,1595 ---- /* Run the command. */ exec_command (argv, envp); } ! #endif /* !AMIGA && !__MSDOS__ */ #endif /* !VMS */ ! #endif /* !WINDOWS32 */ #ifndef _AMIGA /* Replace the current process with one running the command in ARGV, *************** *** 1544,1554 **** char **argv, **envp; { #ifdef VMS ! /* Run the program. */ ! execve (argv[0], argv, envp); ! perror_with_name ("execve: ", argv[0]); ! _exit (EXIT_FAILURE); #else /* Be the user, permanently. */ child_access (); --- 1600,1665 ---- char **argv, **envp; { #ifdef VMS ! /* Run the program. */ ! execve (argv[0], argv, envp); ! perror_with_name ("execve: ", argv[0]); ! _exit (EXIT_FAILURE); #else + #ifdef WINDOWS32 + HANDLE hPID; + HANDLE hWaitPID; + int err = 0; + int exit_code = EXIT_FAILURE; + + /* make sure CreateProcess() has Path it needs */ + sync_Path_environment(); + + /* launch command */ + hPID = process_easy(argv, envp); + + /* make sure launch ok */ + if (hPID == INVALID_HANDLE_VALUE) + { + int i; + fprintf(stderr, + "process_easy() failed failed to launch process (e=%d)\n", + process_last_err(hPID)); + for (i = 0; argv[i]; i++) + fprintf(stderr, "%s ", argv[i]); + fprintf(stderr, "\nCounted %d args in failed launch\n", i); + exit(EXIT_FAILURE); + } + + /* wait and reap last child */ + while (hWaitPID = process_wait_for_any()) + { + /* was an error found on this process? */ + err = process_last_err(hWaitPID); + + /* get exit data */ + exit_code = process_exit_code(hWaitPID); + + if (err) + fprintf(stderr, "make (e=%d, rc=%d): %s", + err, exit_code, map_windows32_error_to_string(err)); + + /* cleanup process */ + process_cleanup(hWaitPID); + + /* expect to find only last pid, warn about other pids reaped */ + if (hWaitPID == hPID) + break; + else + fprintf(stderr, + "make reaped child pid %d, still waiting for pid %d\n", + hWaitPID, hPID); + } + + /* return child's exit code as our exit code */ + exit(exit_code); + + #else /* !WINDOWS32 */ + /* Be the user, permanently. */ child_access (); *************** *** 1600,1620 **** } _exit (127); #endif /* !VMS */ } #else /* On Amiga */ void exec_command (argv) char **argv; { ! MyExecute (argv); } void clean_tmp (void) { ! DeleteFile (amiga_bname); } ! #endif /* An Amiga */ #ifndef VMS /* Figure out the argument list necessary to run LINE as a command. Try to --- 1711,1732 ---- } _exit (127); + #endif /* !WINDOWS32 */ #endif /* !VMS */ } #else /* On Amiga */ void exec_command (argv) char **argv; { ! MyExecute (argv); } void clean_tmp (void) { ! DeleteFile (amiga_bname); } ! #endif /* On Amiga */ #ifndef VMS /* Figure out the argument list necessary to run LINE as a command. Try to *************** *** 1636,1648 **** char *shell, *ifs; { #ifdef __MSDOS__ ! static char sh_chars[] = "\"|<>"; ! static char *sh_cmds[] = { "break", "call", "cd", "chcp", "chdir", "cls", ! "copy", "ctty", "date", "del", "dir", "echo", ! "erase", "exit", "for", "goto", "if", "if", "md", ! "mkdir", "path", "pause", "prompt", "rem", "ren", ! "rename", "set", "shift", "time", "type", ! "ver", "verify", "vol", ":", 0 }; #else #ifdef _AMIGA static char sh_chars[] = "#;\"|<>()?*$`"; --- 1748,1793 ---- char *shell, *ifs; { #ifdef __MSDOS__ ! /* MSDOS supports both the stock DOS shell and ports of Unixy shells. ! We call `system' for anything that requires ``slow'' processing, ! because DOS shells are too dumb. When $SHELL points to a real ! (unix-style) shell, `system' just calls it to do everything. When ! $SHELL points to a DOS shell, `system' does most of the work ! internally, calling the shell only for its internal commands. ! However, it looks on the $PATH first, so you can e.g. have an ! external command named `mkdir'. ! ! Since we call `system', certain characters and commands below are ! actually not specific to COMMAND.COM, but to the DJGPP implementation ! of `system'. In particular: ! ! The shell wildcard characters are in DOS_CHARS because they will ! not be expanded if we call the child via `spawnXX'. ! ! The `;' is in DOS_CHARS, because our `system' knows how to run ! multiple commands on a single line. ! ! DOS_CHARS also include characters special to 4DOS/NDOS, so we ! won't have to tell one from another and have one more set of ! commands and special characters. */ ! static char sh_chars_dos[] = "*?[];|<>%^&()"; ! static char *sh_cmds_dos[] = { "break", "call", "cd", "chcp", "chdir", "cls", ! "copy", "ctty", "date", "del", "dir", "echo", ! "erase", "exit", "for", "goto", "if", "md", ! "mkdir", "path", "pause", "prompt", "rd", ! "rmdir", "rem", "ren", "rename", "set", ! "shift", "time", "type", "ver", "verify", ! "vol", ":", 0 }; ! ! static char sh_chars_sh[] = "#;\"*?[]&|<>(){}$`^"; ! static char *sh_cmds_sh[] = { "cd", "eval", "exec", "exit", "login", ! "logout", "set", "umask", "wait", "while", ! "for", "case", "if", ":", ".", "break", ! "continue", "export", "read", "readonly", ! "shift", "times", "trap", "switch", 0 }; ! ! char *sh_chars; ! char **sh_cmds; #else #ifdef _AMIGA static char sh_chars[] = "#;\"|<>()?*$`"; *************** *** 1652,1658 **** "unset", "unsetenv", "version", 0 }; #else ! #ifdef WIN32 static char sh_chars_dos[] = "\"|<>"; static char *sh_cmds_dos[] = { "break", "call", "cd", "chcp", "chdir", "cls", "copy", "ctty", "date", "del", "dir", "echo", --- 1797,1803 ---- "unset", "unsetenv", "version", 0 }; #else ! #ifdef WINDOWS32 static char sh_chars_dos[] = "\"|<>"; static char *sh_cmds_dos[] = { "break", "call", "cd", "chcp", "chdir", "cls", "copy", "ctty", "date", "del", "dir", "echo", *************** *** 1668,1690 **** "trap", "switch", "test", 0 }; char* sh_chars; char** sh_cmds; ! #else /* WIN32 */ static char sh_chars[] = "#;\"*?[]&|<>(){}$`^"; static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login", "logout", "set", "umask", "wait", "while", "for", "case", "if", ":", ".", "break", "continue", "export", "read", "readonly", "shift", "times", "trap", "switch", 0 }; ! #endif /* WIN32 */ #endif /* Amiga */ ! #endif /* MSDOS */ register int i; register char *p; register char *ap; char *end; ! int instring, word_has_equals, seen_nonequals; char **new_argv = 0; ! #ifdef WIN32 int slow_flag = 0; if (no_default_sh_exe) { --- 1813,1835 ---- "trap", "switch", "test", 0 }; char* sh_chars; char** sh_cmds; ! #else /* WINDOWS32 */ static char sh_chars[] = "#;\"*?[]&|<>(){}$`^"; static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login", "logout", "set", "umask", "wait", "while", "for", "case", "if", ":", ".", "break", "continue", "export", "read", "readonly", "shift", "times", "trap", "switch", 0 }; ! #endif /* WINDOWS32 */ #endif /* Amiga */ ! #endif /* __MSDOS__ */ register int i; register char *p; register char *ap; char *end; ! int instring, word_has_equals, seen_nonequals, last_argument_was_empty; char **new_argv = 0; ! #ifdef WINDOWS32 int slow_flag = 0; if (no_default_sh_exe) { *************** *** 1694,1700 **** sh_cmds = sh_cmds_sh; sh_chars = sh_chars_sh; } ! #endif if (restp != NULL) *restp = NULL; --- 1839,1845 ---- sh_cmds = sh_cmds_sh; sh_chars = sh_chars_sh; } ! #endif /* WINDOWS32 */ if (restp != NULL) *restp = NULL; *************** *** 1708,1715 **** /* See if it is safe to parse commands internally. */ if (shell == 0) shell = default_shell; else if (strcmp (shell, default_shell)) - #ifdef WIN32 { char *s1 = _fullpath(NULL, shell, 0); char *s2 = _fullpath(NULL, default_shell, 0); --- 1853,1860 ---- /* See if it is safe to parse commands internally. */ if (shell == 0) shell = default_shell; + #ifdef WINDOWS32 else if (strcmp (shell, default_shell)) { char *s1 = _fullpath(NULL, shell, 0); char *s2 = _fullpath(NULL, default_shell, 0); *************** *** 1722,1729 **** free(s2); } if (slow_flag) - #endif /* WIN32 */ goto slow; if (ifs != 0) for (ap = ifs; *ap != '\0'; ++ap) --- 1867,1898 ---- free(s2); } if (slow_flag) goto slow; + #else /* not WINDOWS32 */ + #ifdef __MSDOS__ + else if (stricmp (shell, default_shell)) + { + extern int _is_unixy_shell (const char *_path); + + message (1, "$SHELL changed (was `%s', now `%s')", default_shell, shell); + unixy_shell = _is_unixy_shell (shell); + default_shell = shell; + } + if (unixy_shell) + { + sh_chars = sh_chars_sh; + sh_cmds = sh_cmds_sh; + } + else + { + sh_chars = sh_chars_dos; + sh_cmds = sh_cmds_dos; + } + #else /* not __MSDOS__ */ + else if (strcmp (shell, default_shell)) + goto slow; + #endif /* not __MSDOS__ */ + #endif /* not WINDOWS32 */ if (ifs != 0) for (ap = ifs; *ap != '\0'; ++ap) *************** *** 1741,1747 **** /* I is how many complete arguments have been found. */ i = 0; ! instring = word_has_equals = seen_nonequals = 0; for (p = line; *p != '\0'; ++p) { if (ap > end) --- 1910,1916 ---- /* I is how many complete arguments have been found. */ i = 0; ! instring = word_has_equals = seen_nonequals = last_argument_was_empty = 0; for (p = line; *p != '\0'; ++p) { if (ap > end) *************** *** 1753,1759 **** /* Inside a string, just copy any char except a closing quote or a backslash-newline combination. */ if (*p == instring) ! instring = 0; else if (*p == '\\' && p[1] == '\n') goto swallow_escaped_newline; else if (*p == '\n' && restp != NULL) --- 1922,1932 ---- /* Inside a string, just copy any char except a closing quote or a backslash-newline combination. */ if (*p == instring) ! { ! instring = 0; ! if (ap == new_argv[0] || *(ap-1) == '\0') ! last_argument_was_empty = 1; ! } else if (*p == '\\' && p[1] == '\n') goto swallow_escaped_newline; else if (*p == '\n' && restp != NULL) *************** *** 1763,1770 **** goto end_of_line; } /* Backslash, $, and ` are special inside double quotes. ! If we see any of those, punt. */ ! else if (instring == '"' && index ("\\$`", *p) != 0) goto slow; else *ap++ = *p; --- 1936,1945 ---- goto end_of_line; } /* Backslash, $, and ` are special inside double quotes. ! If we see any of those, punt. ! But on MSDOS, if we use COMMAND.COM, double and single ! quotes have the same effect. */ ! else if (instring == '"' && index ("\\$`", *p) != 0 && unixy_shell) goto slow; else *ap++ = *p; *************** *** 1772,1777 **** --- 1947,1957 ---- else if (index (sh_chars, *p) != 0) /* Not inside a string, but it's a special char. */ goto slow; + #ifdef __MSDOS__ + else if (*p == '.' && p[1] == '.' && p[2] == '.' && p[3] != '.') + /* `...' is a wildcard in DJGPP. */ + goto slow; + #endif else /* Not a special char. */ switch (*p) *************** *** 1781,1787 **** first word with no equals sign in it. This is not the case with sh -k, but we never get here when using nonstandard shell flags. */ ! if (! seen_nonequals) goto slow; word_has_equals = 1; *ap++ = '='; --- 1961,1967 ---- first word with no equals sign in it. This is not the case with sh -k, but we never get here when using nonstandard shell flags. */ ! if (! seen_nonequals && unixy_shell) goto slow; word_has_equals = 1; *ap++ = '='; *************** *** 1846,1851 **** --- 2026,2032 ---- Terminate the text of the argument. */ *ap++ = '\0'; new_argv[++i] = ap; + last_argument_was_empty = 0; /* Update SEEN_NONEQUALS, which tells us if every word heretofore has contained an `='. */ *************** *** 1887,1893 **** /* Terminate the last argument and the argument list. */ *ap = '\0'; ! if (new_argv[i][0] != '\0') ++i; new_argv[i] = 0; --- 2068,2074 ---- /* Terminate the last argument and the argument list. */ *ap = '\0'; ! if (new_argv[i][0] != '\0' || last_argument_was_empty) ++i; new_argv[i] = 0; *************** *** 1914,1920 **** free (new_argv[0]); free ((void *)new_argv); } ! #ifdef WIN32 /* * Not eating this whitespace caused things like * --- 2095,2134 ---- free (new_argv[0]); free ((void *)new_argv); } ! ! #ifdef __MSDOS__ ! execute_by_shell = 1; /* actually, call `system' if shell isn't unixy */ ! #endif ! ! #ifdef _AMIGA ! { ! char *ptr; ! char *buffer; ! char *dptr; ! ! buffer = (char *)xmalloc (strlen (line)+1); ! ! ptr = line; ! for (dptr=buffer; *ptr; ) ! { ! if (*ptr == '\\' && ptr[1] == '\n') ! ptr += 2; ! else if (*ptr == '@') /* Kludge: multiline commands */ ! { ! ptr += 2; ! *dptr++ = '\n'; ! } ! else ! *dptr++ = *ptr++; ! } ! *dptr = 0; ! ! new_argv = (char **) xmalloc(2 * sizeof(char *)); ! new_argv[0] = buffer; ! new_argv[1] = 0; ! } ! #else /* Not Amiga */ ! #ifdef WINDOWS32 /* * Not eating this whitespace caused things like * *************** *** 1930,2006 **** ++line; if (*line == '\0') return 0; - #endif - #if defined(__MSDOS__) || defined(WIN32) - #ifdef WIN32 - /* - * only come here if no sh.exe command - */ - if (no_default_sh_exe) - #endif - { - FILE *batch; - dos_batch_file = 1; - if (dos_bname == 0) - { - dos_bname = tempnam (".", "mk"); - for (i = 0; dos_bname[i] != '\0'; ++i) - if (dos_bname[i] == '/') - dos_bname[i] = '\\'; - dos_bename = (char *) xmalloc (strlen (dos_bname) + 5); - strcpy (dos_bename, dos_bname); - strcat (dos_bname, ".bat"); - strcat (dos_bename, ".err"); - } - batch = fopen (dos_bename, "w"); /* Create a file. */ - if (batch != NULL) - fclose (batch); - batch = fopen (dos_bname, "w"); - fputs ("@echo off\n", batch); - fputs (line, batch); - fprintf (batch, "\nif errorlevel 1 del %s\n", dos_bename); - fclose (batch); - new_argv = (char **) xmalloc(2 * sizeof(char *)); - new_argv[0] = strdup (dos_bname); - new_argv[1] = 0; - } - #endif /* MSDOS. */ - #ifdef _AMIGA - { - char *ptr; - char *buffer; - char *dptr; - - buffer = (char *)xmalloc (strlen (line)+1); - - ptr = line; - for (dptr=buffer; *ptr; ) - { - if (*ptr == '\\' && ptr[1] == '\n') - ptr += 2; - else if (*ptr == '@') /* Kludge: multiline commands */ - { - ptr += 2; - *dptr++ = '\n'; - } - else - *dptr++ = *ptr++; - } - *dptr = 0; - - new_argv = (char **) xmalloc(2 * sizeof(char *)); - new_argv[0] = buffer; - new_argv[1] = 0; - } - #else /* Not MSDOS or Amiga */ - #ifdef WIN32 /* ! * This is technically an else to the above 'if (no_default_sh_exe)', ! * but (IMHO) coding if-else across ifdef is dangerous. */ ! if (!no_default_sh_exe) ! #endif { /* SHELL may be a multi-word command. Construct a command line "SHELL -c LINE", with all special chars in LINE escaped. --- 2144,2182 ---- ++line; if (*line == '\0') return 0; /* ! * only come here if no sh.exe command */ ! if (no_default_sh_exe) ! { ! FILE *batch; ! dos_batch_file = 1; ! if (dos_bname == 0) ! { ! dos_bname = tempnam (".", "mk"); ! for (i = 0; dos_bname[i] != '\0'; ++i) ! if (dos_bname[i] == '/') ! dos_bname[i] = '\\'; ! dos_bename = (char *) xmalloc (strlen (dos_bname) + 5); ! strcpy (dos_bename, dos_bname); ! strcat (dos_bname, ".bat"); ! strcat (dos_bename, ".err"); ! } ! batch = fopen (dos_bename, "w"); /* Create a file. */ ! if (batch != NULL) ! fclose (batch); ! batch = fopen (dos_bname, "w"); ! fputs ("@echo off\n", batch); ! fputs (line, batch); ! fprintf (batch, "\nif errorlevel 1 del %s\n", dos_bename); ! fclose (batch); ! new_argv = (char **) xmalloc(2 * sizeof(char *)); ! new_argv[0] = strdup (dos_bname); ! new_argv[1] = 0; ! } ! else ! #endif /* WINDOWS32 */ { /* SHELL may be a multi-word command. Construct a command line "SHELL -c LINE", with all special chars in LINE escaped. *************** *** 2038,2064 **** since it was most likely used to line up the continued line with the previous one. */ if (*p == '\t') ! strcpy (p, p + 1); p = next_token (p); --p; ! *ap++ = '\\'; *ap++ = ' '; continue; } ! if (*p == '\\' || *p == '\'' || *p == '"' ! || isspace (*p) ! || index (sh_chars, *p) != 0) *ap++ = '\\'; *ap++ = *p; } *ap = '\0'; ! new_argv = construct_command_argv_internal (new_line, (char **) NULL, ! (char *) 0, (char *) 0); } ! #endif /* Not MSDOS nor Amiga. */ return new_argv; } --- 2214,2270 ---- since it was most likely used to line up the continued line with the previous one. */ if (*p == '\t') ! bcopy (p + 1, p, strlen (p)); p = next_token (p); --p; ! if (unixy_shell) ! *ap++ = '\\'; *ap++ = ' '; continue; } ! /* DOS shells don't know about backslash-escaping. */ ! if (unixy_shell && ! (*p == '\\' || *p == '\'' || *p == '"' ! || isspace (*p) ! || index (sh_chars, *p) != 0)) *ap++ = '\\'; + #ifdef __MSDOS__ + else if (unixy_shell && strncmp (p, "...", 3) == 0) + { + /* The case of `...' wildcard again. */ + strcpy (ap, "\\.\\.\\"); + ap += 5; + p += 2; + } + #endif *ap++ = *p; } + if (ap == new_line + shell_len + sizeof (minus_c) - 1) + /* Line was empty. */ + return 0; *ap = '\0'; ! if (unixy_shell) ! new_argv = construct_command_argv_internal (new_line, (char **) NULL, ! (char *) 0, (char *) 0); ! #ifdef __MSDOS__ ! else ! { ! /* With MSDOS shells, we must construct the command line here ! instead of recursively calling ourselves, because we ! cannot backslash-escape the special characters (see above). */ ! new_argv = (char **) xmalloc (sizeof (char *)); ! line_len = strlen (new_line) - shell_len - sizeof (minus_c) + 1; ! new_argv[0] = xmalloc (line_len + 1); ! strncpy (new_argv[0], ! new_line + shell_len + sizeof (minus_c) - 1, line_len); ! new_argv[0][line_len] = '\0'; ! } ! #endif } ! #endif /* ! AMIGA */ return new_argv; } *************** *** 2090,2096 **** warn_undefined_variables_flag = 0; shell = allocated_variable_expand_for_file ("$(SHELL)", file); ! #ifdef WIN32 /* * Convert to forward slashes so that construct_command_argv_internal() * is not confused. --- 2296,2302 ---- warn_undefined_variables_flag = 0; shell = allocated_variable_expand_for_file ("$(SHELL)", file); ! #ifdef WINDOWS32 /* * Convert to forward slashes so that construct_command_argv_internal() * is not confused. diff -crP ../make-3.75/main.c ./main.c *** ../make-3.75/main.c Wed Aug 28 17:11:45 1996 --- ./main.c Wed Aug 27 16:31:15 1997 *************** *** 1,5 **** /* Argument parsing and main program of GNU Make. ! Copyright (C) 1988, 89, 90, 91, 94, 95, 96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Argument parsing and main program of GNU Make. ! Copyright (C) 1988,89,90,91,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 28,34 **** # include # include #endif ! #ifdef WIN32 #include #include "pathstuff.h" #endif --- 28,34 ---- # include # include #endif ! #ifdef WINDOWS32 #include #include "pathstuff.h" #endif *************** *** 129,135 **** int debug_flag = 0; ! #ifdef WIN32 /* Suspend make in main for a short time to allow debugger to attach */ int suspend_flag = 0; --- 129,135 ---- int debug_flag = 0; ! #ifdef WINDOWS32 /* Suspend make in main for a short time to allow debugger to attach */ int suspend_flag = 0; *************** *** 240,246 **** { 'd', flag, (char *) &debug_flag, 1, 1, 0, 0, 0, "debug", 0, "Print lots of debugging information" }, ! #ifdef WIN32 { 'D', flag, (char *) &suspend_flag, 1, 1, 0, 0, 0, "suspend-for-debug", 0, "Suspend process to allow a debugger to attach" }, --- 240,246 ---- { 'd', flag, (char *) &debug_flag, 1, 1, 0, 0, 0, "debug", 0, "Print lots of debugging information" }, ! #ifdef WINDOWS32 { 'D', flag, (char *) &suspend_flag, 1, 1, 0, 0, 0, "suspend-for-debug", 0, "Suspend process to allow a debugger to attach" }, *************** *** 392,397 **** --- 392,403 ---- This turns on pedantic compliance with POSIX.2. */ int posix_pedantic; + + /* Nonzero if some rule detected clock skew; we keep track so (a) we only + print one warning about it during the run, and (b) we can print a final + warning at the end of the run. */ + + int clock_skew_detected; /* Mask of signals that are being caught with fatal_error_signal. */ *************** *** 450,455 **** --- 456,551 ---- debug_flag = ! debug_flag; } + #ifdef WINDOWS32 + /* + * HANDLE runtime exceptions by avoiding a requestor on the GUI. Capture + * exception and print it to stderr instead. + * + * If debug_flag not set, just print a simple message and exit. + * If debug_flag set, print a more verbose message. + * If compiled for DEBUG, let exception pass through to GUI so that + * debuggers can attach. + */ + LONG WINAPI + handle_runtime_exceptions( struct _EXCEPTION_POINTERS *exinfo ) + { + PEXCEPTION_RECORD exrec = exinfo->ExceptionRecord; + LPSTR cmdline = GetCommandLine(); + LPSTR prg = strtok(cmdline, " "); + CHAR errmsg[1024]; + #ifdef USE_EVENT_LOG + HANDLE hEventSource; + LPTSTR lpszStrings[1]; + #endif + + if (!debug_flag) + { + sprintf(errmsg, "%s: Interrupt/Exception caught ", prg); + sprintf(&errmsg[strlen(errmsg)], + "(code = 0x%x, addr = 0x%x)\r\n", + exrec->ExceptionCode, exrec->ExceptionAddress); + fprintf(stderr, errmsg); + exit(255); + } + + sprintf(errmsg, + "\r\nUnhandled exception filter called from program %s\r\n", prg); + sprintf(&errmsg[strlen(errmsg)], "ExceptionCode = %x\r\n", + exrec->ExceptionCode); + sprintf(&errmsg[strlen(errmsg)], "ExceptionFlags = %x\r\n", + exrec->ExceptionFlags); + sprintf(&errmsg[strlen(errmsg)], "ExceptionAddress = %x\r\n", + exrec->ExceptionAddress); + + if (exrec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION + && exrec->NumberParameters >= 2) + sprintf(&errmsg[strlen(errmsg)], + "Access violation: %s operation at address %x\r\n", + exrec->ExceptionInformation[0] ? "write": "read", + exrec->ExceptionInformation[1]); + + /* turn this on if we want to put stuff in the event log too */ + #ifdef USE_EVENT_LOG + hEventSource = RegisterEventSource(NULL, "GNU Make"); + lpszStrings[0] = errmsg; + + if (hEventSource != NULL) + { + ReportEvent(hEventSource, /* handle of event source */ + EVENTLOG_ERROR_TYPE, /* event type */ + 0, /* event category */ + 0, /* event ID */ + NULL, /* current user's SID */ + 1, /* strings in lpszStrings */ + 0, /* no bytes of raw data */ + lpszStrings, /* array of error strings */ + NULL); /* no raw data */ + + (VOID) DeregisterEventSource(hEventSource); + } + #endif + + /* Write the error to stderr too */ + fprintf(stderr, errmsg); + + #ifdef DEBUG + return EXCEPTION_CONTINUE_SEARCH; + #else + exit(255); + #endif + } + #endif /* WINDOWS32 */ + + #ifdef __MSDOS__ + + static void + msdos_return_to_initial_directory () + { + if (directory_before_chdir) + chdir (directory_before_chdir); + } + #endif + #ifndef _AMIGA int main (argc, argv, envp) *************** *** 465,480 **** char **p; struct dep *read_makefiles; PATH_VAR (current_directory); ! #ifdef WIN32 extern int no_default_sh_exe; char *unix_path = NULL; ! char *win32_path = NULL; #endif default_goal_file = 0; reading_filename = 0; reading_lineno_ptr = 0; #if !defined (HAVE_STRSIGNAL) && !defined (HAVE_SYS_SIGLIST) signame_init (); #endif --- 561,590 ---- char **p; struct dep *read_makefiles; PATH_VAR (current_directory); ! #ifdef WINDOWS32 extern int no_default_sh_exe; char *unix_path = NULL; ! char *windows32_path = NULL; ! ! SetUnhandledExceptionFilter(handle_runtime_exceptions); #endif default_goal_file = 0; reading_filename = 0; reading_lineno_ptr = 0; + #if defined (__MSDOS__) && !defined (_POSIX_SOURCE) + /* Request the most powerful version of `system', to + make up for the dumb default shell. */ + __system_flags = (__system_redirect + | __system_use_shell + | __system_allow_multiple_cmds + | __system_allow_long_cmds + | __system_handle_null_commands + | __system_emulate_chdir); + + #endif + #if !defined (HAVE_STRSIGNAL) && !defined (HAVE_SYS_SIGLIST) signame_init (); #endif *************** *** 547,554 **** #ifdef __MSDOS__ if (program == 0) program = rindex (argv[0], '\\'); ! if (program == 0) ! program = rindex (argv[0], ':'); #endif if (program == 0) program = argv[0]; --- 657,672 ---- #ifdef __MSDOS__ if (program == 0) program = rindex (argv[0], '\\'); ! else ! { ! /* Some weird environments might pass us argv[0] with ! both kinds of slashes; we must find the rightmost. */ ! char *p = rindex (argv[0], '\\'); ! if (p && p > program) ! program = p; ! } ! if (program == 0 && argv[0][1] == ':') ! program = argv[0] + 1; #endif if (program == 0) program = argv[0]; *************** *** 561,567 **** /* Figure out where we are. */ ! #ifdef WIN32 if (getcwd_fs (current_directory, GET_PATH_MAX) == 0) #else if (getcwd (current_directory, GET_PATH_MAX) == 0) --- 679,685 ---- /* Figure out where we are. */ ! #ifdef WINDOWS32 if (getcwd_fs (current_directory, GET_PATH_MAX) == 0) #else if (getcwd (current_directory, GET_PATH_MAX) == 0) *************** *** 578,587 **** else directory_before_chdir = savestring (current_directory, strlen (current_directory)); /* Read in variables from the environment. It is important that this be ! done before $(MAKE) is are figured out so its definitions will not be ! one from the environment. */ #ifndef _AMIGA for (i = 0; envp[i] != 0; ++i) --- 696,709 ---- else directory_before_chdir = savestring (current_directory, strlen (current_directory)); + #ifdef __MSDOS__ + /* Make sure we will return to the initial directory, come what may. */ + atexit (msdos_return_to_initial_directory); + #endif /* Read in variables from the environment. It is important that this be ! done before $(MAKE) is figured out so its definitions will not be ! from the environment. */ #ifndef _AMIGA for (i = 0; envp[i] != 0; ++i) *************** *** 589,599 **** register char *ep = envp[i]; while (*ep != '=') ++ep; ! #ifdef WIN32 ! if (!strncmp(ep, "PATH", 4)) ! unix_path = &ep[5]; ! if (!strncmp(ep, "Path", 4)) ! win32_path = &ep[5]; #endif /* The result of pointer arithmetic is cast to unsigned int for machines where ptrdiff_t is a different size that doesn't widen --- 711,721 ---- register char *ep = envp[i]; while (*ep != '=') ++ep; ! #ifdef WINDOWS32 ! if (!unix_path && !strncmp(envp[i], "PATH=", 5)) ! unix_path = ep+1; ! if (!windows32_path && !strncmp(envp[i], "Path=", 5)) ! windows32_path = ep+1; #endif /* The result of pointer arithmetic is cast to unsigned int for machines where ptrdiff_t is a different size that doesn't widen *************** *** 607,618 **** be exported, because it was originally in the environment. */ ->export = v_export; } ! #ifdef WIN32 /* * PATH defaults to Path iff PATH not found and Path is found. */ ! if (!unix_path && win32_path) ! define_variable("PATH", 4, win32_path, o_env, 1)->export = v_export; #endif #else /* For Amiga, read the ENV: device, ignoring all dirs */ { --- 729,740 ---- be exported, because it was originally in the environment. */ ->export = v_export; } ! #ifdef WINDOWS32 /* * PATH defaults to Path iff PATH not found and Path is found. */ ! if (!unix_path && windows32_path) ! define_variable("PATH", 4, windows32_path, o_env, 1)->export = v_export; #endif #else /* For Amiga, read the ENV: device, ignoring all dirs */ { *************** *** 655,661 **** decode_env_switches ("MFLAGS", 6); #endif decode_switches (argc, argv, 0); ! #ifdef WIN32 if (suspend_flag) { fprintf(stderr, "%s (pid = %d)\n", argv[0], GetCurrentProcessId()); fprintf(stderr, "%s is suspending for 30 seconds...", argv[0]); --- 777,783 ---- decode_env_switches ("MFLAGS", 6); #endif decode_switches (argc, argv, 0); ! #ifdef WINDOWS32 if (suspend_flag) { fprintf(stderr, "%s (pid = %d)\n", argv[0], GetCurrentProcessId()); fprintf(stderr, "%s is suspending for 30 seconds...", argv[0]); *************** *** 679,685 **** so the result will run the same program regardless of the current dir. If it is a name with no slash, we can only hope that PATH did not find it in the current directory.) */ ! #ifdef WIN32 /* * Convert from backslashes to forward slashes for * programs like sh which don't like them. Shouldn't --- 801,807 ---- so the result will run the same program regardless of the current dir. If it is a name with no slash, we can only hope that PATH did not find it in the current directory.) */ ! #ifdef WINDOWS32 /* * Convert from backslashes to forward slashes for * programs like sh which don't like them. Shouldn't *************** *** 690,700 **** strstr(argv[0], "..") || !strncmp(argv[0], "//", 2)) argv[0] = strdup(w32ify(argv[0],1)); ! #else /* WIN32 */ if (current_directory[0] != '\0' && argv[0] != 0 && argv[0][0] != '/' && index (argv[0], '/') != 0) argv[0] = concat (current_directory, "/", argv[0]); ! #endif /* WIN32 */ #endif /* The extra indirection through $(MAKE_COMMAND) is done --- 812,822 ---- strstr(argv[0], "..") || !strncmp(argv[0], "//", 2)) argv[0] = strdup(w32ify(argv[0],1)); ! #else /* WINDOWS32 */ if (current_directory[0] != '\0' && argv[0] != 0 && argv[0][0] != '/' && index (argv[0], '/') != 0) argv[0] = concat (current_directory, "/", argv[0]); ! #endif /* WINDOWS32 */ #endif /* The extra indirection through $(MAKE_COMMAND) is done *************** *** 767,773 **** free (dir); } ! #ifdef WIN32 /* * THIS BLOCK OF CODE MUST COME AFTER chdir() CALL ABOVE IN ORDER * TO NOT CONFUSE THE DEPENDENCY CHECKING CODE IN implicit.c. --- 889,895 ---- free (dir); } ! #ifdef WINDOWS32 /* * THIS BLOCK OF CODE MUST COME AFTER chdir() CALL ABOVE IN ORDER * TO NOT CONFUSE THE DEPENDENCY CHECKING CODE IN implicit.c. *************** *** 839,845 **** } } } ! #endif /* WIN32 */ /* Figure out the level of recursion. */ { struct variable *v = lookup_variable ("MAKELEVEL", 9); --- 961,967 ---- } } } ! #endif /* WINDOWS32 */ /* Figure out the level of recursion. */ { struct variable *v = lookup_variable ("MAKELEVEL", 9); *************** *** 868,874 **** starting_directory = current_directory; else { ! #ifdef WIN32 if (getcwd_fs (current_directory, GET_PATH_MAX) == 0) #else if (getcwd (current_directory, GET_PATH_MAX) == 0) --- 990,996 ---- starting_directory = current_directory; else { ! #ifdef WINDOWS32 if (getcwd_fs (current_directory, GET_PATH_MAX) == 0) #else if (getcwd (current_directory, GET_PATH_MAX) == 0) *************** *** 985,991 **** define_makeflags (0, 0); ! #ifdef WIN32 /* * Now that makefiles are parsed, see if a Makefile gave a * value for SHELL and use that for default_shell instead if --- 1107,1113 ---- define_makeflags (0, 0); ! #ifdef WINDOWS32 /* * Now that makefiles are parsed, see if a Makefile gave a * value for SHELL and use that for default_shell instead if *************** *** 1030,1036 **** error("Resetting make for single job mode."); job_slots = 1; } ! #endif /* WIN32 */ /* Define the default variables. */ define_default_variables (); --- 1152,1158 ---- error("Resetting make for single job mode."); job_slots = 1; } ! #endif /* WINDOWS32 */ /* Define the default variables. */ define_default_variables (); *************** *** 1042,1047 **** --- 1164,1191 ---- read_makefiles = read_all_makefiles (makefiles == 0 ? (char **) 0 : makefiles->list); + #ifdef __MSDOS__ + /* We need to know what kind of shell we will be using. */ + { + extern int _is_unixy_shell (const char *_path); + struct variable *shv = lookup_variable("SHELL", 5); + extern int unixy_shell; + extern char *default_shell; + + if (shv && *shv->value) + { + char *shell_path = recursively_expand(shv); + + if (shell_path && _is_unixy_shell (shell_path)) + unixy_shell = 1; + else + unixy_shell = 0; + if (shell_path) + default_shell = shell_path; + } + } + #endif /* __MSDOS__ */ + /* Decode switches again, in case the variables were set by the makefile. */ decode_env_switches ("MAKEFLAGS", 9); #if 0 *************** *** 1111,1116 **** --- 1255,1262 ---- time_t *makefile_mtimes = 0; unsigned int mm_idx = 0; + char **nargv = argv; + char nargc = argc; if (debug_flag) puts ("Updating makefiles...."); *************** *** 1193,1244 **** in updating or could not be found at all. */ int any_failed = 0; register unsigned int i; ! for (i = 0; read_makefiles != 0; ++i) ! { ! struct dep *d = read_makefiles; ! read_makefiles = d->next; ! if (d->file->updated) ! { ! /* This makefile was updated. */ ! if (d->file->update_status == 0) ! { ! /* It was successfully updated. */ ! any_remade |= (file_mtime_no_search (d->file) ! != makefile_mtimes[i]); ! } ! else if (! (d->changed & RM_DONTCARE)) ! { ! time_t mtime; ! /* The update failed and this makefile was not ! from the MAKEFILES variable, so we care. */ ! error ("Failed to remake makefile `%s'.", ! d->file->name); ! mtime = file_mtime_no_search (d->file); ! any_remade |= (mtime != (time_t) -1 ! && mtime != makefile_mtimes[i]); ! } ! } ! else ! /* This makefile was not found at all. */ ! if (! (d->changed & RM_DONTCARE)) ! { ! /* This is a makefile we care about. See how much. */ ! if (d->changed & RM_INCLUDED) ! /* An included makefile. We don't need ! to die, but we do want to complain. */ ! error ("Included makefile `%s' was not found.", ! dep_name (d)); ! else ! { ! /* A normal makefile. We must die later. */ ! error ("Makefile `%s' was not found", dep_name (d)); ! any_failed = 1; ! } ! } ! ! free ((char *) d); ! } if (any_remade) goto re_exec; --- 1339,1385 ---- in updating or could not be found at all. */ int any_failed = 0; register unsigned int i; + struct dep *d; ! for (i = 0, d = read_makefiles; d != 0; ++i, d = d->next) ! if (d->file->updated) ! { ! /* This makefile was updated. */ ! if (d->file->update_status == 0) ! { ! /* It was successfully updated. */ ! any_remade |= (file_mtime_no_search (d->file) ! != makefile_mtimes[i]); ! } ! else if (! (d->changed & RM_DONTCARE)) ! { ! time_t mtime; ! /* The update failed and this makefile was not ! from the MAKEFILES variable, so we care. */ ! error ("Failed to remake makefile `%s'.", ! d->file->name); ! mtime = file_mtime_no_search (d->file); ! any_remade |= (mtime != (time_t) -1 ! && mtime != makefile_mtimes[i]); ! } ! } ! else ! /* This makefile was not found at all. */ ! if (! (d->changed & RM_DONTCARE)) ! { ! /* This is a makefile we care about. See how much. */ ! if (d->changed & RM_INCLUDED) ! /* An included makefile. We don't need ! to die, but we do want to complain. */ ! error ("Included makefile `%s' was not found.", ! dep_name (d)); ! else ! { ! /* A normal makefile. We must die later. */ ! error ("Makefile `%s' was not found", dep_name (d)); ! any_failed = 1; ! } ! } if (any_remade) goto re_exec; *************** *** 1264,1270 **** /* These names might have changed. */ register unsigned int i, j = 0; for (i = 1; i < argc; ++i) ! if (!strcmp (argv[i], "-f")) /* XXX */ { char *p = &argv[i][2]; if (*p == '\0') --- 1405,1411 ---- /* These names might have changed. */ register unsigned int i, j = 0; for (i = 1; i < argc; ++i) ! if (!strncmp (argv[i], "-f", 2)) /* XXX */ { char *p = &argv[i][2]; if (*p == '\0') *************** *** 1275,1280 **** --- 1416,1440 ---- } } + /* Add -o options for all makefiles that were remade */ + { + register unsigned int i; + struct dep *d; + + for (i = argc+1, d = read_makefiles; d != 0; d = d->next) + i += d->file->updated != 0; + + nargv = (char **)xmalloc(i * sizeof(char *)); + bcopy(argv, nargv, argc * sizeof(char *)); + + for (i = 0, d = read_makefiles; d != 0; ++i, d = d->next) + { + if (d->file->updated) + nargv[nargc++] = concat("-o", dep_name(d), ""); + } + nargv[nargc] = 0; + } + if (directories != 0 && directories->idx > 0) { char bad; *************** *** 1326,1332 **** { char **p; fputs ("Re-executing:", stdout); ! for (p = argv; *p != 0; ++p) printf (" %s", *p); puts (""); } --- 1486,1492 ---- { char **p; fputs ("Re-executing:", stdout); ! for (p = nargv; *p != 0; ++p) printf (" %s", *p); puts (""); } *************** *** 1335,1343 **** fflush (stderr); #ifndef _AMIGA ! exec_command (argv, environ); #else ! exec_command (argv); exit (0); #endif /* NOTREACHED */ --- 1495,1503 ---- fflush (stderr); #ifndef _AMIGA ! exec_command (nargv, environ); #else ! exec_command (nargv); exit (0); #endif /* NOTREACHED */ *************** *** 1400,1405 **** --- 1560,1569 ---- fatal ("No targets"); } + /* If we detected some clock skew, generate one last warning */ + if (clock_skew_detected) + error("*** Warning: Clock skew detected. Your build may be incomplete."); + /* Exit. */ die (status); } *************** *** 1514,1519 **** --- 1678,1706 ---- } lastgoal->name = 0; lastgoal->file = f; + + { + /* Add this target name to the MAKECMDGOALS variable. */ + struct variable *v; + char *value; + + v = lookup_variable("MAKECMDGOALS", 12); + if (v == 0) + value = f->name; + else + { + /* Paste the old and new values together */ + unsigned int oldlen, newlen; + + oldlen = strlen(v->value); + newlen = strlen(f->name); + value = (char *)alloca(oldlen + 1 + newlen + 1); + bcopy(v->value, value, oldlen); + value[oldlen] = ' '; + bcopy(f->name, &value[oldlen + 1], newlen + 1); + } + define_variable("MAKECMDGOALS", 12, value, o_default, 0); + } } } *************** *** 2137,2143 **** printf ("-%s", remote_description); printf (", by Richard Stallman and Roland McGrath.\n\ ! %sCopyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96\n\ %s\tFree Software Foundation, Inc.\n\ %sThis is free software; see the source for copying conditions.\n\ %sThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ --- 2324,2330 ---- printf ("-%s", remote_description); printf (", by Richard Stallman and Roland McGrath.\n\ ! %sCopyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97\n\ %s\tFree Software Foundation, Inc.\n\ %sThis is free software; see the source for copying conditions.\n\ %sThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ diff -crP ../make-3.75/make-stds.texi ./make-stds.texi *** ../make-3.75/make-stds.texi Sat Jun 22 15:26:56 1996 --- ./make-stds.texi Fri Jul 4 00:42:36 1997 *************** *** 28,33 **** --- 28,35 ---- * Command Variables:: Variables for Specifying Commands * Directory Variables:: Variables for Installation Directories * Standard Targets:: Standard Targets for Users + * Install Command Categories:: Three categories of commands in the `install' + rule: normal, pre-install and post-install. @end menu @node Makefile Basics *************** *** 65,73 **** of the source code. Without one of these prefixes, the current search path is used. ! The distinction between @file{./} and @file{$(srcdir)/} is important ! when using the @samp{--srcdir} option to @file{configure}. A rule of ! the form: @smallexample foo.1 : foo.man sedscript --- 67,76 ---- of the source code. Without one of these prefixes, the current search path is used. ! The distinction between @file{./} (the @dfn{build directory}) and ! @file{$(srcdir)/} (the @dfn{source directory}) is important because ! users can build in a separate directory using the @samp{--srcdir} option ! to @file{configure}. A rule of the form: @smallexample foo.1 : foo.man sedscript *************** *** 75,83 **** @end smallexample @noindent ! will fail when the current directory is not the source directory, ! because @file{foo.man} and @file{sedscript} are not in the current ! directory. When using GNU @code{make}, relying on @samp{VPATH} to find the source file will work in the case where there is a single dependency file, --- 78,85 ---- @end smallexample @noindent ! will fail when the build directory is not the source directory, because ! @file{foo.man} and @file{sedscript} are in the the source directory. When using GNU @code{make}, relying on @samp{VPATH} to find the source file will work in the case where there is a single dependency file, *************** *** 109,114 **** --- 111,128 ---- sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@ @end smallexample + GNU distributions usually contain some files which are not source + files---for example, Info files, and the output from Autoconf, Automake, + Bison or Flex. Since these files normally appear in the source + directory, they should always appear in the source directory, not in the + build directory. So Makefile rules to update them should put the + updated files in the source directory. + + However, if a file does not appear in the distribution, then the + Makefile should not put it in the source directory, because building a + program in ordinary circumstances should not modify the source directory + in any way. + Try to make the build and installation targets, at least (and all their subtargets) work correctly with a parallel @code{make}. *************** *** 122,132 **** The @code{configure} script and the Makefile rules for building and installation should not use any utilities directly except these: @example ! cat cmp cp echo egrep expr false grep ! ln mkdir mv pwd rm rmdir sed test touch true @end example Stick to the generally supported options for these programs. For example, don't use @samp{mkdir -p}, convenient as it may be, because most systems don't support it. --- 136,152 ---- The @code{configure} script and the Makefile rules for building and installation should not use any utilities directly except these: + @c dd find + @c gunzip gzip md5sum + @c mkfifo mknod tee uname + @example ! cat cmp cp diff echo egrep expr false grep install-info ! ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true @end example + The compression program @code{gzip} can be used in the @code{dist} rule. + Stick to the generally supported options for these programs. For example, don't use @samp{mkdir -p}, convenient as it may be, because most systems don't support it. *************** *** 140,165 **** mean: @example ! ar bison cc flex install ld lex make makeinfo ranlib texi2dvi yacc @end example ! Use the following @code{make} variables: @example ! $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX) $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) @end example ! When you use @code{ranlib}, you should make sure nothing bad happens if ! the system does not have @code{ranlib}. Arrange to ignore an error ! from that command, and print a message before the command to tell the ! user that failure of the @code{ranlib} command does not mean a problem. ! (The Autoconf @samp{AC_PROG_RANLIB} macro can help with this.) If you use symbolic links, you should implement a fallback for systems that don't have symbolic links. It is ok to use other utilities in Makefile portions (or scripts) intended only for particular systems where you know those utilities exist. --- 160,192 ---- mean: @example ! ar bison cc flex install ld ldconfig lex make makeinfo ranlib texi2dvi yacc @end example ! Use the following @code{make} variables to run those programs: @example ! $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX) $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) @end example ! When you use @code{ranlib} or @code{ldconfig}, you should make sure ! nothing bad happens if the system does not have the program in question. ! Arrange to ignore an error from that command, and print a message before ! the command to tell the user that failure of this command does not mean ! a problem. (The Autoconf @samp{AC_PROG_RANLIB} macro can help with ! this.) If you use symbolic links, you should implement a fallback for systems that don't have symbolic links. + Additional utilities that can be used via Make variables are: + + @example + chgrp chmod chown mknod + @end example + It is ok to use other utilities in Makefile portions (or scripts) intended only for particular systems where you know those utilities exist. *************** *** 212,217 **** --- 239,247 ---- containing compiler options, so the user can use @code{CFLAGS} to override the others. + @code{CFLAGS} should be used in every invocation of the C compiler, + both those which do compilation and those which do linking. + Every Makefile should define the variable @code{INSTALL}, which is the basic command for installing a file into the system. *************** *** 328,341 **** write it as @file{$(prefix)/etc}. (If you are using Autoconf, write it as @samp{@@sysconfdir@@}.) ! @c rewritten to avoid overfull hbox --tower ! Do not install executables ! @c here ! in this directory (they probably ! belong in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not ! install files that are modified in the normal course of their use ! (programs whose purpose is to change the configuration of the system ! excluded). Those probably belong in @file{$(localstatedir)}. @item sharedstatedir The directory for installing architecture-independent data files which --- 358,368 ---- write it as @file{$(prefix)/etc}. (If you are using Autoconf, write it as @samp{@@sysconfdir@@}.) ! Do not install executables here in this directory (they probably belong ! in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not install ! files that are modified in the normal course of their use (programs ! whose purpose is to change the configuration of the system excluded). ! Those probably belong in @file{$(localstatedir)}. @item sharedstatedir The directory for installing architecture-independent data files which *************** *** 388,394 **** @file{$(prefix)/include}. (If you are using Autoconf, write it as @samp{@@includedir@@}.) ! Most compilers other than GCC do not look for header files in @file{/usr/local/include}. So installing the header files this way is only useful with GCC. Sometimes this is not a problem because some libraries are only really intended to work with GCC. But some libraries --- 415,421 ---- @file{$(prefix)/include}. (If you are using Autoconf, write it as @samp{@@includedir@@}.) ! Most compilers other than GCC do not look for header files in directory @file{/usr/local/include}. So installing the header files this way is only useful with GCC. Sometimes this is not a problem because some libraries are only really intended to work with GCC. But some libraries *************** *** 541,546 **** --- 568,574 ---- @comment Please do not reformat it without talking to roland@gnu.ai.mit.edu. @smallexample $(infodir)/foo.info: foo.info + $(POST_INSTALL) # There may be a newer info file in . than in srcdir. -if test -f foo.info; then d=.; \ else d=$(srcdir); fi; \ *************** *** 557,573 **** else true; fi @end smallexample @item uninstall ! Delete all the installed files that the @samp{install} target would ! create (but not the noninstalled files such as @samp{make all} would ! create). This rule should not modify the directories where compilation is done, only the directories where files are installed. @item install-strip Like @code{install}, but strip the executable files while installing ! them. The definition of this target can be very simple: @smallexample install-strip: --- 585,608 ---- else true; fi @end smallexample + When writing the @code{install} target, you must classify all the + commands into three categories: normal ones, @dfn{pre-installation} + commands and @dfn{post-installation} commands. @xref{Install Command + Categories}. + @item uninstall ! Delete all the installed files---the copies that the @samp{install} ! target creates. This rule should not modify the directories where compilation is done, only the directories where files are installed. + The uninstallation commands are divided into three categories, just like + the installation commands. @xref{Install Command Categories}. + @item install-strip Like @code{install}, but strip the executable files while installing ! them. In many cases, the definition of this target can be very simple: @smallexample install-strip: *************** *** 652,657 **** --- 687,698 ---- run the @code{makeinfo} program, which is part of the Texinfo distribution. + Normally a GNU distribution comes with Info files, and that means the + Info files are present in the source directory. Therefore, the Make + rule for an info file should update it in the source directory. When + users build the package, ordinarily Make will not update the Info files + because they will already be up to date. + @item dvi Generate DVI files for all Texinfo documentation. For example: *************** *** 734,736 **** --- 775,893 ---- This rule should not modify the directories where compilation is done. It should do nothing but create installation directories. @end table + + @node Install Command Categories + @section Install Command Categories + + @cindex pre-installation commands + @cindex post-installation commands + When writing the @code{install} target, you must classify all the + commands into three categories: normal ones, @dfn{pre-installation} + commands and @dfn{post-installation} commands. + + Normal commands move files into their proper places, and set their + modes. They may not alter any files except the ones that come entirely + from the package they belong to. + + Pre-installation and post-installation commands may alter other files; + in particular, they can edit global configuration files or data bases. + + Pre-installation commands are typically executed before the normal + commands, and post-installation commands are typically run after the + normal commands. + + The most common use for a post-installation command is to run + @code{install-info}. This cannot be done with a normal command, since + it alters a file (the Info directory) which does not come entirely and + solely from the package being installed. It is a post-installation + command because it needs to be done after the normal command which + installs the package's Info files. + + Most programs don't need any pre-installation commands, but we have the + feature just in case it is needed. + + To classify the commands in the @code{install} rule into these three + categories, insert @dfn{category lines} among them. A category line + specifies the category for the commands that follow. + + A category line consists of a tab and a reference to a special Make + variable, plus an optional comment at the end. There are three + variables you can use, one for each category; the variable name + specifies the category. Category lines are no-ops in ordinary execution + because these three Make variables are normally undefined (and you + @emph{should not} define them in the makefile). + + Here are the three possible category lines, each with a comment that + explains what it means: + + @smallexample + $(PRE_INSTALL) # @r{Pre-install commands follow.} + $(POST_INSTALL) # @r{Post-install commands follow.} + $(NORMAL_INSTALL) # @r{Normal commands follow.} + @end smallexample + + If you don't use a category line at the beginning of the @code{install} + rule, all the commands are classified as normal until the first category + line. If you don't use any category lines, all the commands are + classified as normal. + + These are the category lines for @code{uninstall}: + + @smallexample + $(PRE_UNINSTALL) # @r{Pre-uninstall commands follow.} + $(POST_UNINSTALL) # @r{Post-uninstall commands follow.} + $(NORMAL_UNINSTALL) # @r{Normal commands follow.} + @end smallexample + + Typically, a pre-uninstall command would be used for deleting entries + from the Info directory. + + If the @code{install} or @code{uninstall} target has any dependencies + which act as subroutines of installation, then you should start + @emph{each} dependency's commands with a category line, and start the + main target's commands with a category line also. This way, you can + ensure that each command is placed in the right category regardless of + which of the dependencies actually run. + + Pre-installation and post-installation commands should not run any + programs except for these: + + @example + [ basename bash cat chgrp chmod chown cmp cp dd diff echo + egrep expand expr false fgrep find getopt grep gunzip gzip + hostname install install-info kill ldconfig ln ls md5sum + mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee + test touch true uname xargs yes + @end example + + @cindex binary packages + The reason for distinguishing the commands in this way is for the sake + of making binary packages. Typically a binary package contains all the + executables and other files that need to be installed, and has its own + method of installing them---so it does not need to run the normal + installation commands. But installing the binary package does need to + execute the pre-installation and post-installation commands. + + Programs to build binary packages work by extracting the + pre-installation and post-installation commands. Here is one way of + extracting the pre-installation commands: + + @smallexample + make -n install -o all \ + PRE_INSTALL=pre-install \ + POST_INSTALL=post-install \ + NORMAL_INSTALL=normal-install \ + | gawk -f pre-install.awk + @end smallexample + + @noindent + where the file @file{pre-install.awk} could contain this: + + @smallexample + $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ @{on = 0@} + on @{print $0@} + $0 ~ /^\t[ \t]*pre_install[ \t]*$/ @{on = 1@} + @end smallexample + + The resulting file of pre-installation commands is executed as a shell + script as part of installing the binary package. Only in ../make-3.75: make.aux Only in ../make-3.75: make.cp Only in ../make-3.75: make.cps Only in ../make-3.75: make.fn Only in ../make-3.75: make.fns diff -crP ../make-3.75/make.h ./make.h *** ../make-3.75/make.h Sun Jul 14 12:30:11 1996 --- ./make.h Wed Aug 27 16:31:16 1997 *************** *** 1,5 **** /* Miscellaneous global declarations and portability cruft for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Miscellaneous global declarations and portability cruft for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 72,78 **** #include /* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */ ! #if defined (_POSIX_VERSION) && !defined (ultrix) #define POSIX #endif #endif --- 72,78 ---- #include /* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */ ! #if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS) #define POSIX #endif #endif *************** *** 137,142 **** --- 137,155 ---- #define PATH_VAR(var) char *var = (char *) alloca (GET_PATH_MAX) #endif + #ifndef CHAR_BIT + #define CHAR_BIT 8 + #endif + + /* Nonzero if the integer type T is signed. */ + #define INTEGER_TYPE_SIGNED(t) ((t) -1 < 0) + + /* The minimum and maximum values for the integer type T. + Use ~ (t) 0, not -1, for portability to 1's complement hosts. */ + #define INTEGER_TYPE_MINIMUM(t) \ + (! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)) + #define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t)) + #ifdef STAT_MACROS_BROKEN #ifdef S_ISREG #undef S_ISREG *************** *** 202,209 **** #ifndef bzero #define bzero(s, n) memset ((s), 0, (n)) #endif ! #ifndef bcopy ! #define bcopy(s, d, n) memcpy ((d), (s), (n)) #endif #else /* Not ANSI_STRING. */ --- 215,222 ---- #ifndef bzero #define bzero(s, n) memset ((s), 0, (n)) #endif ! #if defined(HAVE_MEMMOVE) && !defined(bcopy) ! #define bcopy(s, d, n) memmove ((d), (s), (n)) #endif #else /* Not ANSI_STRING. */ *************** *** 277,289 **** #define ENUM_BITFIELD(bits) #endif ! #if defined(__MSDOS__) || defined(WIN32) #define PATH_SEPARATOR_CHAR ';' #else #define PATH_SEPARATOR_CHAR ':' #endif ! #ifdef WIN32 #include #include #define pipe(p) _pipe(p, 512, O_BINARY) --- 290,306 ---- #define ENUM_BITFIELD(bits) #endif ! #if defined(__MSDOS__) || defined(WINDOWS32) #define PATH_SEPARATOR_CHAR ';' #else + #if defined(VMS) + #define PATH_SEPARATOR_CHAR ',' + #else #define PATH_SEPARATOR_CHAR ':' #endif + #endif ! #ifdef WINDOWS32 #include #include #define pipe(p) _pipe(p, 512, O_BINARY) *************** *** 346,351 **** --- 363,369 ---- extern void build_vpath_lists (); extern void construct_vpath_list (); extern int vpath_search (); + extern int gpath_search (); extern void construct_include_path (); extern void uniquize_deps (); *************** *** 362,370 **** #endif /* We omit these declarations on non-POSIX systems which define _POSIX_VERSION, ! because such systems often declare the in header files anyway. */ ! #if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WIN32) extern long int atol (); #ifndef VMS --- 380,388 ---- #endif /* We omit these declarations on non-POSIX systems which define _POSIX_VERSION, ! because such systems often declare them in header files anyway. */ ! #if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32) extern long int atol (); #ifndef VMS *************** *** 393,398 **** --- 411,417 ---- extern int env_overrides, no_builtin_rules_flag, print_version_flag; extern int print_directory_flag, warn_undefined_variables_flag; extern int posix_pedantic; + extern int clock_skew_detected; extern unsigned int job_slots; #ifndef NO_FLOAT diff -crP ../make-3.75/make.info ./make.info *** ../make-3.75/make.info Sun Jul 14 13:12:08 1996 --- ./make.info Tue Sep 16 11:04:28 1997 *************** *** 1,15 **** ! This is Info file make.info, produced by Makeinfo-1.63 from the input ! file ./make.texinfo. This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 9 May 1996, of `The GNU Make ! Manual', for `make', Version 3.75 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 ! Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 1,20 ---- ! This is Info file make.info, produced by Makeinfo version 1.67 from the ! input file make.texinfo. ! ! INFO-DIR-SECTION The GNU make utility ! START-INFO-DIR-ENTRY ! * GNU make: (make.info). The GNU make utility. ! END-INFO-DIR-ENTRY This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make ! Manual', for `make', Version 3.76 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 27,163 ****  Indirect: ! make.info-1: 1143 ! make.info-2: 50901 ! make.info-3: 98077 ! make.info-4: 147555 ! make.info-5: 196863 ! make.info-6: 244594 ! make.info-7: 286284 ! make.info-8: 322867  Tag Table: (Indirect) ! Node: Top1143 ! Node: Overview12012 ! Node: Preparing12949 ! Node: Reading13904 ! Node: Bugs14826 ! Node: Introduction16263 ! Node: Rule Introduction17850 ! Node: Simple Makefile19559 ! Node: How Make Works23172 ! Node: Variables Simplify25660 ! Node: make Deduces27866 ! Node: Combine By Dependency29613 ! Node: Cleanup30641 ! Node: Makefiles32051 ! Node: Makefile Contents32748 ! Node: Makefile Names35008 ! Node: Include36610 ! Node: MAKEFILES Variable40123 ! Node: Remaking Makefiles41625 ! Node: Overriding Makefiles45443 ! Node: Rules47466 ! Node: Rule Example50066 ! Node: Rule Syntax50901 ! Node: Wildcards53110 ! Node: Wildcard Examples54620 ! Node: Wildcard Pitfall55855 ! Node: Wildcard Function57105 ! Node: Directory Search58886 ! Node: General Search59946 ! Node: Selective Search61464 ! Node: Commands/Search64384 ! Node: Implicit/Search65724 ! Node: Libraries/Search66659 ! Node: Phony Targets67728 ! Node: Force Targets71073 ! Node: Empty Targets72110 ! Node: Special Targets73370 ! Node: Multiple Targets77872 ! Node: Multiple Rules79739 ! Node: Static Pattern81822 ! Node: Static Usage82462 ! Node: Static versus Implicit86116 ! Node: Double-Colon87847 ! Node: Automatic Dependencies89377 ! Node: Commands93459 ! Node: Echoing95151 ! Node: Execution96409 ! Node: Parallel98077 ! Node: Errors101392 ! Node: Interrupts105028 ! Node: Recursion106609 ! Node: MAKE Variable107895 ! Node: Variables/Recursion109853 ! Node: Options/Recursion114816 ! Node: -w Option119419 ! Node: Sequences120405 ! Node: Empty Commands123400 ! Node: Using Variables124568 ! Node: Reference127552 ! Node: Flavors129097 ! Node: Advanced134414 ! Node: Substitution Refs134914 ! Node: Computed Names136441 ! Node: Values141011 ! Node: Setting141928 ! Node: Appending143637 ! Node: Override Directive147555 ! Node: Defining148934 ! Node: Environment150932 ! Node: Conditionals153060 ! Node: Conditional Example153769 ! Node: Conditional Syntax156335 ! Node: Testing Flags161081 ! Node: Functions162178 ! Node: Syntax of Functions163176 ! Node: Text Functions165313 ! Node: Filename Functions172067 ! Node: Foreach Function177188 ! Node: Origin Function180394 ! Node: Shell Function183619 ! Node: Running184996 ! Node: Makefile Arguments186984 ! Node: Goals187679 ! Node: Instead of Execution191681 ! Node: Avoiding Compilation194962 ! Node: Overriding196863 ! Node: Testing199151 ! Node: Options Summary201028 ! Node: Implicit Rules207838 ! Node: Using Implicit209984 ! Node: Catalogue of Rules213471 ! Node: Implicit Variables222452 ! Node: Chained Rules226578 ! Node: Pattern Rules230571 ! Node: Pattern Intro232099 ! Node: Pattern Examples234910 ! Node: Automatic236703 ! Node: Pattern Match242990 ! Node: Match-Anything Rules244594 ! Node: Canceling Rules248453 ! Node: Last Resort249156 ! Node: Suffix Rules250993 ! Node: Search Algorithm254700 ! Node: Archives258196 ! Node: Archive Members258891 ! Node: Archive Update260470 ! Node: Archive Symbols262386 ! Node: Archive Pitfalls263585 ! Node: Archive Suffix Rules264301 ! Node: Features265841 ! Node: Missing274283 ! Node: Makefile Conventions278612 ! Node: Makefile Basics279118 ! Node: Utilities in Makefiles281584 ! Node: Command Variables283453 ! Node: Directory Variables286284 ! Node: Standard Targets296848 ! Node: Quick Reference306602 ! Node: Complex Makefile314200 ! Node: Concept Index322867 ! Node: Name Index361899  End Tag Table --- 32,171 ----  Indirect: ! make.info-1: 1292 ! make.info-2: 50669 ! make.info-3: 99466 ! make.info-4: 149261 ! make.info-5: 195872 ! make.info-6: 245502 ! make.info-7: 293511 ! make.info-8: 338789 ! make.info-9: 379969  Tag Table: (Indirect) ! Node: Top1292 ! Node: Overview12440 ! Node: Preparing13377 ! Node: Reading14332 ! Node: Bugs15254 ! Node: Introduction16691 ! Node: Rule Introduction18278 ! Node: Simple Makefile19987 ! Node: How Make Works23600 ! Node: Variables Simplify26088 ! Node: make Deduces28294 ! Node: Combine By Dependency30041 ! Node: Cleanup31069 ! Node: Makefiles32479 ! Node: Makefile Contents33176 ! Node: Makefile Names35436 ! Node: Include37038 ! Node: MAKEFILES Variable40726 ! Node: Remaking Makefiles42228 ! Node: Overriding Makefiles46046 ! Node: Rules48069 ! Node: Rule Example50669 ! Node: Rule Syntax51504 ! Node: Wildcards53713 ! Node: Wildcard Examples55393 ! Node: Wildcard Pitfall56628 ! Node: Wildcard Function58411 ! Node: Directory Search60192 ! Node: General Search61323 ! Node: Selective Search63023 ! Node: Search Algorithm65990 ! Node: Commands/Search68492 ! Node: Implicit/Search69832 ! Node: Libraries/Search70767 ! Node: Phony Targets71955 ! Node: Force Targets75300 ! Node: Empty Targets76337 ! Node: Special Targets77597 ! Node: Multiple Targets82103 ! Node: Multiple Rules83970 ! Node: Static Pattern86053 ! Node: Static Usage86693 ! Node: Static versus Implicit90374 ! Node: Double-Colon92105 ! Node: Automatic Dependencies93635 ! Node: Commands97774 ! Node: Echoing99466 ! Node: Execution100724 ! Node: Parallel105300 ! Node: Errors108713 ! Node: Interrupts112349 ! Node: Recursion113930 ! Node: MAKE Variable115218 ! Node: Variables/Recursion117182 ! Node: Options/Recursion122145 ! Node: -w Option126752 ! Node: Sequences127738 ! Node: Empty Commands130733 ! Node: Using Variables131901 ! Node: Reference134885 ! Node: Flavors136430 ! Node: Advanced141747 ! Node: Substitution Refs142247 ! Node: Computed Names143774 ! Node: Values148344 ! Node: Setting149261 ! Node: Appending150970 ! Node: Override Directive154888 ! Node: Defining156267 ! Node: Environment158265 ! Node: Conditionals160516 ! Node: Conditional Example161225 ! Node: Conditional Syntax163791 ! Node: Testing Flags168537 ! Node: Functions169634 ! Node: Syntax of Functions170632 ! Node: Text Functions172769 ! Node: File Name Functions179524 ! Node: Foreach Function185235 ! Node: Origin Function188442 ! Node: Shell Function191667 ! Node: Running193189 ! Node: Makefile Arguments195177 ! Node: Goals195872 ! Node: Instead of Execution200426 ! Node: Avoiding Compilation203707 ! Node: Overriding205608 ! Node: Testing207896 ! Node: Options Summary209773 ! Node: Implicit Rules216633 ! Node: Using Implicit218779 ! Node: Catalogue of Rules222270 ! Node: Implicit Variables231251 ! Node: Chained Rules235377 ! Node: Pattern Rules239370 ! Node: Pattern Intro240898 ! Node: Pattern Examples243709 ! Node: Automatic245502 ! Node: Pattern Match251791 ! Node: Match-Anything Rules253395 ! Node: Canceling Rules257254 ! Node: Last Resort257957 ! Node: Suffix Rules259794 ! Node: Implicit Rule Search263505 ! Node: Archives267005 ! Node: Archive Members267700 ! Node: Archive Update269279 ! Node: Archive Symbols271195 ! Node: Archive Pitfalls272394 ! Node: Archive Suffix Rules273110 ! Node: Features274650 ! Node: Missing283225 ! Node: Makefile Conventions287554 ! Node: Makefile Basics288216 ! Node: Utilities in Makefiles291380 ! Node: Command Variables293511 ! Node: Directory Variables296469 ! Node: Standard Targets307046 ! Node: Install Command Categories317553 ! Node: Quick Reference322121 ! Node: Complex Makefile330122 ! Node: Concept Index338789 ! Node: Name Index379969  End Tag Table diff -crP ../make-3.75/make.info-1 ./make.info-1 *** ../make-3.75/make.info-1 Sun Jul 14 13:12:06 1996 --- ./make.info-1 Tue Sep 16 11:04:27 1997 *************** *** 1,15 **** ! This is Info file make.info, produced by Makeinfo-1.63 from the input ! file ./make.texinfo. This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 9 May 1996, of `The GNU Make ! Manual', for `make', Version 3.75 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 ! Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 1,20 ---- ! This is Info file make.info, produced by Makeinfo version 1.67 from the ! input file make.texinfo. ! ! INFO-DIR-SECTION The GNU make utility ! START-INFO-DIR-ENTRY ! * GNU make: (make.info). The GNU make utility. ! END-INFO-DIR-ENTRY This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make ! Manual', for `make', Version 3.76 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 26,32 **** translation approved by the Free Software Foundation.  ! File: make.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) Make **** --- 31,37 ---- translation approved by the Free Software Foundation.  ! File: make.info, Node: Top, Next: Overview, Up: (dir) Make **** *************** *** 35,42 **** large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51 of the `GNU Make Manual', last updated 9 May ! 1996 for `make' Version 3.75 Beta. This manual describes `make' and contains the following chapters: --- 40,47 ---- large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51 of the `GNU Make Manual', last updated 26 Aug ! 1997 for `make' Version 3.76 Beta. This manual describes `make' and contains the following chapters: *************** *** 128,133 **** --- 133,139 ---- to every dependency. * Selective Search:: Specifying a search path for a specified class of names. + * Search Algorithm:: When and how search paths are applied. * Commands/Search:: How to write shell commands that work together with search paths. * Implicit/Search:: How search paths affect implicit rules. *************** *** 171,176 **** --- 177,184 ---- * Defining:: An alternate way to set a variable to a verbatim string. * Environment:: Variable values can come from the environment. + * Automatic:: Some special variables have predefined + meanings for use with implicit rules. Advanced Features for Reference to Variables *************** *** 188,194 **** * Syntax of Functions:: How to write a function call. * Text Functions:: General-purpose text manipulation functions. ! * Filename Functions:: Functions for manipulating file names. * Foreach Function:: Repeat some text with controlled variation. * Origin Function:: Find where a variable got its value. * Shell Function:: Substitute the output of a shell command. --- 196,202 ---- * Syntax of Functions:: How to write a function call. * Text Functions:: General-purpose text manipulation functions. ! * File Name Functions:: Functions for manipulating file names. * Foreach Function:: Repeat some text with controlled variation. * Origin Function:: Find where a variable got its value. * Shell Function:: Substitute the output of a shell command. *************** *** 220,226 **** * Last Resort:: How to defining commands for rules which cannot find any. * Suffix Rules:: The old-fashioned style of implicit rule. ! * Search Algorithm:: The precise algorithm for applying implicit rules. Defining and Redefining Pattern Rules --- 228,234 ---- * Last Resort:: How to defining commands for rules which cannot find any. * Suffix Rules:: The old-fashioned style of implicit rule. ! * Implicit Rule Search:: The precise algorithm for applying implicit rules. Defining and Redefining Pattern Rules *************** *** 239,244 **** --- 247,253 ---- * Archive Members:: Archive members as targets. * Archive Update:: The implicit rule for archive member targets. + * Archive Pitfalls:: Dangers to watch out for when using archives. * Archive Suffix Rules:: You can write a special kind of suffix rule for updating archives. *************** *** 897,905 **** searched. First, any directories you have specified with the `-I' or `--include-dir' option are searched (*note Summary of Options: Options Summary.). Then the following directories (if they exist) are ! searched, in this order: `PREFIX/include' (normally ! `/usr/local/include') `/usr/gnu/include', `/usr/local/include', ! `/usr/include'. If an included makefile cannot be found in any of these directories, a warning message is generated, but it is not an immediately fatal --- 906,913 ---- searched. First, any directories you have specified with the `-I' or `--include-dir' option are searched (*note Summary of Options: Options Summary.). Then the following directories (if they exist) are ! searched, in this order: `PREFIX/include' (normally `/usr/local/include' ! (1)) `/usr/gnu/include', `/usr/local/include', `/usr/include'. If an included makefile cannot be found in any of these directories, a warning message is generated, but it is not an immediately fatal *************** *** 921,926 **** --- 929,939 ---- compatibility with some other `make' implementations, `sinclude' is another name for `-include'. + ---------- Footnotes ---------- + + (1) GNU Make compiled for MS-DOS and MS-Windows behaves as if + PREFIX has been defined to be the root of the DJGPP tree hierarchy. +  File: make.info, Node: MAKEFILES Variable, Next: Remaking Makefiles, Prev: Include, Up: Makefiles *************** *** 1113,1142 **** several independent rules for one target. * Automatic Dependencies:: How to automatically generate rules giving dependencies from the source files themselves. - -  - File: make.info, Node: Rule Example, Next: Rule Syntax, Up: Rules - - Rule Example - ============ - - Here is an example of a rule: - - foo.o : foo.c defs.h # module for twiddling the frobs - cc -c -g foo.c - - Its target is `foo.o' and its dependencies are `foo.c' and `defs.h'. - It has one command, which is `cc -c -g foo.c'. The command line - starts with a tab to identify it as a command. - - This rule says two things: - - * How to decide whether `foo.o' is out of date: it is out of date if - it does not exist, or if either `foo.c' or `defs.h' is more recent - than it. - - * How to update the file `foo.o': by running `cc' as stated. The - command does not explicitly mention `defs.h', but we presume that - `foo.c' includes it, and that that is why `defs.h' was added to - the dependencies. --- 1126,1129 ---- diff -crP ../make-3.75/make.info-2 ./make.info-2 *** ../make-3.75/make.info-2 Sun Jul 14 13:12:06 1996 --- ./make.info-2 Tue Sep 16 11:04:28 1997 *************** *** 1,15 **** ! This is Info file make.info, produced by Makeinfo-1.63 from the input ! file ./make.texinfo. This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 9 May 1996, of `The GNU Make ! Manual', for `make', Version 3.75 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 ! Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 1,20 ---- ! This is Info file make.info, produced by Makeinfo version 1.67 from the ! input file make.texinfo. ! ! INFO-DIR-SECTION The GNU make utility ! START-INFO-DIR-ENTRY ! * GNU make: (make.info). The GNU make utility. ! END-INFO-DIR-ENTRY This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make ! Manual', for `make', Version 3.76 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 26,31 **** --- 31,62 ---- translation approved by the Free Software Foundation.  + File: make.info, Node: Rule Example, Next: Rule Syntax, Up: Rules + + Rule Example + ============ + + Here is an example of a rule: + + foo.o : foo.c defs.h # module for twiddling the frobs + cc -c -g foo.c + + Its target is `foo.o' and its dependencies are `foo.c' and `defs.h'. + It has one command, which is `cc -c -g foo.c'. The command line + starts with a tab to identify it as a command. + + This rule says two things: + + * How to decide whether `foo.o' is out of date: it is out of date if + it does not exist, or if either `foo.c' or `defs.h' is more recent + than it. + + * How to update the file `foo.o': by running `cc' as stated. The + command does not explicitly mention `defs.h', but we presume that + `foo.c' includes it, and that that is why `defs.h' was added to + the dependencies. + +  File: make.info, Node: Rule Syntax, Next: Wildcards, Prev: Rule Example, Up: Rules Rule Syntax *************** *** 97,103 **** directory. For example `~/bin' expands to `/home/you/bin'. If the `~' is followed by a word, the string represents the home directory of the user named by that word. For example `~john/bin' expands to ! `/home/john/bin'. Wildcard expansion happens automatically in targets, in dependencies, and in commands (where the shell does the expansion). In other --- 128,136 ---- directory. For example `~/bin' expands to `/home/you/bin'. If the `~' is followed by a word, the string represents the home directory of the user named by that word. For example `~john/bin' expands to ! `/home/john/bin'. On systems which don't have a home directory for ! each user (such as MS-DOS or MS-Windows), this functionality can be ! simulated by setting the environment variable HOME. Wildcard expansion happens automatically in targets, in dependencies, and in commands (where the shell does the expansion). In other *************** *** 186,191 **** --- 219,236 ---- `wildcard' function and string substitution. *Note The Function `wildcard': Wildcard Function. + Microsoft operating systems (MS-DOS and MS-Windows) use backslashes + to separate directories in pathnames, like so: + + c:\foo\bar\baz.c + + This is equivalent to the Unix-style `c:/foo/bar/baz.c' (the `c:' + part is the so-called drive letter). When `make' runs on these + systems, it supports backslashes as well as the Unix-style forward + slashes in pathnames. However, this support does *not* include the + wildcard expansion, where backslash is a quote character. Therefore, + you *must* use Unix-style slashes in these cases. +  File: make.info, Node: Wildcard Function, Prev: Wildcard Pitfall, Up: Wildcards *************** *** 252,257 **** --- 297,303 ---- to every dependency. * Selective Search:: Specifying a search path for a specified class of names. + * Search Algorithm:: When and how search paths are applied. * Commands/Search:: How to write shell commands that work together with search paths. * Implicit/Search:: How search paths affect implicit rules. *************** *** 272,285 **** Thus, if a file that is listed as a target or dependency does not exist in the current directory, `make' searches the directories listed in `VPATH' for a file with that name. If a file is found in one of ! them, that file becomes the dependency. Rules may then specify the ! names of source files in the dependencies as if they all existed in the ! current directory. *Note Writing Shell Commands with Directory Search: ! Commands/Search. In the `VPATH' variable, directory names are separated by colons or blanks. The order in which directories are listed is the order followed ! by `make' in its search. For example, --- 318,333 ---- Thus, if a file that is listed as a target or dependency does not exist in the current directory, `make' searches the directories listed in `VPATH' for a file with that name. If a file is found in one of ! them, that file may become the dependency (see below). Rules may then ! specify the names of files in the dependency list as if they all ! existed in the current directory. *Note Writing Shell Commands with ! Directory Search: Commands/Search. In the `VPATH' variable, directory names are separated by colons or blanks. The order in which directories are listed is the order followed ! by `make' in its search. (On MS-DOS and MS-Windows, semi-colons are ! used as separators of directory names in `VPATH', since the colon can ! be used in the pathname itself, after the drive letter.) For example, *************** *** 300,313 **** is found in the directory `src'.  ! File: make.info, Node: Selective Search, Next: Commands/Search, Prev: General Search, Up: Directory Search The `vpath' Directive --------------------- ! Similar to the `VPATH' variable but more selective is the `vpath' directive (note lower case), which allows you to specify a search path ! for a particular class of file names, those that match a particular pattern. Thus you can supply certain search directories for one class of file names and other directories (or none) for other file names. --- 348,361 ---- is found in the directory `src'.  ! File: make.info, Node: Selective Search, Next: Search Algorithm, Prev: General Search, Up: Directory Search The `vpath' Directive --------------------- ! Similar to the `VPATH' variable, but more selective, is the `vpath' directive (note lower case), which allows you to specify a search path ! for a particular class of file names: those that match a particular pattern. Thus you can supply certain search directories for one class of file names and other directories (or none) for other file names. *************** *** 318,325 **** PATTERN. The search path, DIRECTORIES, is a list of directories to be ! searched, separated by colons or blanks, just like the search path ! used in the `VPATH' variable. `vpath PATTERN' Clear out the search path associated with PATTERN. --- 366,374 ---- PATTERN. The search path, DIRECTORIES, is a list of directories to be ! searched, separated by colons (semi-colons on MS-DOS and ! MS-Windows) or blanks, just like the search path used in the ! `VPATH' variable. `vpath PATTERN' Clear out the search path associated with PATTERN. *************** *** 378,384 **** will look for a file ending in `.c' in `foo', then `bar', then `blish'.  ! File: make.info, Node: Commands/Search, Next: Implicit/Search, Prev: Selective Search, Up: Directory Search Writing Shell Commands with Directory Search -------------------------------------------- --- 427,491 ---- will look for a file ending in `.c' in `foo', then `bar', then `blish'.  ! File: make.info, Node: Search Algorithm, Next: Commands/Search, Prev: Selective Search, Up: Directory Search ! ! How Directory Searches are Performed ! ------------------------------------ ! ! When a dependency is found through directory search, regardless of ! type (general or selective), the pathname located may not be the one ! that `make' actually provides you in the dependency list. Sometimes ! the path discovered through directory search is thrown away. ! ! The algorithm `make' uses to decide whether to keep or abandon a ! path found via directory search is as follows: ! ! 1. If a target file does not exist at the path specified in the ! makefile, directory search is performed. ! ! 2. If the directory search is successful, that path is kept and this ! file is tentatively stored as the target. ! ! 3. All dependencies of this target are examined using this same ! method. ! ! 4. After processing the dependencies, the target may or may not need ! to be rebuilt: ! ! a. If the target does *not* need to be rebuilt, the path to the ! file found during directory search is used for any dependency ! lists which contain this target. In short, if `make' doesn't ! need to rebuild the target then you use the path found via ! directory search. ! ! b. If the target *does* need to be rebuilt (is out-of-date), the ! pathname found during directory search is *thrown away*, and ! the target is rebuilt using the file name specified in the ! makefile. In short, if `make' must rebuild, then the target ! is rebuilt locally, not in the directory found via directory ! search. ! ! This algorithm may seem complex, but in practice it is quite often ! exactly what you want. ! ! Other versions of `make' use a simpler algorithm: if the file does ! not exist, and it is found via directory search, then that pathname is ! always used whether or not the target needs to be built. Thus, if the ! target is rebuilt it is created at the pathname discovered during ! directory search. ! ! If, in fact, this is the behavior you want for some or all of your ! directories, you can use the `GPATH' variable to indicate this to ! `make'. ! ! `GPATH' has the same syntax and format as `VPATH' (that is, a space- ! or colon-delimited list of pathnames). If an out-of-date target is ! found by directory search in a directory that also appears in `GPATH', ! then that pathname is not thrown away. The target is rebuilt using the ! expanded path. ! !  ! File: make.info, Node: Commands/Search, Next: Implicit/Search, Prev: Search Algorithm, Up: Directory Search Writing Shell Commands with Directory Search -------------------------------------------- *************** *** 449,455 **** specially by searching for the file `libNAME.a' in the current directory, in directories specified by matching `vpath' search paths and the `VPATH' search path, and then in the directories `/lib', ! `/usr/lib', and `PREFIX/lib' (normally `/usr/local/lib'). For example, --- 556,564 ---- specially by searching for the file `libNAME.a' in the current directory, in directories specified by matching `vpath' search paths and the `VPATH' search path, and then in the directories `/lib', ! `/usr/lib', and `PREFIX/lib' (normally `/usr/local/lib', but ! MS-DOS/MS-Windows versions of `make' behave as if PREFIX is defined to ! be the root of the DJGPP installation tree). For example, *************** *** 636,642 **** *Note Last Resort::. If `.DEFAULT' commands are specified, every file mentioned as a dependency, but not as a target in a rule, will have these commands executed on its behalf. *Note Implicit ! Rule Search Algorithm: Search Algorithm. `.PRECIOUS' The targets which `.PRECIOUS' depends on are given the following --- 745,751 ---- *Note Last Resort::. If `.DEFAULT' commands are specified, every file mentioned as a dependency, but not as a target in a rule, will have these commands executed on its behalf. *Note Implicit ! Rule Search Algorithm: Implicit Rule Search. `.PRECIOUS' The targets which `.PRECIOUS' depends on are given the following *************** *** 870,875 **** --- 979,986 ---- objects = foo.o bar.o + all: $(objects) + $(objects): %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ *************** *** 1035,1041 **** %.d: %.c $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \ ! | sed '\''s/\($*\)\.o[ :]*/\1 $@/g'\'' > $@' *Note Pattern Rules::, for information on defining pattern rules. The `-e' flag to the shell makes it exit immediately if the `$(CC)' command --- 1146,1153 ---- %.d: %.c $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \ ! | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ ! [ -s $@ ] || rm -f $@' *Note Pattern Rules::, for information on defining pattern rules. The `-e' flag to the shell makes it exit immediately if the `$(CC)' command *************** *** 1110,1183 **** * Recursion:: Invoking `make' from makefiles. * Sequences:: Defining canned sequences of commands. * Empty Commands:: Defining useful, do-nothing commands. - -  - File: make.info, Node: Echoing, Next: Execution, Up: Commands - - Command Echoing - =============== - - Normally `make' prints each command line before it is executed. We - call this "echoing" because it gives the appearance that you are typing - the commands yourself. - - When a line starts with `@', the echoing of that line is suppressed. - The `@' is discarded before the command is passed to the shell. - Typically you would use this for a command whose only effect is to print - something, such as an `echo' command to indicate progress through the - makefile: - - @echo About to make distribution files - - When `make' is given the flag `-n' or `--just-print', echoing is all - that happens, no execution. *Note Summary of Options: Options Summary. - In this case and only this case, even the commands starting with `@' - are printed. This flag is useful for finding out which commands `make' - thinks are necessary without actually doing them. - - The `-s' or `--silent' flag to `make' prevents all echoing, as if - all commands started with `@'. A rule in the makefile for the special - target `.SILENT' without dependencies has the same effect (*note - Special Built-in Target Names: Special Targets.). `.SILENT' is - essentially obsolete since `@' is more flexible. - -  - File: make.info, Node: Execution, Next: Parallel, Prev: Echoing, Up: Commands - - Command Execution - ================= - - When it is time to execute commands to update a target, they are - executed by making a new subshell for each line. (In practice, `make' - may take shortcuts that do not affect the results.) - - *Please note:* this implies that shell commands such as `cd' that - set variables local to each process will not affect the following - command lines. If you want to use `cd' to affect the next command, put - the two on a single line with a semicolon between them. Then `make' - will consider them a single command and pass them, together, to a shell - which will execute them in sequence. For example: - - foo : bar/lose - cd bar; gobble lose > ../foo - - If you would like to split a single shell command into multiple - lines of text, you must use a backslash at the end of all but the last - subline. Such a sequence of lines is combined into a single line, by - deleting the backslash-newline sequences, before passing it to the - shell. Thus, the following is equivalent to the preceding example: - - foo : bar/lose - cd bar; \ - gobble lose > ../foo - - The program used as the shell is taken from the variable `SHELL'. - By default, the program `/bin/sh' is used. - - Unlike most variables, the variable `SHELL' is never set from the - environment. This is because the `SHELL' environment variable is used - to specify your personal choice of shell program for interactive use. - It would be very bad for personal choices like this to affect the - functioning of makefiles. *Note Variables from the Environment: - Environment. --- 1222,1225 ---- diff -crP ../make-3.75/make.info-3 ./make.info-3 *** ../make-3.75/make.info-3 Sun Jul 14 13:12:07 1996 --- ./make.info-3 Tue Sep 16 11:04:28 1997 *************** *** 1,15 **** ! This is Info file make.info, produced by Makeinfo-1.63 from the input ! file ./make.texinfo. This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 9 May 1996, of `The GNU Make ! Manual', for `make', Version 3.75 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 ! Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 1,20 ---- ! This is Info file make.info, produced by Makeinfo version 1.67 from the ! input file make.texinfo. ! ! INFO-DIR-SECTION The GNU make utility ! START-INFO-DIR-ENTRY ! * GNU make: (make.info). The GNU make utility. ! END-INFO-DIR-ENTRY This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make ! Manual', for `make', Version 3.76 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 26,31 **** --- 31,165 ---- translation approved by the Free Software Foundation.  + File: make.info, Node: Echoing, Next: Execution, Up: Commands + + Command Echoing + =============== + + Normally `make' prints each command line before it is executed. We + call this "echoing" because it gives the appearance that you are typing + the commands yourself. + + When a line starts with `@', the echoing of that line is suppressed. + The `@' is discarded before the command is passed to the shell. + Typically you would use this for a command whose only effect is to print + something, such as an `echo' command to indicate progress through the + makefile: + + @echo About to make distribution files + + When `make' is given the flag `-n' or `--just-print', echoing is all + that happens, no execution. *Note Summary of Options: Options Summary. + In this case and only this case, even the commands starting with `@' + are printed. This flag is useful for finding out which commands `make' + thinks are necessary without actually doing them. + + The `-s' or `--silent' flag to `make' prevents all echoing, as if + all commands started with `@'. A rule in the makefile for the special + target `.SILENT' without dependencies has the same effect (*note + Special Built-in Target Names: Special Targets.). `.SILENT' is + essentially obsolete since `@' is more flexible. + +  + File: make.info, Node: Execution, Next: Parallel, Prev: Echoing, Up: Commands + + Command Execution + ================= + + When it is time to execute commands to update a target, they are + executed by making a new subshell for each line. (In practice, `make' + may take shortcuts that do not affect the results.) + + *Please note:* this implies that shell commands such as `cd' that + set variables local to each process will not affect the following + command lines. (1) If you want to use `cd' to affect the next command, + put the two on a single line with a semicolon between them. Then + `make' will consider them a single command and pass them, together, to + a shell which will execute them in sequence. For example: + + foo : bar/lose + cd bar; gobble lose > ../foo + + If you would like to split a single shell command into multiple + lines of text, you must use a backslash at the end of all but the last + subline. Such a sequence of lines is combined into a single line, by + deleting the backslash-newline sequences, before passing it to the + shell. Thus, the following is equivalent to the preceding example: + + foo : bar/lose + cd bar; \ + gobble lose > ../foo + + The program used as the shell is taken from the variable `SHELL'. + By default, the program `/bin/sh' is used. + + On MS-DOS, if `SHELL' is not set, the value of the variable + `COMSPEC' (which is always set) is used instead. + + The processing of lines that set the variable `SHELL' in Makefiles + is different on MS-DOS. The stock shell, `command.com', is + ridiculously limited in its functionality and many users of `make' tend + to install a replacement shell. Therefore, on MS-DOS, `make' examines + the value of `SHELL', and changes its behavior based on whether it + points to a Unix-style or DOS-style shell. This allows reasonable + functionality even if `SHELL' points to `command.com'. + + If `SHELL' points to a Unix-style shell, `make' on MS-DOS + additionally checks whether that shell can indeed be found; if not, it + ignores the line that sets `SHELL'. In MS-DOS, GNU `make' searches for + the shell in the following places: + + 1. In the precise place pointed to by the value of `SHELL'. For + example, if the makefile specifies `SHELL = /bin/sh', `make' will + look in the directory `/bin' on the current drive. + + 2. In the current directory. + + 3. In each of the directories in the `PATH' variable, in order. + + + In every directory it examines, `make' will first look for the + specific file (`sh' in the example above). If this is not found, it + will also look in that directory for that file with one of the known + extensions which identify executable files. For example `.exe', + `.com', `.bat', `.btm', `.sh', and some others. + + If any of these attempts is successful, the value of `SHELL' will be + set to the full pathname of the shell as found. However, if none of + these is found, the value of `SHELL' will not be changed, and thus the + line that sets it will be effectively ignored. This is so `make' will + only support features specific to a Unix-style shell if such a shell is + actually installed on the system where `make' runs. + + Note that this extended search for the shell is limited to the cases + where `SHELL' is set from the Makefile; if it is set in the environment + or command line, you are expected to set it to the full pathname of the + shell, exactly as things are on Unix. + + The effect of the above DOS-specific processing is that a Makefile + that says `SHELL = /bin/sh' (as many Unix makefiles do), will work on + MS-DOS unaltered if you have e.g. `sh.exe' installed in some directory + along your `PATH'. + + Unlike most variables, the variable `SHELL' is never set from the + environment. This is because the `SHELL' environment variable is used + to specify your personal choice of shell program for interactive use. + It would be very bad for personal choices like this to affect the + functioning of makefiles. *Note Variables from the Environment: + Environment. However, on MS-DOS and MS-Windows the value of `SHELL' in + the environment *is* used, since on those systems most users do not set + this variable, and therefore it is most likely set specifically to be + used by `make'. On MS-DOS, if the setting of `SHELL' is not suitable + for `make', you can set the variable `MAKESHELL' to the shell that + `make' should use; this will override the value of `SHELL'. + + ---------- Footnotes ---------- + + (1) On MS-DOS, the value of current working directory is *global*, + so changing it *will* affect the following command lines on those + systems. + +  File: make.info, Node: Parallel, Next: Errors, Prev: Execution, Up: Commands Parallel Execution *************** *** 36,41 **** --- 170,178 ---- finish before executing the next. However, the `-j' or `--jobs' option tells `make' to execute many commands simultaneously. + On MS-DOS, the `-j' option has no effect, since that system doesn't + support multi-processing. + If the `-j' option is followed by an integer, this is the number of commands to execute at once; this is called the number of "job slots". If there is nothing looking like an integer after the `-j' option, *************** *** 215,221 **** subdirectory. You can do it by writing this: subsystem: ! cd subdir; $(MAKE) or, equivalently, this (*note Summary of Options: Options Summary.): --- 352,358 ---- subdirectory. You can do it by writing this: subsystem: ! cd subdir && $(MAKE) or, equivalently, this (*note Summary of Options: Options Summary.): *************** *** 244,254 **** the explicit command name `make', as shown here: subsystem: ! cd subdir; $(MAKE) The value of this variable is the file name with which `make' was invoked. If this file name was `/bin/make', then the command executed ! is `cd subdir; /bin/make'. If you use a special version of `make' to run the top-level makefile, the same special version will be executed for recursive invocations. --- 381,391 ---- the explicit command name `make', as shown here: subsystem: ! cd subdir && $(MAKE) The value of this variable is the file name with which `make' was invoked. If this file name was `/bin/make', then the command executed ! is `cd subdir && /bin/make'. If you use a special version of `make' to run the top-level makefile, the same special version will be executed for recursive invocations. *************** *** 263,269 **** commands; see *Note Instead of Execution::.) Following the usual definition of `-t', a `make -t' command in the example would create a file named `subsystem' and do nothing else. What you really want it to ! do is run `cd subdir; make -t'; but that would require executing the command, and `-t' says not to execute commands. The special feature makes this do what you want: whenever a command --- 400,406 ---- commands; see *Note Instead of Execution::.) Following the usual definition of `-t', a `make -t' command in the example would create a file named `subsystem' and do nothing else. What you really want it to ! do is run `cd subdir && make -t'; but that would require executing the command, and `-t' says not to execute commands. The special feature makes this do what you want: whenever a command *************** *** 440,446 **** value of `MAKEFLAGS', like this: subsystem: ! cd subdir; $(MAKE) MAKEFLAGS= The command line variable definitions really appear in the variable `MAKEOVERRIDES', and `MAKEFLAGS' contains a reference to this variable. --- 577,583 ---- value of `MAKEFLAGS', like this: subsystem: ! cd subdir && $(MAKE) MAKEFLAGS= The command line variable definitions really appear in the variable `MAKEOVERRIDES', and `MAKEFLAGS' contains a reference to this variable. *************** *** 468,474 **** this: subsystem: ! cd subdir; $(MAKE) $(MFLAGS) but now `MAKEFLAGS' makes this usage redundant. If you want your makefiles to be compatible with old `make' programs, use this --- 605,611 ---- this: subsystem: ! cd subdir && $(MAKE) $(MFLAGS) but now `MAKEFLAGS' makes this usage redundant. If you want your makefiles to be compatible with old `make' programs, use this *************** *** 1082,1222 **** * Several variables have constant initial values. *Note Variables Used by Implicit Rules: Implicit Variables. - -  - File: make.info, Node: Setting, Next: Appending, Prev: Values, Up: Using Variables - - Setting Variables - ================= - - To set a variable from the makefile, write a line starting with the - variable name followed by `=' or `:='. Whatever follows the `=' or - `:=' on the line becomes the value. For example, - - objects = main.o foo.o bar.o utils.o - - defines a variable named `objects'. Whitespace around the variable - name and immediately after the `=' is ignored. - - Variables defined with `=' are "recursively expanded" variables. - Variables defined with `:=' are "simply expanded" variables; these - definitions can contain variable references which will be expanded - before the definition is made. *Note The Two Flavors of Variables: - Flavors. - - The variable name may contain function and variable references, which - are expanded when the line is read to find the actual variable name to - use. - - There is no limit on the length of the value of a variable except the - amount of swapping space on the computer. When a variable definition is - long, it is a good idea to break it into several lines by inserting - backslash-newline at convenient places in the definition. This will not - affect the functioning of `make', but it will make the makefile easier - to read. - - Most variable names are considered to have the empty string as a - value if you have never set them. Several variables have built-in - initial values that are not empty, but you can set them in the usual - ways (*note Variables Used by Implicit Rules: Implicit Variables.). - Several special variables are set automatically to a new value for each - rule; these are called the "automatic" variables (*note Automatic - Variables: Automatic.). - -  - File: make.info, Node: Appending, Next: Override Directive, Prev: Setting, Up: Using Variables - - Appending More Text to Variables - ================================ - - Often it is useful to add more text to the value of a variable - already defined. You do this with a line containing `+=', like this: - - objects += another.o - - This takes the value of the variable `objects', and adds the text - `another.o' to it (preceded by a single space). Thus: - - objects = main.o foo.o bar.o utils.o - objects += another.o - - sets `objects' to `main.o foo.o bar.o utils.o another.o'. - - Using `+=' is similar to: - - objects = main.o foo.o bar.o utils.o - objects := $(objects) another.o - - but differs in ways that become important when you use more complex - values. - - When the variable in question has not been defined before, `+=' acts - just like normal `=': it defines a recursively-expanded variable. - However, when there *is* a previous definition, exactly what `+=' does - depends on what flavor of variable you defined originally. *Note The - Two Flavors of Variables: Flavors, for an explanation of the two - flavors of variables. - - When you add to a variable's value with `+=', `make' acts - essentially as if you had included the extra text in the initial - definition of the variable. If you defined it first with `:=', making - it a simply-expanded variable, `+=' adds to that simply-expanded - definition, and expands the new text before appending it to the old - value just as `:=' does (*note Setting Variables: Setting., for a full - explanation of `:='). In fact, - - variable := value - variable += more - - is exactly equivalent to: - - variable := value - variable := $(variable) more - - On the other hand, when you use `+=' with a variable that you defined - first to be recursively-expanded using plain `=', `make' does something - a bit different. Recall that when you define a recursively-expanded - variable, `make' does not expand the value you set for variable and - function references immediately. Instead it stores the text verbatim, - and saves these variable and function references to be expanded later, - when you refer to the new variable (*note The Two Flavors of Variables: - Flavors.). When you use `+=' on a recursively-expanded variable, it is - this unexpanded text to which `make' appends the new text you specify. - - variable = value - variable += more - - is roughly equivalent to: - - temp = value - variable = $(temp) more - - except that of course it never defines a variable called `temp'. The - importance of this comes when the variable's old value contains - variable references. Take this common example: - - CFLAGS = $(includes) -O - ... - CFLAGS += -pg # enable profiling - - The first line defines the `CFLAGS' variable with a reference to another - variable, `includes'. (`CFLAGS' is used by the rules for C - compilation; *note Catalogue of Implicit Rules: Catalogue of Rules..) - Using `=' for the definition makes `CFLAGS' a recursively-expanded - variable, meaning `$(includes) -O' is *not* expanded when `make' - processes the definition of `CFLAGS'. Thus, `includes' need not be - defined yet for its value to take effect. It only has to be defined - before any reference to `CFLAGS'. If we tried to append to the value - of `CFLAGS' without using `+=', we might do it like this: - - CFLAGS := $(CFLAGS) -pg # enable profiling - - This is pretty close, but not quite what we want. Using `:=' redefines - `CFLAGS' as a simply-expanded variable; this means `make' expands the - text `$(CFLAGS) -pg' before setting the variable. If `includes' is not - yet defined, we get ` -O -pg', and a later definition of `includes' - will have no effect. Conversely, by using `+=' we set `CFLAGS' to the - *unexpanded* value `$(includes) -O -pg'. Thus we preserve the - reference to `includes', so if that variable gets defined at any later - point, a reference like `$(CFLAGS)' still uses its value. --- 1219,1222 ---- diff -crP ../make-3.75/make.info-4 ./make.info-4 *** ../make-3.75/make.info-4 Sun Jul 14 13:12:07 1996 --- ./make.info-4 Tue Sep 16 11:04:28 1997 *************** *** 1,15 **** ! This is Info file make.info, produced by Makeinfo-1.63 from the input ! file ./make.texinfo. This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 9 May 1996, of `The GNU Make ! Manual', for `make', Version 3.75 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 ! Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 1,20 ---- ! This is Info file make.info, produced by Makeinfo version 1.67 from the ! input file make.texinfo. ! ! INFO-DIR-SECTION The GNU make utility ! START-INFO-DIR-ENTRY ! * GNU make: (make.info). The GNU make utility. ! END-INFO-DIR-ENTRY This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make ! Manual', for `make', Version 3.76 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 26,31 **** --- 31,173 ---- translation approved by the Free Software Foundation.  + File: make.info, Node: Setting, Next: Appending, Prev: Values, Up: Using Variables + + Setting Variables + ================= + + To set a variable from the makefile, write a line starting with the + variable name followed by `=' or `:='. Whatever follows the `=' or + `:=' on the line becomes the value. For example, + + objects = main.o foo.o bar.o utils.o + + defines a variable named `objects'. Whitespace around the variable + name and immediately after the `=' is ignored. + + Variables defined with `=' are "recursively expanded" variables. + Variables defined with `:=' are "simply expanded" variables; these + definitions can contain variable references which will be expanded + before the definition is made. *Note The Two Flavors of Variables: + Flavors. + + The variable name may contain function and variable references, which + are expanded when the line is read to find the actual variable name to + use. + + There is no limit on the length of the value of a variable except the + amount of swapping space on the computer. When a variable definition is + long, it is a good idea to break it into several lines by inserting + backslash-newline at convenient places in the definition. This will not + affect the functioning of `make', but it will make the makefile easier + to read. + + Most variable names are considered to have the empty string as a + value if you have never set them. Several variables have built-in + initial values that are not empty, but you can set them in the usual + ways (*note Variables Used by Implicit Rules: Implicit Variables.). + Several special variables are set automatically to a new value for each + rule; these are called the "automatic" variables (*note Automatic + Variables: Automatic.). + +  + File: make.info, Node: Appending, Next: Override Directive, Prev: Setting, Up: Using Variables + + Appending More Text to Variables + ================================ + + Often it is useful to add more text to the value of a variable + already defined. You do this with a line containing `+=', like this: + + objects += another.o + + This takes the value of the variable `objects', and adds the text + `another.o' to it (preceded by a single space). Thus: + + objects = main.o foo.o bar.o utils.o + objects += another.o + + sets `objects' to `main.o foo.o bar.o utils.o another.o'. + + Using `+=' is similar to: + + objects = main.o foo.o bar.o utils.o + objects := $(objects) another.o + + but differs in ways that become important when you use more complex + values. + + When the variable in question has not been defined before, `+=' acts + just like normal `=': it defines a recursively-expanded variable. + However, when there *is* a previous definition, exactly what `+=' does + depends on what flavor of variable you defined originally. *Note The + Two Flavors of Variables: Flavors, for an explanation of the two + flavors of variables. + + When you add to a variable's value with `+=', `make' acts + essentially as if you had included the extra text in the initial + definition of the variable. If you defined it first with `:=', making + it a simply-expanded variable, `+=' adds to that simply-expanded + definition, and expands the new text before appending it to the old + value just as `:=' does (*note Setting Variables: Setting., for a full + explanation of `:='). In fact, + + variable := value + variable += more + + is exactly equivalent to: + + variable := value + variable := $(variable) more + + On the other hand, when you use `+=' with a variable that you defined + first to be recursively-expanded using plain `=', `make' does something + a bit different. Recall that when you define a recursively-expanded + variable, `make' does not expand the value you set for variable and + function references immediately. Instead it stores the text verbatim, + and saves these variable and function references to be expanded later, + when you refer to the new variable (*note The Two Flavors of Variables: + Flavors.). When you use `+=' on a recursively-expanded variable, it is + this unexpanded text to which `make' appends the new text you specify. + + variable = value + variable += more + + is roughly equivalent to: + + temp = value + variable = $(temp) more + + except that of course it never defines a variable called `temp'. The + importance of this comes when the variable's old value contains + variable references. Take this common example: + + CFLAGS = $(includes) -O + ... + CFLAGS += -pg # enable profiling + + The first line defines the `CFLAGS' variable with a reference to another + variable, `includes'. (`CFLAGS' is used by the rules for C + compilation; *note Catalogue of Implicit Rules: Catalogue of Rules..) + Using `=' for the definition makes `CFLAGS' a recursively-expanded + variable, meaning `$(includes) -O' is *not* expanded when `make' + processes the definition of `CFLAGS'. Thus, `includes' need not be + defined yet for its value to take effect. It only has to be defined + before any reference to `CFLAGS'. If we tried to append to the value + of `CFLAGS' without using `+=', we might do it like this: + + CFLAGS := $(CFLAGS) -pg # enable profiling + + This is pretty close, but not quite what we want. Using `:=' redefines + `CFLAGS' as a simply-expanded variable; this means `make' expands the + text `$(CFLAGS) -pg' before setting the variable. If `includes' is not + yet defined, we get ` -O -pg', and a later definition of `includes' + will have no effect. Conversely, by using `+=' we set `CFLAGS' to the + *unexpanded* value `$(includes) -O -pg'. Thus we preserve the + reference to `includes', so if that variable gets defined at any later + point, a reference like `$(CFLAGS)' still uses its value. + +  File: make.info, Node: Override Directive, Next: Defining, Prev: Appending, Up: Using Variables The `override' Directive *************** *** 161,167 **** which is normally present in the environment to specify the user's choice of interactive shell. It would be very undesirable for this choice to affect `make'. So `make' ignores the environment value of ! `SHELL'.  File: make.info, Node: Conditionals, Next: Functions, Prev: Using Variables, Up: Top --- 303,310 ---- which is normally present in the environment to specify the user's choice of interactive shell. It would be very undesirable for this choice to affect `make'. So `make' ignores the environment value of ! `SHELL' (except on MS-DOS and MS-Windows, where `SHELL' is usually not ! set. *Note Special handling of SHELL on MS-DOS: Execution.)  File: make.info, Node: Conditionals, Next: Functions, Prev: Using Variables, Up: Top *************** *** 435,441 **** * Syntax of Functions:: How to write a function call. * Text Functions:: General-purpose text manipulation functions. ! * Filename Functions:: Functions for manipulating file names. * Foreach Function:: Repeat some text with controlled variation. * Origin Function:: Find where a variable got its value. * Shell Function:: Substitute the output of a shell command. --- 578,584 ---- * Syntax of Functions:: How to write a function call. * Text Functions:: General-purpose text manipulation functions. ! * File Name Functions:: Functions for manipulating file names. * Foreach Function:: Repeat some text with controlled variation. * Origin Function:: Find where a variable got its value. * Shell Function:: Substitute the output of a shell command. *************** *** 494,500 **** value of `foo', and substitutes the result.  ! File: make.info, Node: Text Functions, Next: Filename Functions, Prev: Syntax of Functions, Up: Functions Functions for String Substitution and Analysis ============================================== --- 637,643 ---- value of `foo', and substitutes the result.  ! File: make.info, Node: Text Functions, Next: File Name Functions, Prev: Syntax of Functions, Up: Functions Functions for String Substitution and Analysis ============================================== *************** *** 676,682 **** Override Directive.).  ! File: make.info, Node: Filename Functions, Next: Foreach Function, Prev: Text Functions, Up: Functions Functions for File Names ======================== --- 819,825 ---- Override Directive.).  ! File: make.info, Node: File Name Functions, Next: Foreach Function, Prev: Text Functions, Up: Functions Functions for File Names ======================== *************** *** 727,745 **** For example, ! $(suffix src/foo.c hacks) ! produces the result `.c'. `$(basename NAMES...)' Extracts all but the suffix of each file name in NAMES. If the file name contains a period, the basename is everything starting ! up to (and not including) the last period. Otherwise, the ! basename is the entire file name. For example, ! $(basename src/foo.c hacks) ! produces the result `src/foo hacks'. `$(addsuffix SUFFIX,NAMES...)' The argument NAMES is regarded as a series of names, separated by --- 870,889 ---- For example, ! $(suffix src/foo.c src-1.0/bar.c hacks) ! produces the result `.c .c'. `$(basename NAMES...)' Extracts all but the suffix of each file name in NAMES. If the file name contains a period, the basename is everything starting ! up to (and not including) the last period. Periods in the ! directory part are ignored. If there is no period, the basename ! is the entire file name. For example, ! $(basename src/foo.c src-1.0/bar hacks) ! produces the result `src/foo src-1.0/bar hacks'. `$(addsuffix SUFFIX,NAMES...)' The argument NAMES is regarded as a series of names, separated by *************** *** 789,794 **** --- 933,950 ---- returns `bar'. + `$(wordlist S,E,TEXT)' + Returns the list of words in TEXT starting with word S and ending + with word E (inclusive). The legitimate values of S and E start + from 1. If S is bigger than the number of words in TEXT, the + value is empty. If E is bigger than the number of words in TEXT, + words up to the end of TEXT are returned. If S is greater than E, + `make' swaps them for you. For example, + + $(wordlist 2, 3, foo bar baz) + + returns `bar baz'. + `$(words TEXT)' Returns the number of words in TEXT. Thus, the last word of TEXT is `$(word $(words TEXT),TEXT)'. *************** *** 814,820 **** File Names: Wildcards.  ! File: make.info, Node: Foreach Function, Next: Origin Function, Prev: Filename Functions, Up: Functions The `foreach' Function ====================== --- 970,976 ---- File Names: Wildcards.  ! File: make.info, Node: Foreach Function, Next: Origin Function, Prev: File Name Functions, Up: Functions The `foreach' Function ====================== *************** *** 988,995 **** (``') perform in most shells: it does "command expansion". This means that it takes an argument that is a shell command and returns the output of the command. The only processing `make' does on the result, ! before substituting it into the surrounding text, is to convert ! newlines to spaces. The commands run by calls to the `shell' function are run when the function calls are expanded. In most cases, this is when the makefile --- 1144,1153 ---- (``') perform in most shells: it does "command expansion". This means that it takes an argument that is a shell command and returns the output of the command. The only processing `make' does on the result, ! before substituting it into the surrounding text, is to convert each ! newline or carriage-return / newline pair to a single space. It also ! removes the trailing (carriage-return and) newline, if it's the last ! thing in the result. The commands run by calls to the `shell' function are run when the function calls are expanded. In most cases, this is when the makefile *************** *** 1073,1296 **** `GNUmakefile', `makefile', and `Makefile', in that order, and use the first of these three which exists or can be made (*note Writing Makefiles: Makefiles.). - -  - File: make.info, Node: Goals, Next: Instead of Execution, Prev: Makefile Arguments, Up: Running - - Arguments to Specify the Goals - ============================== - - The "goals" are the targets that `make' should strive ultimately to - update. Other targets are updated as well if they appear as - dependencies of goals, or dependencies of dependencies of goals, etc. - - By default, the goal is the first target in the makefile (not - counting targets that start with a period). Therefore, makefiles are - usually written so that the first target is for compiling the entire - program or programs they describe. If the first rule in the makefile - has several targets, only the first target in the rule becomes the - default goal, not the whole list. - - You can specify a different goal or goals with arguments to `make'. - Use the name of the goal as an argument. If you specify several goals, - `make' processes each of them in turn, in the order you name them. - - Any target in the makefile may be specified as a goal (unless it - starts with `-' or contains an `=', in which case it will be parsed as - a switch or variable definition, respectively). Even targets not in - the makefile may be specified, if `make' can find implicit rules that - say how to make them. - - One use of specifying a goal is if you want to compile only a part of - the program, or only one of several programs. Specify as a goal each - file that you wish to remake. For example, consider a directory - containing several programs, with a makefile that starts like this: - - .PHONY: all - all: size nm ld ar as - - If you are working on the program `size', you might want to say - `make size' so that only the files of that program are recompiled. - - Another use of specifying a goal is to make files that are not - normally made. For example, there may be a file of debugging output, - or a version of the program that is compiled specially for testing, - which has a rule in the makefile but is not a dependency of the default - goal. - - Another use of specifying a goal is to run the commands associated - with a phony target (*note Phony Targets::.) or empty target (*note - Empty Target Files to Record Events: Empty Targets.). Many makefiles - contain a phony target named `clean' which deletes everything except - source files. Naturally, this is done only if you request it - explicitly with `make clean'. Following is a list of typical phony and - empty target names. *Note Standard Targets::, for a detailed list of - all the standard target names which GNU software packages use. - - `all' - Make all the top-level targets the makefile knows about. - - `clean' - Delete all files that are normally created by running `make'. - - `mostlyclean' - Like `clean', but may refrain from deleting a few files that people - normally don't want to recompile. For example, the `mostlyclean' - target for GCC does not delete `libgcc.a', because recompiling it - is rarely necessary and takes a lot of time. - - `distclean' - `realclean' - `clobber' - Any of these targets might be defined to delete *more* files than - `clean' does. For example, this would delete configuration files - or links that you would normally create as preparation for - compilation, even if the makefile itself cannot create these files. - - `install' - Copy the executable file into a directory that users typically - search for commands; copy any auxiliary files that the executable - uses into the directories where it will look for them. - - `print' - Print listings of the source files that have changed. - - `tar' - Create a tar file of the source files. - - `shar' - Create a shell archive (shar file) of the source files. - - `dist' - Create a distribution file of the source files. This might be a - tar file, or a shar file, or a compressed version of one of the - above, or even more than one of the above. - - `TAGS' - Update a tags table for this program. - - `check' - `test' - Perform self tests on the program this makefile builds. - -  - File: make.info, Node: Instead of Execution, Next: Avoiding Compilation, Prev: Goals, Up: Running - - Instead of Executing the Commands - ================================= - - The makefile tells `make' how to tell whether a target is up to date, - and how to update each target. But updating the targets is not always - what you want. Certain options specify other activities for `make'. - - `-n' - `--just-print' - `--dry-run' - `--recon' - "No-op". The activity is to print what commands would be used to - make the targets up to date, but not actually execute them. - - `-t' - `--touch' - "Touch". The activity is to mark the targets as up to date without - actually changing them. In other words, `make' pretends to compile - the targets but does not really change their contents. - - `-q' - `--question' - "Question". The activity is to find out silently whether the - targets are up to date already; but execute no commands in either - case. In other words, neither compilation nor output will occur. - - `-W FILE' - `--what-if=FILE' - `--assume-new=FILE' - `--new-file=FILE' - "What if". Each `-W' flag is followed by a file name. The given - files' modification times are recorded by `make' as being the - present time, although the actual modification times remain the - same. You can use the `-W' flag in conjunction with the `-n' flag - to see what would happen if you were to modify specific files. - - With the `-n' flag, `make' prints the commands that it would - normally execute but does not execute them. - - With the `-t' flag, `make' ignores the commands in the rules and - uses (in effect) the command `touch' for each target that needs to be - remade. The `touch' command is also printed, unless `-s' or `.SILENT' - is used. For speed, `make' does not actually invoke the program - `touch'. It does the work directly. - - With the `-q' flag, `make' prints nothing and executes no commands, - but the exit status code it returns is zero if and only if the targets - to be considered are already up to date. If the exit status is one, - then some updating needs to be done. If `make' encounters an error, - the exit status is two, so you can distinguish an error from a target - that is not up to date. - - It is an error to use more than one of these three flags in the same - invocation of `make'. - - The `-n', `-t', and `-q' options do not affect command lines that - begin with `+' characters or contain the strings `$(MAKE)' or - `${MAKE}'. Note that only the line containing the `+' character or the - strings `$(MAKE)' or `${MAKE}' is run regardless of these options. - Other lines in the same rule are not run unless they too begin with `+' - or contain `$(MAKE)' or `${MAKE}' (*Note How the `MAKE' Variable Works: - MAKE Variable.) - - The `-W' flag provides two features: - - * If you also use the `-n' or `-q' flag, you can see what `make' - would do if you were to modify some files. - - * Without the `-n' or `-q' flag, when `make' is actually executing - commands, the `-W' flag can direct `make' to act as if some files - had been modified, without actually modifying the files. - - Note that the options `-p' and `-v' allow you to obtain other - information about `make' or about the makefiles in use (*note Summary - of Options: Options Summary.). - -  - File: make.info, Node: Avoiding Compilation, Next: Overriding, Prev: Instead of Execution, Up: Running - - Avoiding Recompilation of Some Files - ==================================== - - Sometimes you may have changed a source file but you do not want to - recompile all the files that depend on it. For example, suppose you - add a macro or a declaration to a header file that many other files - depend on. Being conservative, `make' assumes that any change in the - header file requires recompilation of all dependent files, but you know - that they do not need to be recompiled and you would rather not waste - the time waiting for them to compile. - - If you anticipate the problem before changing the header file, you - can use the `-t' flag. This flag tells `make' not to run the commands - in the rules, but rather to mark the target up to date by changing its - last-modification date. You would follow this procedure: - - 1. Use the command `make' to recompile the source files that really - need recompilation. - - 2. Make the changes in the header files. - - 3. Use the command `make -t' to mark all the object files as up to - date. The next time you run `make', the changes in the header - files will not cause any recompilation. - - If you have already changed the header file at a time when some files - do need recompilation, it is too late to do this. Instead, you can use - the `-o FILE' flag, which marks a specified file as "old" (*note - Summary of Options: Options Summary.). This means that the file itself - will not be remade, and nothing else will be remade on its account. - Follow this procedure: - - 1. Recompile the source files that need compilation for reasons - independent of the particular header file, with `make -o - HEADERFILE'. If several header files are involved, use a separate - `-o' option for each header file. - - 2. Touch all the object files with `make -t'. --- 1231,1234 ---- diff -crP ../make-3.75/make.info-5 ./make.info-5 *** ../make-3.75/make.info-5 Sun Jul 14 13:12:07 1996 --- ./make.info-5 Tue Sep 16 11:04:28 1997 *************** *** 1,15 **** ! This is Info file make.info, produced by Makeinfo-1.63 from the input ! file ./make.texinfo. This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 9 May 1996, of `The GNU Make ! Manual', for `make', Version 3.75 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 ! Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 1,20 ---- ! This is Info file make.info, produced by Makeinfo version 1.67 from the ! input file make.texinfo. ! ! INFO-DIR-SECTION The GNU make utility ! START-INFO-DIR-ENTRY ! * GNU make: (make.info). The GNU make utility. ! END-INFO-DIR-ENTRY This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make ! Manual', for `make', Version 3.76 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 26,31 **** --- 31,271 ---- translation approved by the Free Software Foundation.  + File: make.info, Node: Goals, Next: Instead of Execution, Prev: Makefile Arguments, Up: Running + + Arguments to Specify the Goals + ============================== + + The "goals" are the targets that `make' should strive ultimately to + update. Other targets are updated as well if they appear as + dependencies of goals, or dependencies of dependencies of goals, etc. + + By default, the goal is the first target in the makefile (not + counting targets that start with a period). Therefore, makefiles are + usually written so that the first target is for compiling the entire + program or programs they describe. If the first rule in the makefile + has several targets, only the first target in the rule becomes the + default goal, not the whole list. + + You can specify a different goal or goals with arguments to `make'. + Use the name of the goal as an argument. If you specify several goals, + `make' processes each of them in turn, in the order you name them. + + Any target in the makefile may be specified as a goal (unless it + starts with `-' or contains an `=', in which case it will be parsed as + a switch or variable definition, respectively). Even targets not in + the makefile may be specified, if `make' can find implicit rules that + say how to make them. + + `Make' will set the special variable `MAKECMDGOALS' to the list of + goals you specified on the command line. If no goals were given on the + command line, this variable is empty. Note that this variable should + be used only in special circumstances. + + An example of appropriate use is to avoid including `.d' files + during `clean' rules (*note Automatic Dependencies::.), so `make' won't + create them only to immediately remove them again: + + sources = foo.c bar.c + + ifneq ($(MAKECMDGOALS),clean) + include $(sources:.c=.d) + endif + + One use of specifying a goal is if you want to compile only a part of + the program, or only one of several programs. Specify as a goal each + file that you wish to remake. For example, consider a directory + containing several programs, with a makefile that starts like this: + + .PHONY: all + all: size nm ld ar as + + If you are working on the program `size', you might want to say + `make size' so that only the files of that program are recompiled. + + Another use of specifying a goal is to make files that are not + normally made. For example, there may be a file of debugging output, + or a version of the program that is compiled specially for testing, + which has a rule in the makefile but is not a dependency of the default + goal. + + Another use of specifying a goal is to run the commands associated + with a phony target (*note Phony Targets::.) or empty target (*note + Empty Target Files to Record Events: Empty Targets.). Many makefiles + contain a phony target named `clean' which deletes everything except + source files. Naturally, this is done only if you request it + explicitly with `make clean'. Following is a list of typical phony and + empty target names. *Note Standard Targets::, for a detailed list of + all the standard target names which GNU software packages use. + + `all' + Make all the top-level targets the makefile knows about. + + `clean' + Delete all files that are normally created by running `make'. + + `mostlyclean' + Like `clean', but may refrain from deleting a few files that people + normally don't want to recompile. For example, the `mostlyclean' + target for GCC does not delete `libgcc.a', because recompiling it + is rarely necessary and takes a lot of time. + + `distclean' + `realclean' + `clobber' + Any of these targets might be defined to delete *more* files than + `clean' does. For example, this would delete configuration files + or links that you would normally create as preparation for + compilation, even if the makefile itself cannot create these files. + + `install' + Copy the executable file into a directory that users typically + search for commands; copy any auxiliary files that the executable + uses into the directories where it will look for them. + + `print' + Print listings of the source files that have changed. + + `tar' + Create a tar file of the source files. + + `shar' + Create a shell archive (shar file) of the source files. + + `dist' + Create a distribution file of the source files. This might be a + tar file, or a shar file, or a compressed version of one of the + above, or even more than one of the above. + + `TAGS' + Update a tags table for this program. + + `check' + `test' + Perform self tests on the program this makefile builds. + +  + File: make.info, Node: Instead of Execution, Next: Avoiding Compilation, Prev: Goals, Up: Running + + Instead of Executing the Commands + ================================= + + The makefile tells `make' how to tell whether a target is up to date, + and how to update each target. But updating the targets is not always + what you want. Certain options specify other activities for `make'. + + `-n' + `--just-print' + `--dry-run' + `--recon' + "No-op". The activity is to print what commands would be used to + make the targets up to date, but not actually execute them. + + `-t' + `--touch' + "Touch". The activity is to mark the targets as up to date without + actually changing them. In other words, `make' pretends to compile + the targets but does not really change their contents. + + `-q' + `--question' + "Question". The activity is to find out silently whether the + targets are up to date already; but execute no commands in either + case. In other words, neither compilation nor output will occur. + + `-W FILE' + `--what-if=FILE' + `--assume-new=FILE' + `--new-file=FILE' + "What if". Each `-W' flag is followed by a file name. The given + files' modification times are recorded by `make' as being the + present time, although the actual modification times remain the + same. You can use the `-W' flag in conjunction with the `-n' flag + to see what would happen if you were to modify specific files. + + With the `-n' flag, `make' prints the commands that it would + normally execute but does not execute them. + + With the `-t' flag, `make' ignores the commands in the rules and + uses (in effect) the command `touch' for each target that needs to be + remade. The `touch' command is also printed, unless `-s' or `.SILENT' + is used. For speed, `make' does not actually invoke the program + `touch'. It does the work directly. + + With the `-q' flag, `make' prints nothing and executes no commands, + but the exit status code it returns is zero if and only if the targets + to be considered are already up to date. If the exit status is one, + then some updating needs to be done. If `make' encounters an error, + the exit status is two, so you can distinguish an error from a target + that is not up to date. + + It is an error to use more than one of these three flags in the same + invocation of `make'. + + The `-n', `-t', and `-q' options do not affect command lines that + begin with `+' characters or contain the strings `$(MAKE)' or + `${MAKE}'. Note that only the line containing the `+' character or the + strings `$(MAKE)' or `${MAKE}' is run regardless of these options. + Other lines in the same rule are not run unless they too begin with `+' + or contain `$(MAKE)' or `${MAKE}' (*Note How the `MAKE' Variable Works: + MAKE Variable.) + + The `-W' flag provides two features: + + * If you also use the `-n' or `-q' flag, you can see what `make' + would do if you were to modify some files. + + * Without the `-n' or `-q' flag, when `make' is actually executing + commands, the `-W' flag can direct `make' to act as if some files + had been modified, without actually modifying the files. + + Note that the options `-p' and `-v' allow you to obtain other + information about `make' or about the makefiles in use (*note Summary + of Options: Options Summary.). + +  + File: make.info, Node: Avoiding Compilation, Next: Overriding, Prev: Instead of Execution, Up: Running + + Avoiding Recompilation of Some Files + ==================================== + + Sometimes you may have changed a source file but you do not want to + recompile all the files that depend on it. For example, suppose you + add a macro or a declaration to a header file that many other files + depend on. Being conservative, `make' assumes that any change in the + header file requires recompilation of all dependent files, but you know + that they do not need to be recompiled and you would rather not waste + the time waiting for them to compile. + + If you anticipate the problem before changing the header file, you + can use the `-t' flag. This flag tells `make' not to run the commands + in the rules, but rather to mark the target up to date by changing its + last-modification date. You would follow this procedure: + + 1. Use the command `make' to recompile the source files that really + need recompilation. + + 2. Make the changes in the header files. + + 3. Use the command `make -t' to mark all the object files as up to + date. The next time you run `make', the changes in the header + files will not cause any recompilation. + + If you have already changed the header file at a time when some files + do need recompilation, it is too late to do this. Instead, you can use + the `-o FILE' flag, which marks a specified file as "old" (*note + Summary of Options: Options Summary.). This means that the file itself + will not be remade, and nothing else will be remade on its account. + Follow this procedure: + + 1. Recompile the source files that need compilation for reasons + independent of the particular header file, with `make -o + HEADERFILE'. If several header files are involved, use a separate + `-o' option for each header file. + + 2. Touch all the object files with `make -t'. + +  File: make.info, Node: Overriding, Next: Testing, Prev: Avoiding Compilation, Up: Running Overriding Variables *************** *** 177,183 **** With no argument, `make' runs as many jobs simultaneously as possible. If there is more than one `-j' option, the last one is effective. *Note Parallel Execution: Parallel, for more ! information on how commands are run. `-k' `--keep-going' --- 417,424 ---- With no argument, `make' runs as many jobs simultaneously as possible. If there is more than one `-j' option, the last one is effective. *Note Parallel Execution: Parallel, for more ! information on how commands are run. Note that this option is ! ignored on MS-DOS. `-k' `--keep-going' *************** *** 340,346 **** * Last Resort:: How to defining commands for rules which cannot find any. * Suffix Rules:: The old-fashioned style of implicit rule. ! * Search Algorithm:: The precise algorithm for applying implicit rules.  --- 581,587 ---- * Last Resort:: How to defining commands for rules which cannot find any. * Suffix Rules:: The old-fashioned style of implicit rule. ! * Implicit Rule Search:: The precise algorithm for applying implicit rules.  *************** *** 396,403 **** for each double-colon rule, that has no commands. A file that is mentioned only as a dependency is considered a target whose rule specifies nothing, so implicit rule search happens for it. *Note ! Implicit Rule Search Algorithm: Search Algorithm, for the details of ! how the search is done. Note that explicit dependencies do not influence implicit rule search. For example, consider this explicit rule: --- 637,644 ---- for each double-colon rule, that has no commands. A file that is mentioned only as a dependency is considered a target whose rule specifies nothing, so implicit rule search happens for it. *Note ! Implicit Rule Search Algorithm: Implicit Rule Search, for the details ! of how the search is done. Note that explicit dependencies do not influence implicit rule search. For example, consider this explicit rule: *************** *** 978,1156 **** will be recompiled from `parse.tab.c' and the file `scan.o' from `scan.c', while `foo' is linked from `parse.tab.o', `scan.o', and its other dependencies, and it will execute happily ever after.) - -  - File: make.info, Node: Automatic, Next: Pattern Match, Prev: Pattern Examples, Up: Pattern Rules - - Automatic Variables - ------------------- - - Suppose you are writing a pattern rule to compile a `.c' file into a - `.o' file: how do you write the `cc' command so that it operates on the - right source file name? You cannot write the name in the command, - because the name is different each time the implicit rule is applied. - - What you do is use a special feature of `make', the "automatic - variables". These variables have values computed afresh for each rule - that is executed, based on the target and dependencies of the rule. In - this example, you would use `$@' for the object file name and `$<' for - the source file name. - - Here is a table of automatic variables: - - `$@' - The file name of the target of the rule. If the target is an - archive member, then `$@' is the name of the archive file. In a - pattern rule that has multiple targets (*note Introduction to - Pattern Rules: Pattern Intro.), `$@' is the name of whichever - target caused the rule's commands to be run. - - `$%' - The target member name, when the target is an archive member. - *Note Archives::. For example, if the target is `foo.a(bar.o)' - then `$%' is `bar.o' and `$@' is `foo.a'. `$%' is empty when the - target is not an archive member. - - `$<' - The name of the first dependency. If the target got its commands - from an implicit rule, this will be the first dependency added by - the implicit rule (*note Implicit Rules::.). - - `$?' - The names of all the dependencies that are newer than the target, - with spaces between them. For dependencies which are archive - members, only the member named is used (*note Archives::.). - - `$^' - The names of all the dependencies, with spaces between them. For - dependencies which are archive members, only the member named is - used (*note Archives::.). A target has only one dependency on - each other file it depends on, no matter how many times each file - is listed as a dependency. So if you list a dependency more than - once for a target, the value of `$^' contains just one copy of the - name. - - `$+' - This is like `$^', but dependencies listed more than once are - duplicated in the order they were listed in the makefile. This is - primarily useful for use in linking commands where it is - meaningful to repeat library file names in a particular order. - - `$*' - The stem with which an implicit rule matches (*note How Patterns - Match: Pattern Match.). If the target is `dir/a.foo.b' and the - target pattern is `a.%.b' then the stem is `dir/foo'. The stem is - useful for constructing names of related files. - - In a static pattern rule, the stem is part of the file name that - matched the `%' in the target pattern. - - In an explicit rule, there is no stem; so `$*' cannot be determined - in that way. Instead, if the target name ends with a recognized - suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), `$*' is - set to the target name minus the suffix. For example, if the - target name is `foo.c', then `$*' is set to `foo', since `.c' is a - suffix. GNU `make' does this bizarre thing only for compatibility - with other implementations of `make'. You should generally avoid - using `$*' except in implicit rules or static pattern rules. - - If the target name in an explicit rule does not end with a - recognized suffix, `$*' is set to the empty string for that rule. - - `$?' is useful even in explicit rules when you wish to operate on - only the dependencies that have changed. For example, suppose that an - archive named `lib' is supposed to contain copies of several object - files. This rule copies just the changed object files into the archive: - - lib: foo.o bar.o lose.o win.o - ar r lib $? - - Of the variables listed above, four have values that are single file - names, and two have values that are lists of file names. These six have - variants that get just the file's directory name or just the file name - within the directory. The variant variables' names are formed by - appending `D' or `F', respectively. These variants are semi-obsolete - in GNU `make' since the functions `dir' and `notdir' can be used to get - a similar effect (*note Functions for File Names: Filename Functions.). - Note, however, that the `F' variants all omit the trailing slash which - always appears in the output of the `dir' function. Here is a table of - the variants: - - `$(@D)' - The directory part of the file name of the target, with the - trailing slash removed. If the value of `$@' is `dir/foo.o' then - `$(@D)' is `dir'. This value is `.' if `$@' does not contain a - slash. - - `$(@F)' - The file-within-directory part of the file name of the target. If - the value of `$@' is `dir/foo.o' then `$(@F)' is `foo.o'. `$(@F)' - is equivalent to `$(notdir $@)'. - - `$(*D)' - `$(*F)' - The directory part and the file-within-directory part of the stem; - `dir' and `foo' in this example. - - `$(%D)' - `$(%F)' - The directory part and the file-within-directory part of the target - archive member name. This makes sense only for archive member - targets of the form `ARCHIVE(MEMBER)' and is useful only when - MEMBER may contain a directory name. (*Note Archive Members as - Targets: Archive Members.) - - `$( foo.1 ! will fail when the current directory is not the source directory, ! because `foo.man' and `sedscript' are not in the current directory. When using GNU `make', relying on `VPATH' to find the source file will work in the case where there is a single dependency file, since --- 1064,1079 ---- the source code. Without one of these prefixes, the current search path is used. ! The distinction between `./' (the "build directory") and ! `$(srcdir)/' (the "source directory") is important because users can ! build in a separate directory using the `--srcdir' option to ! `configure'. A rule of the form: foo.1 : foo.man sedscript sed -e sedscript foo.man > foo.1 ! will fail when the build directory is not the source directory, because ! `foo.man' and `sedscript' are in the the source directory. When using GNU `make', relying on `VPATH' to find the source file will work in the case where there is a single dependency file, since *************** *** 910,915 **** --- 1097,1114 ---- foo.1 : foo.man sedscript sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@ + GNU distributions usually contain some files which are not source + files--for example, Info files, and the output from Autoconf, Automake, + Bison or Flex. Since these files normally appear in the source + directory, they should always appear in the source directory, not in the + build directory. So Makefile rules to update them should put the + updated files in the source directory. + + However, if a file does not appear in the distribution, then the + Makefile should not put it in the source directory, because building a + program in ordinary circumstances should not modify the source directory + in any way. + Try to make the build and installation targets, at least (and all their subtargets) work correctly with a parallel `make'. *************** *** 926,933 **** The `configure' script and the Makefile rules for building and installation should not use any utilities directly except these: ! cat cmp cp echo egrep expr false grep ! ln mkdir mv pwd rm rmdir sed test touch true Stick to the generally supported options for these programs. For example, don't use `mkdir -p', convenient as it may be, because most --- 1125,1134 ---- The `configure' script and the Makefile rules for building and installation should not use any utilities directly except these: ! cat cmp cp diff echo egrep expr false grep install-info ! ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true ! ! The compression program `gzip' can be used in the `dist' rule. Stick to the generally supported options for these programs. For example, don't use `mkdir -p', convenient as it may be, because most *************** *** 941,1029 **** so that the user can substitute alternatives. Here are some of the programs we mean: ! ar bison cc flex install ld lex make makeinfo ranlib texi2dvi yacc ! Use the following `make' variables: ! $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX) $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) ! When you use `ranlib', you should make sure nothing bad happens if ! the system does not have `ranlib'. Arrange to ignore an error from ! that command, and print a message before the command to tell the user ! that failure of the `ranlib' command does not mean a problem. (The ! Autoconf `AC_PROG_RANLIB' macro can help with this.) If you use symbolic links, you should implement a fallback for systems that don't have symbolic links. It is ok to use other utilities in Makefile portions (or scripts) intended only for particular systems where you know those utilities exist. - -  - File: make.info, Node: Command Variables, Next: Directory Variables, Prev: Utilities in Makefiles, Up: Makefile Conventions - - Variables for Specifying Commands - ================================= - - Makefiles should provide variables for overriding certain commands, - options, and so on. - - In particular, you should run most utility programs via variables. - Thus, if you use Bison, have a variable named `BISON' whose default - value is set with `BISON = bison', and refer to it with `$(BISON)' - whenever you need to use Bison. - - File management utilities such as `ln', `rm', `mv', and so on, need - not be referred to through variables in this way, since users don't - need to replace them with other programs. - - Each program-name variable should come with an options variable that - is used to supply options to the program. Append `FLAGS' to the - program-name variable name to get the options variable name--for - example, `BISONFLAGS'. (The name `CFLAGS' is an exception to this - rule, but we keep it because it is standard.) Use `CPPFLAGS' in any - compilation command that runs the preprocessor, and use `LDFLAGS' in - any compilation command that does linking as well as in any direct use - of `ld'. - - If there are C compiler options that *must* be used for proper - compilation of certain files, do not include them in `CFLAGS'. Users - expect to be able to specify `CFLAGS' freely themselves. Instead, - arrange to pass the necessary options to the C compiler independently - of `CFLAGS', by writing them explicitly in the compilation commands or - by defining an implicit rule, like this: - - CFLAGS = -g - ALL_CFLAGS = -I. $(CFLAGS) - .c.o: - $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< - - Do include the `-g' option in `CFLAGS', because that is not - *required* for proper compilation. You can consider it a default that - is only recommended. If the package is set up so that it is compiled - with GCC by default, then you might as well include `-O' in the default - value of `CFLAGS' as well. - - Put `CFLAGS' last in the compilation command, after other variables - containing compiler options, so the user can use `CFLAGS' to override - the others. - - Every Makefile should define the variable `INSTALL', which is the - basic command for installing a file into the system. - - Every Makefile should also define the variables `INSTALL_PROGRAM' - and `INSTALL_DATA'. (The default for each of these should be - `$(INSTALL)'.) Then it should use those variables as the commands for - actual installation, for executables and nonexecutables respectively. - Use these variables as follows: - - $(INSTALL_PROGRAM) foo $(bindir)/foo - $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a - - Always use a file name, not a directory name, as the second argument of - the installation commands. Use a separate command for each file to be - installed. --- 1142,1169 ---- so that the user can substitute alternatives. Here are some of the programs we mean: ! ar bison cc flex install ld ldconfig lex make makeinfo ranlib texi2dvi yacc ! Use the following `make' variables to run those programs: ! $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX) $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) ! When you use `ranlib' or `ldconfig', you should make sure nothing ! bad happens if the system does not have the program in question. ! Arrange to ignore an error from that command, and print a message before ! the command to tell the user that failure of this command does not mean ! a problem. (The Autoconf `AC_PROG_RANLIB' macro can help with this.) If you use symbolic links, you should implement a fallback for systems that don't have symbolic links. + Additional utilities that can be used via Make variables are: + + chgrp chmod chown mknod + It is ok to use other utilities in Makefile portions (or scripts) intended only for particular systems where you know those utilities exist. diff -crP ../make-3.75/make.info-7 ./make.info-7 *** ../make-3.75/make.info-7 Sun Jul 14 13:12:08 1996 --- ./make.info-7 Tue Sep 16 11:04:28 1997 *************** *** 1,15 **** ! This is Info file make.info, produced by Makeinfo-1.63 from the input ! file ./make.texinfo. This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 9 May 1996, of `The GNU Make ! Manual', for `make', Version 3.75 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 ! Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 1,20 ---- ! This is Info file make.info, produced by Makeinfo version 1.67 from the ! input file make.texinfo. ! ! INFO-DIR-SECTION The GNU make utility ! START-INFO-DIR-ENTRY ! * GNU make: (make.info). The GNU make utility. ! END-INFO-DIR-ENTRY This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make ! Manual', for `make', Version 3.76 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 26,31 **** --- 31,104 ---- translation approved by the Free Software Foundation.  + File: make.info, Node: Command Variables, Next: Directory Variables, Prev: Utilities in Makefiles, Up: Makefile Conventions + + Variables for Specifying Commands + ================================= + + Makefiles should provide variables for overriding certain commands, + options, and so on. + + In particular, you should run most utility programs via variables. + Thus, if you use Bison, have a variable named `BISON' whose default + value is set with `BISON = bison', and refer to it with `$(BISON)' + whenever you need to use Bison. + + File management utilities such as `ln', `rm', `mv', and so on, need + not be referred to through variables in this way, since users don't + need to replace them with other programs. + + Each program-name variable should come with an options variable that + is used to supply options to the program. Append `FLAGS' to the + program-name variable name to get the options variable name--for + example, `BISONFLAGS'. (The name `CFLAGS' is an exception to this + rule, but we keep it because it is standard.) Use `CPPFLAGS' in any + compilation command that runs the preprocessor, and use `LDFLAGS' in + any compilation command that does linking as well as in any direct use + of `ld'. + + If there are C compiler options that *must* be used for proper + compilation of certain files, do not include them in `CFLAGS'. Users + expect to be able to specify `CFLAGS' freely themselves. Instead, + arrange to pass the necessary options to the C compiler independently + of `CFLAGS', by writing them explicitly in the compilation commands or + by defining an implicit rule, like this: + + CFLAGS = -g + ALL_CFLAGS = -I. $(CFLAGS) + .c.o: + $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< + + Do include the `-g' option in `CFLAGS', because that is not + *required* for proper compilation. You can consider it a default that + is only recommended. If the package is set up so that it is compiled + with GCC by default, then you might as well include `-O' in the default + value of `CFLAGS' as well. + + Put `CFLAGS' last in the compilation command, after other variables + containing compiler options, so the user can use `CFLAGS' to override + the others. + + `CFLAGS' should be used in every invocation of the C compiler, both + those which do compilation and those which do linking. + + Every Makefile should define the variable `INSTALL', which is the + basic command for installing a file into the system. + + Every Makefile should also define the variables `INSTALL_PROGRAM' + and `INSTALL_DATA'. (The default for each of these should be + `$(INSTALL)'.) Then it should use those variables as the commands for + actual installation, for executables and nonexecutables respectively. + Use these variables as follows: + + $(INSTALL_PROGRAM) foo $(bindir)/foo + $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a + + Always use a file name, not a directory name, as the second argument of + the installation commands. Use a separate command for each file to be + installed. + +  File: make.info, Node: Directory Variables, Next: Standard Targets, Prev: Command Variables, Up: Makefile Conventions Variables for Installation Directories *************** *** 116,124 **** `/usr/local/etc', but write it as `$(prefix)/etc'. (If you are using Autoconf, write it as `@sysconfdir@'.) ! Do not install executables in this directory (they probably belong ! in `$(libexecdir)' or `$(sbindir)'). Also do not install files ! that are modified in the normal course of their use (programs whose purpose is to change the configuration of the system excluded). Those probably belong in `$(localstatedir)'. --- 189,197 ---- `/usr/local/etc', but write it as `$(prefix)/etc'. (If you are using Autoconf, write it as `@sysconfdir@'.) ! Do not install executables here in this directory (they probably ! belong in `$(libexecdir)' or `$(sbindir)'). Also do not install ! files that are modified in the normal course of their use (programs whose purpose is to change the configuration of the system excluded). Those probably belong in `$(localstatedir)'. *************** *** 171,182 **** `@includedir@'.) Most compilers other than GCC do not look for header files in ! `/usr/local/include'. So installing the header files this way is ! only useful with GCC. Sometimes this is not a problem because some ! libraries are only really intended to work with GCC. But some ! libraries are intended to work with other compilers. They should ! install their header files in two places, one specified by ! `includedir' and one specified by `oldincludedir'. `oldincludedir' The directory for installing `#include' header files for use with --- 244,255 ---- `@includedir@'.) Most compilers other than GCC do not look for header files in ! directory `/usr/local/include'. So installing the header files ! this way is only useful with GCC. Sometimes this is not a problem ! because some libraries are only really intended to work with GCC. ! But some libraries are intended to work with other compilers. ! They should install their header files in two places, one ! specified by `includedir' and one specified by `oldincludedir'. `oldincludedir' The directory for installing `#include' header files for use with *************** *** 267,273 **** they will work sensibly when the user does so.  ! File: make.info, Node: Standard Targets, Prev: Directory Variables, Up: Makefile Conventions Standard Targets for Users ========================== --- 340,346 ---- they will work sensibly when the user does so.  ! File: make.info, Node: Standard Targets, Next: Install Command Categories, Prev: Directory Variables, Up: Makefile Conventions Standard Targets for Users ========================== *************** *** 319,324 **** --- 392,398 ---- Here is a sample rule to install an Info file: $(infodir)/foo.info: foo.info + $(POST_INSTALL) # There may be a newer info file in . than in srcdir. -if test -f foo.info; then d=.; \ else d=$(srcdir); fi; \ *************** *** 334,350 **** $(infodir)/foo.info; \ else true; fi `uninstall' ! Delete all the installed files that the `install' target would ! create (but not the noninstalled files such as `make all' would ! create). This rule should not modify the directories where compilation is done, only the directories where files are installed. `install-strip' Like `install', but strip the executable files while installing ! them. The definition of this target can be very simple: install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ --- 408,433 ---- $(infodir)/foo.info; \ else true; fi + When writing the `install' target, you must classify all the + commands into three categories: normal ones, "pre-installation" + commands and "post-installation" commands. *Note Install Command + Categories::. + `uninstall' ! Delete all the installed files--the copies that the `install' ! target creates. This rule should not modify the directories where compilation is done, only the directories where files are installed. + The uninstallation commands are divided into three categories, + just like the installation commands. *Note Install Command + Categories::. + `install-strip' Like `install', but strip the executable files while installing ! them. In many cases, the definition of this target can be very ! simple: install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ *************** *** 421,426 **** --- 504,515 ---- run the `makeinfo' program, which is part of the Texinfo distribution. + Normally a GNU distribution comes with Info files, and that means + the Info files are present in the source directory. Therefore, + the Make rule for an info file should update it in the source + directory. When users build the package, ordinarily Make will not + update the Info files because they will already be up to date. + `dvi' Generate DVI files for all Texinfo documentation. For example: *************** *** 491,496 **** --- 580,691 ---- not distributed with Texinfo.  + File: make.info, Node: Install Command Categories, Prev: Standard Targets, Up: Makefile Conventions + + Install Command Categories + ========================== + + When writing the `install' target, you must classify all the + commands into three categories: normal ones, "pre-installation" + commands and "post-installation" commands. + + Normal commands move files into their proper places, and set their + modes. They may not alter any files except the ones that come entirely + from the package they belong to. + + Pre-installation and post-installation commands may alter other + files; in particular, they can edit global configuration files or data + bases. + + Pre-installation commands are typically executed before the normal + commands, and post-installation commands are typically run after the + normal commands. + + The most common use for a post-installation command is to run + `install-info'. This cannot be done with a normal command, since it + alters a file (the Info directory) which does not come entirely and + solely from the package being installed. It is a post-installation + command because it needs to be done after the normal command which + installs the package's Info files. + + Most programs don't need any pre-installation commands, but we have + the feature just in case it is needed. + + To classify the commands in the `install' rule into these three + categories, insert "category lines" among them. A category line + specifies the category for the commands that follow. + + A category line consists of a tab and a reference to a special Make + variable, plus an optional comment at the end. There are three + variables you can use, one for each category; the variable name + specifies the category. Category lines are no-ops in ordinary execution + because these three Make variables are normally undefined (and you + *should not* define them in the makefile). + + Here are the three possible category lines, each with a comment that + explains what it means: + + $(PRE_INSTALL) # Pre-install commands follow. + $(POST_INSTALL) # Post-install commands follow. + $(NORMAL_INSTALL) # Normal commands follow. + + If you don't use a category line at the beginning of the `install' + rule, all the commands are classified as normal until the first category + line. If you don't use any category lines, all the commands are + classified as normal. + + These are the category lines for `uninstall': + + $(PRE_UNINSTALL) # Pre-uninstall commands follow. + $(POST_UNINSTALL) # Post-uninstall commands follow. + $(NORMAL_UNINSTALL) # Normal commands follow. + + Typically, a pre-uninstall command would be used for deleting entries + from the Info directory. + + If the `install' or `uninstall' target has any dependencies which + act as subroutines of installation, then you should start *each* + dependency's commands with a category line, and start the main target's + commands with a category line also. This way, you can ensure that each + command is placed in the right category regardless of which of the + dependencies actually run. + + Pre-installation and post-installation commands should not run any + programs except for these: + + [ basename bash cat chgrp chmod chown cmp cp dd diff echo + egrep expand expr false fgrep find getopt grep gunzip gzip + hostname install install-info kill ldconfig ln ls md5sum + mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee + test touch true uname xargs yes + + The reason for distinguishing the commands in this way is for the + sake of making binary packages. Typically a binary package contains + all the executables and other files that need to be installed, and has + its own method of installing them--so it does not need to run the normal + installation commands. But installing the binary package does need to + execute the pre-installation and post-installation commands. + + Programs to build binary packages work by extracting the + pre-installation and post-installation commands. Here is one way of + extracting the pre-installation commands: + + make -n install -o all \ + PRE_INSTALL=pre-install \ + POST_INSTALL=post-install \ + NORMAL_INSTALL=normal-install \ + | gawk -f pre-install.awk + + where the file `pre-install.awk' could contain this: + + $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ {on = 0} + on {print $0} + $0 ~ /^\t[ \t]*pre_install[ \t]*$/ {on = 1} + + The resulting file of pre-installation commands is executed as a + shell script as part of installing the binary package. + +  File: make.info, Node: Quick Reference, Next: Complex Makefile, Prev: Makefile Conventions, Up: Top Quick Reference *************** *** 598,641 **** `$(dir NAMES...)' Extract the directory part of each file name. ! *Note Functions for File Names: Filename Functions. `$(notdir NAMES...)' Extract the non-directory part of each file name. ! *Note Functions for File Names: Filename Functions. `$(suffix NAMES...)' Extract the suffix (the last `.' and following characters) of each file name. ! *Note Functions for File Names: Filename Functions. `$(basename NAMES...)' Extract the base name (name without suffix) of each file name. ! *Note Functions for File Names: Filename Functions. `$(addsuffix SUFFIX,NAMES...)' Append SUFFIX to each word in NAMES. ! *Note Functions for File Names: Filename Functions. `$(addprefix PREFIX,NAMES...)' Prepend PREFIX to each word in NAMES. ! *Note Functions for File Names: Filename Functions. `$(join LIST1,LIST2)' Join two parallel lists of words. ! *Note Functions for File Names: Filename Functions. `$(word N,TEXT)' Extract the Nth word (one-origin) of TEXT. ! *Note Functions for File Names: Filename Functions. `$(words TEXT)' Count the number of words in TEXT. ! *Note Functions for File Names: Filename Functions. `$(firstword NAMES...)' Extract the first word of NAMES. ! *Note Functions for File Names: Filename Functions. `$(wildcard PATTERN...)' Find file names matching a shell file name pattern (*not* a `%' --- 793,836 ---- `$(dir NAMES...)' Extract the directory part of each file name. ! *Note Functions for File Names: File Name Functions. `$(notdir NAMES...)' Extract the non-directory part of each file name. ! *Note Functions for File Names: File Name Functions. `$(suffix NAMES...)' Extract the suffix (the last `.' and following characters) of each file name. ! *Note Functions for File Names: File Name Functions. `$(basename NAMES...)' Extract the base name (name without suffix) of each file name. ! *Note Functions for File Names: File Name Functions. `$(addsuffix SUFFIX,NAMES...)' Append SUFFIX to each word in NAMES. ! *Note Functions for File Names: File Name Functions. `$(addprefix PREFIX,NAMES...)' Prepend PREFIX to each word in NAMES. ! *Note Functions for File Names: File Name Functions. `$(join LIST1,LIST2)' Join two parallel lists of words. ! *Note Functions for File Names: File Name Functions. `$(word N,TEXT)' Extract the Nth word (one-origin) of TEXT. ! *Note Functions for File Names: File Name Functions. `$(words TEXT)' Count the number of words in TEXT. ! *Note Functions for File Names: File Name Functions. `$(firstword NAMES...)' Extract the first word of NAMES. ! *Note Functions for File Names: File Name Functions. `$(wildcard PATTERN...)' Find file names matching a shell file name pattern (*not* a `%' *************** *** 727,732 **** --- 922,932 ---- `/bin/sh'. You can set `SHELL' in the makefile to change the shell used to run commands. *Note Command Execution: Execution. + `MAKESHELL' + On MS-DOS only, the name of the command interpreter that is to be + used by `make'. This value takes precedence over the value of + `SHELL'. *Note MAKESHELL variable: Execution. + `MAKE' The name with which `make' was invoked. Using this variable in commands has special meaning. *Note How the `MAKE' Variable *************** *** 740,745 **** --- 940,950 ---- The flags given to `make'. You can set this in the environment or a makefile to set flags. *Note Communicating Options to a Sub-`make': Options/Recursion. + + `MAKECMDGOALS' + The targets given to `make' on the command line. Setting this + variable has no effect on the operation of `make'. + *Note Arguments to Specify the Goals: Goals. `SUFFIXES' The default list of suffixes before `make' reads any makefiles. diff -crP ../make-3.75/make.info-8 ./make.info-8 *** ../make-3.75/make.info-8 Sun Jul 14 13:12:08 1996 --- ./make.info-8 Tue Sep 16 11:04:28 1997 *************** *** 1,15 **** ! This is Info file make.info, produced by Makeinfo-1.63 from the input ! file ./make.texinfo. This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 9 May 1996, of `The GNU Make ! Manual', for `make', Version 3.75 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 ! Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 1,20 ---- ! This is Info file make.info, produced by Makeinfo version 1.67 from the ! input file make.texinfo. ! ! INFO-DIR-SECTION The GNU make utility ! START-INFO-DIR-ENTRY ! * GNU make: (make.info). The GNU make utility. ! END-INFO-DIR-ENTRY This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. ! This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make ! Manual', for `make', Version 3.76 Beta. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free ! Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 33,890 **** * Menu: ! * +, and define: Sequences. ! * +=: Appending. ! * ,v (RCS file extension): Catalogue of Rules. ! * -, and define: Sequences. ! * .c: Catalogue of Rules. ! * .cc: Catalogue of Rules. ! * .ch: Catalogue of Rules. ! * .def: Catalogue of Rules. ! * .dvi: Catalogue of Rules. ! * .f: Catalogue of Rules. ! * .info: Catalogue of Rules. ! * .l: Catalogue of Rules. ! * .ln: Catalogue of Rules. ! * .mod: Catalogue of Rules. ! * .o: Catalogue of Rules. ! * .p: Catalogue of Rules. ! * .r: Catalogue of Rules. ! * .s: Catalogue of Rules. ! * .sh: Catalogue of Rules. ! * .sym: Catalogue of Rules. ! * .tex: Catalogue of Rules. ! * .texi: Catalogue of Rules. ! * .texinfo: Catalogue of Rules. ! * .txinfo: Catalogue of Rules. ! * .w: Catalogue of Rules. ! * .web: Catalogue of Rules. ! * .y: Catalogue of Rules. ! * := <1>: Setting. ! * :=: Flavors. ! * = <1>: Setting. ! * =: Flavors. ! * @, and define: Sequences. ! * #include: Automatic Dependencies. ! * # (comments), in commands: Commands. ! * # (comments), in makefile: Makefile Contents. ! * $, in function call: Syntax of Functions. ! * $, in rules: Rule Syntax. ! * $, in variable name: Computed Names. ! * $, in variable reference: Reference. ! * %, in pattern rules: Pattern Intro. ! * %, quoting in patsubst: Text Functions. ! * %, quoting in vpath: Selective Search. ! * %, quoting in static pattern: Static Usage. ! * %, quoting with \ (backslash) <1>: Text Functions. ! * %, quoting with \ (backslash) <1>: Static Usage. ! * %, quoting with \ (backslash): Selective Search. ! * * (wildcard character): Wildcards. ! * -assume-new <1>: Options Summary. ! * -assume-new: Instead of Execution. ! * -assume-new, and recursion: Options/Recursion. ! * -assume-old <1>: Options Summary. ! * -assume-old: Avoiding Compilation. ! * -assume-old, and recursion: Options/Recursion. ! * -debug: Options Summary. ! * -directory <1>: Options Summary. ! * -directory: Recursion. ! * -directory, and -print-directory: -w Option. ! * -directory, and recursion: Options/Recursion. ! * -dry-run <1>: Options Summary. ! * -dry-run <1>: Instead of Execution. ! * -dry-run: Echoing. ! * -environment-overrides: Options Summary. ! * -file <1>: Options Summary. ! * -file <1>: Makefile Arguments. ! * -file: Makefile Names. ! * -file, and recursion: Options/Recursion. ! * -help: Options Summary. ! * -ignore-errors <1>: Options Summary. ! * -ignore-errors: Errors. ! * -include-dir <1>: Options Summary. ! * -include-dir: Include. ! * -jobs <1>: Options Summary. ! * -jobs: Parallel. ! * -jobs, and recursion: Options/Recursion. ! * -just-print <1>: Options Summary. ! * -just-print <1>: Instead of Execution. ! * -just-print: Echoing. ! * -keep-going <1>: Options Summary. ! * -keep-going <1>: Testing. ! * -keep-going: Errors. ! * -load-average <1>: Options Summary. ! * -load-average: Parallel. ! * -makefile <1>: Options Summary. ! * -makefile <1>: Makefile Arguments. ! * -makefile: Makefile Names. ! * -max-load <1>: Options Summary. ! * -max-load: Parallel. ! * -new-file <1>: Options Summary. ! * -new-file: Instead of Execution. ! * -new-file, and recursion: Options/Recursion. ! * -no-builtin-rules: Options Summary. ! * -no-keep-going: Options Summary. ! * -no-print-directory <1>: Options Summary. ! * -no-print-directory: -w Option. ! * -old-file <1>: Options Summary. ! * -old-file: Avoiding Compilation. ! * -old-file, and recursion: Options/Recursion. ! * -print-data-base: Options Summary. ! * -print-directory: Options Summary. ! * -print-directory, and -directory: -w Option. ! * -print-directory, and recursion: -w Option. ! * -print-directory, disabling: -w Option. ! * -question <1>: Options Summary. ! * -question: Instead of Execution. ! * -quiet <1>: Options Summary. ! * -quiet: Echoing. ! * -recon <1>: Options Summary. ! * -recon <1>: Instead of Execution. ! * -recon: Echoing. ! * -silent <1>: Options Summary. ! * -silent: Echoing. ! * -stop: Options Summary. ! * -touch <1>: Options Summary. ! * -touch: Instead of Execution. ! * -touch, and recursion: MAKE Variable. ! * -version: Options Summary. ! * -warn-undefined-variables: Options Summary. ! * -what-if <1>: Options Summary. ! * -what-if: Instead of Execution. ! * -b: Options Summary. ! * -C <1>: Options Summary. ! * -C: Recursion. ! * -C, and -w: -w Option. ! * -C, and recursion: Options/Recursion. ! * -d: Options Summary. ! * -e: Options Summary. ! * -e (shell flag): Automatic Dependencies. ! * -f <1>: Options Summary. ! * -f <1>: Makefile Arguments. ! * -f: Makefile Names. ! * -f, and recursion: Options/Recursion. ! * -h: Options Summary. ! * -i <1>: Options Summary. ! * -i: Errors. ! * -I: Include. ! * -j <1>: Options Summary. ! * -j: Parallel. ! * -j, and archive update: Archive Pitfalls. ! * -j, and recursion: Options/Recursion. ! * -k <1>: Options Summary. ! * -k <1>: Testing. ! * -k: Errors. ! * -l: Options Summary. ! * -l (library search): Libraries/Search. ! * -l (load average): Parallel. ! * -MM (to GNU compiler): Automatic Dependencies. ! * -m: Options Summary. ! * -M (to compiler): Automatic Dependencies. ! * -n <1>: Options Summary. ! * -n <1>: Instead of Execution. ! * -n: Echoing. ! * -o <1>: Options Summary. ! * -o: Avoiding Compilation. ! * -o, and recursion: Options/Recursion. ! * -p: Options Summary. ! * -q <1>: Options Summary. ! * -q: Instead of Execution. ! * -r: Options Summary. ! * -s <1>: Options Summary. ! * -s: Echoing. ! * -t <1>: Options Summary. ! * -t: Instead of Execution. ! * -t, and recursion: MAKE Variable. ! * -v: Options Summary. ! * -w: Options Summary. ! * -W: Instead of Execution. ! * -w, and -C: -w Option. ! * -w, and recursion: -w Option. ! * -W, and recursion: Options/Recursion. ! * -w, disabling: -w Option. ! * - (in commands): Errors. ! * .a (archives): Archive Suffix Rules. ! * .d: Automatic Dependencies. ! * .PRECIOUS intermediate files: Chained Rules. ! * :: rules (double-colon): Double-Colon. ! * ? (wildcard character): Wildcards. ! * @ (in commands): Echoing. ! * [...] (wildcard characters): Wildcards. * \ (backslash), for continuation lines: Simple Makefile. ! * \ (backslash), in commands: Execution. ! * \ (backslash), to quote % <1>: Text Functions. ! * \ (backslash), to quote % <1>: Static Usage. ! * \ (backslash), to quote %: Selective Search. ! * __.SYMDEF: Archive Symbols. ! * all (standard target): Goals. ! * cd (shell command) <1>: MAKE Variable. ! * cd (shell command): Execution. ! * check (standard target): Goals. ! * clean (standard target): Goals. ! * clean target <1>: Cleanup. ! * clean target: Simple Makefile. ! * clobber (standard target): Goals. ! * distclean (standard target): Goals. ! * dist (standard target): Goals. ! * FORCE: Force Targets. ! * install (standard target): Goals. ! * lint, rule to run: Catalogue of Rules. ! * lpr (shell command) <1>: Empty Targets. ! * lpr (shell command): Wildcard Examples. ! * make depend: Automatic Dependencies. ! * mostlyclean (standard target): Goals. ! * objects: Variables Simplify. ! * objs: Variables Simplify. ! * obj: Variables Simplify. ! * print (standard target): Goals. ! * print target <1>: Empty Targets. ! * print target: Wildcard Examples. ! * README: Makefile Names. ! * realclean (standard target): Goals. ! * rm (shell command) <1>: Errors. ! * rm (shell command) <1>: Phony Targets. ! * rm (shell command) <1>: Wildcard Examples. ! * rm (shell command): Simple Makefile. ! * sed (shell command): Automatic Dependencies. ! * shar (standard target): Goals. ! * TAGS (standard target): Goals. ! * tar (standard target): Goals. ! * test (standard target): Goals. ! * touch (shell command) <1>: Empty Targets. ! * touch (shell command): Wildcard Examples. ! * VPATH, and implicit rules: Implicit/Search. ! * VPATH, and link libraries: Libraries/Search. ! * yacc: Sequences. ! * ~ (tilde): Wildcards. ! * TeX, rule to run: Catalogue of Rules. ! * appending to variables: Appending. ! * ar: Implicit Variables. ! * archive: Archives. ! * archive member targets: Archive Members. ! * archive symbol directory updating: Archive Symbols. ! * archive, and -j: Archive Pitfalls. ! * archive, and parallel execution: Archive Pitfalls. ! * archive, suffix rule for: Archive Suffix Rules. ! * Arg list too long: Options/Recursion. ! * arguments of functions: Syntax of Functions. ! * as <1>: Implicit Variables. ! * as: Catalogue of Rules. ! * assembly, rule to compile: Catalogue of Rules. * automatic generation of dependencies <1>: Automatic Dependencies. ! * automatic generation of dependencies: Include. ! * automatic variables: Automatic. ! * backquotes: Shell Function. * backslash (\), for continuation lines: Simple Makefile. ! * backslash (\), in commands: Execution. ! * backslash (\), to quote % <1>: Text Functions. ! * backslash (\), to quote % <1>: Static Usage. ! * backslash (\), to quote %: Selective Search. ! * basename: Filename Functions. ! * broken pipe: Parallel. ! * bugs, reporting: Bugs. ! * built-in special targets: Special Targets. ! * C++, rule to compile: Catalogue of Rules. ! * C, rule to compile: Catalogue of Rules. ! * cc <1>: Implicit Variables. ! * cc: Catalogue of Rules. ! * chains of rules: Chained Rules. ! * cleaning up: Cleanup. ! * co <1>: Implicit Variables. ! * co: Catalogue of Rules. ! * combining rules by dependency: Combine By Dependency. * command line variable definitions, and recursion: Options/Recursion. ! * command line variables: Overriding. ! * commands: Rule Syntax. ! * commands, backslash (\) in: Execution. ! * commands, comments in: Commands. ! * commands, echoing: Echoing. ! * commands, empty: Empty Commands. ! * commands, errors in: Errors. ! * commands, execution: Execution. ! * commands, execution in parallel: Parallel. ! * commands, expansion: Shell Function. ! * commands, how to write: Commands. ! * commands, instead of executing: Instead of Execution. ! * commands, introduction to: Rule Introduction. ! * commands, quoting newlines in: Execution. ! * commands, sequences of: Sequences. ! * comments, in commands: Commands. ! * comments, in makefile: Makefile Contents. ! * compatibility: Features. ! * compatibility in exporting: Variables/Recursion. ! * compilation, testing: Testing. ! * computed variable name: Computed Names. ! * conditionals: Conditionals. ! * continuation lines: Simple Makefile. ! * conventions for makefiles: Makefile Conventions. ! * ctangle <1>: Implicit Variables. ! * ctangle: Catalogue of Rules. ! * cweave <1>: Implicit Variables. ! * cweave: Catalogue of Rules. ! * deducing commands (implicit rules): make Deduces. ! * default goal <1>: Rules. ! * default goal: How Make Works. ! * default makefile name: Makefile Names. ! * default rules, last-resort: Last Resort. ! * defining variables verbatim: Defining. ! * deletion of target files <1>: Interrupts. ! * deletion of target files: Errors. ! * dependencies: Rule Syntax. ! * dependencies, automatic generation <1>: Automatic Dependencies. ! * dependencies, automatic generation: Include. ! * dependencies, introduction to: Rule Introduction. ! * dependencies, list of all: Automatic. ! * dependencies, list of changed: Automatic. * dependencies, varying (static pattern): Static Pattern. ! * dependency: Rules. ! * dependency pattern, implicit: Pattern Intro. * dependency pattern, static (not implicit): Static Usage. ! * directive: Makefile Contents. ! * directories, printing them: -w Option. ! * directories, updating archive symbol: Archive Symbols. ! * directory part: Filename Functions. ! * directory search (VPATH): Directory Search. * directory search (VPATH), and implicit rules: Implicit/Search. * directory search (VPATH), and link libraries: Libraries/Search. * directory search (VPATH), and shell commands: Commands/Search. ! * dollar sign ($), in function call: Syntax of Functions. ! * dollar sign ($), in rules: Rule Syntax. ! * dollar sign ($), in variable name: Computed Names. * dollar sign ($), in variable reference: Reference. ! * double-colon rules: Double-Colon. ! * duplicate words, removing: Text Functions. ! * E2BIG: Options/Recursion. ! * echoing of commands: Echoing. ! * editor: Introduction. ! * Emacs (M-x compile): Errors. ! * empty commands: Empty Commands. ! * empty targets: Empty Targets. ! * environment: Environment. ! * environment, SHELL in: Execution. ! * environment, and recursion: Variables/Recursion. ! * errors (in commands): Errors. ! * errors with wildcards: Wildcard Pitfall. ! * execution, in parallel: Parallel. ! * execution, instead of: Instead of Execution. ! * execution, of commands: Execution. ! * exit status (errors): Errors. ! * explicit rule, definition of: Makefile Contents. ! * exporting variables: Variables/Recursion. ! * f77 <1>: Implicit Variables. ! * f77: Catalogue of Rules. ! * features of GNU make: Features. ! * features, missing: Missing. ! * file name functions: Filename Functions. ! * file name of makefile: Makefile Names. * file name of makefile, how to specify: Makefile Names. ! * file name prefix, adding: Filename Functions. ! * file name suffix: Filename Functions. ! * file name suffix, adding: Filename Functions. ! * file name with wildcards: Wildcards. ! * file name, basename of: Filename Functions. ! * file name, directory part: Filename Functions. ! * file name, nondirectory part: Filename Functions. ! * files, assuming new: Instead of Execution. ! * files, assuming old: Avoiding Compilation. ! * files, avoiding recompilation of: Avoiding Compilation. ! * files, intermediate: Chained Rules. ! * filtering out words: Text Functions. ! * filtering words: Text Functions. ! * finding strings: Text Functions. ! * flags: Options Summary. ! * flags for compilers: Implicit Variables. ! * flavors of variables: Flavors. ! * force targets: Force Targets. ! * Fortran, rule to compile: Catalogue of Rules. ! * functions: Functions. ! * functions, for file names: Filename Functions. ! * functions, for text: Text Functions. ! * functions, syntax of: Syntax of Functions. ! * g++ <1>: Implicit Variables. ! * g++: Catalogue of Rules. ! * gcc: Catalogue of Rules. * generating dependencies automatically <1>: Automatic Dependencies. * generating dependencies automatically: Include. ! * get <1>: Implicit Variables. ! * get: Catalogue of Rules. ! * globbing (wildcards): Wildcards. ! * goal: How Make Works. ! * goal, default <1>: Rules. ! * goal, default: How Make Works. ! * goal, how to specify: Goals. ! * home directory: Wildcards. ! * IEEE Standard 1003.2: Overview. ! * implicit rule: Implicit Rules. ! * implicit rule, and VPATH: Implicit/Search. ! * implicit rule, and directory search: Implicit/Search. ! * implicit rule, definition of: Makefile Contents. ! * implicit rule, how to use: Using Implicit. ! * implicit rule, introduction to: make Deduces. ! * implicit rule, predefined: Catalogue of Rules. ! * implicit rule, search algorithm: Search Algorithm. ! * including (MAKEFILES variable): MAKEFILES Variable. ! * including other makefiles: Include. ! * incompatibilities: Missing. ! * Info, rule to format: Catalogue of Rules. ! * intermediate files: Chained Rules. ! * intermediate files, preserving: Chained Rules. ! * intermediate targets, explicit: Special Targets. ! * interrupt: Interrupts. ! * job slots: Parallel. ! * job slots, and recursion: Options/Recursion. ! * jobs, limiting based on load: Parallel. ! * joining lists of words: Filename Functions. ! * killing (interruption): Interrupts. ! * last-resort default rules: Last Resort. ! * ld: Catalogue of Rules. ! * lex <1>: Implicit Variables. ! * lex: Catalogue of Rules. ! * Lex, rule to run: Catalogue of Rules. * libraries for linking, directory search: Libraries/Search. ! * library archive, suffix rule for: Archive Suffix Rules. ! * limiting jobs based on load: Parallel. ! * link libraries, and directory search: Libraries/Search. ! * linking, predefined rule for: Catalogue of Rules. ! * lint: Catalogue of Rules. ! * list of all dependencies: Automatic. ! * list of changed dependencies: Automatic. ! * load average: Parallel. ! * loops in variable expansion: Flavors. ! * m2c: Catalogue of Rules. ! * macro: Using Variables. ! * makefile: Introduction. ! * makefile name: Makefile Names. ! * makefile name, how to specify: Makefile Names. ! * makefile rule parts: Rule Introduction. ! * makefile, and MAKEFILES variable: MAKEFILES Variable. ! * makefile, conventions for: Makefile Conventions. ! * makefile, how make processes: How Make Works. ! * makefile, how to write: Makefiles. ! * makefile, including: Include. ! * makefile, overriding: Overriding Makefiles. ! * makefile, remaking of: Remaking Makefiles. ! * makefile, simple: Simple Makefile. ! * makeinfo <1>: Implicit Variables. ! * makeinfo: Catalogue of Rules. ! * match-anything rule: Match-Anything Rules. * match-anything rule, used to override: Overriding Makefiles. ! * missing features: Missing. ! * mistakes with wildcards: Wildcard Pitfall. ! * modified variable reference: Substitution Refs. ! * Modula-2, rule to compile: Catalogue of Rules. ! * multiple rules for one target: Multiple Rules. ! * multiple rules for one target (::): Double-Colon. ! * multiple targets: Multiple Targets. ! * multiple targets, in pattern rule: Pattern Intro. ! * name of makefile: Makefile Names. ! * name of makefile, how to specify: Makefile Names. ! * nested variable reference: Computed Names. ! * newline, quoting, in commands: Execution. ! * newline, quoting, in makefile: Simple Makefile. ! * nondirectory part: Filename Functions. ! * old-fashioned suffix rules: Suffix Rules. ! * options: Options Summary. ! * options, and recursion: Options/Recursion. ! * options, setting from environment: Options/Recursion. ! * options, setting in makefiles: Options/Recursion. ! * order of pattern rules: Pattern Intro. ! * origin of variable: Origin Function. ! * overriding makefiles: Overriding Makefiles. ! * overriding variables with arguments: Overriding. ! * overriding with override: Override Directive. ! * parallel execution: Parallel. * parallel execution, and archive update: Archive Pitfalls. ! * parts of makefile rule: Rule Introduction. ! * Pascal, rule to compile: Catalogue of Rules. ! * pattern rule: Pattern Intro. ! * pattern rules, order of: Pattern Intro. ! * pattern rules, static (not implicit): Static Pattern. ! * pattern rules, static, syntax of: Static Usage. ! * pc <1>: Implicit Variables. ! * pc: Catalogue of Rules. ! * phony targets: Phony Targets. ! * pitfalls of wildcards: Wildcard Pitfall. ! * portability: Features. ! * POSIX: Overview. ! * POSIX.2: Options/Recursion. ! * precious targets: Special Targets. ! * prefix, adding: Filename Functions. ! * preserving intermediate files: Chained Rules. ! * preserving with .PRECIOUS <1>: Chained Rules. ! * preserving with .PRECIOUS: Special Targets. ! * preserving with .SECONDARY: Special Targets. ! * printing directories: -w Option. ! * printing of commands: Echoing. ! * problems and bugs, reporting: Bugs. ! * problems with wildcards: Wildcard Pitfall. ! * processing a makefile: How Make Works. ! * question mode: Instead of Execution. ! * quoting %, in patsubst: Text Functions. ! * quoting %, in vpath: Selective Search. ! * quoting %, in static pattern: Static Usage. ! * quoting newline, in commands: Execution. ! * quoting newline, in makefile: Simple Makefile. ! * Ratfor, rule to compile: Catalogue of Rules. ! * RCS, rule to extract from: Catalogue of Rules. ! * recompilation: Introduction. ! * recompilation, avoiding: Avoiding Compilation. ! * recording events with empty targets: Empty Targets. ! * recursion: Recursion. ! * recursion, and -C: Options/Recursion. ! * recursion, and -f: Options/Recursion. ! * recursion, and -j: Options/Recursion. ! * recursion, and -o: Options/Recursion. ! * recursion, and -t: MAKE Variable. ! * recursion, and -w: -w Option. ! * recursion, and -W: Options/Recursion. ! * recursion, and MAKEFILES variable: MAKEFILES Variable. ! * recursion, and MAKE variable: MAKE Variable. * recursion, and command line variable definitions: Options/Recursion. ! * recursion, and environment: Variables/Recursion. ! * recursion, and options: Options/Recursion. ! * recursion, and printing directories: -w Option. ! * recursion, and variables: Variables/Recursion. ! * recursion, level of: Variables/Recursion. ! * recursive variable expansion <1>: Flavors. ! * recursive variable expansion: Using Variables. ! * recursively expanded variables: Flavors. ! * reference to variables <1>: Advanced. ! * reference to variables: Reference. ! * relinking: How Make Works. ! * remaking makefiles: Remaking Makefiles. ! * removal of target files <1>: Interrupts. ! * removal of target files: Errors. ! * removing duplicate words: Text Functions. ! * removing, to clean up: Cleanup. ! * reporting bugs: Bugs. ! * rm: Implicit Variables. ! * rule commands: Commands. ! * rule dependencies: Rule Syntax. ! * rule syntax: Rule Syntax. ! * rule targets: Rule Syntax. ! * rule, and $: Rule Syntax. ! * rule, double-colon (::): Double-Colon. ! * rule, explicit, definition of: Makefile Contents. ! * rule, how to write: Rules. ! * rule, implicit: Implicit Rules. ! * rule, implicit, and VPATH: Implicit/Search. ! * rule, implicit, and directory search: Implicit/Search. ! * rule, implicit, chains of: Chained Rules. ! * rule, implicit, definition of: Makefile Contents. ! * rule, implicit, how to use: Using Implicit. ! * rule, implicit, introduction to: make Deduces. ! * rule, implicit, predefined: Catalogue of Rules. ! * rule, introduction to: Rule Introduction. ! * rule, multiple for one target: Multiple Rules. ! * rule, no commands or dependencies: Force Targets. ! * rule, pattern: Pattern Intro. ! * rule, static pattern: Static Pattern. ! * rule, static pattern versus implicit: Static versus Implicit. ! * rule, with multiple targets: Multiple Targets. ! * s. (SCCS file prefix): Catalogue of Rules. ! * SCCS, rule to extract from: Catalogue of Rules. ! * search algorithm, implicit rule: Search Algorithm. ! * search path for dependencies (VPATH): Directory Search. * search path for dependencies (VPATH), and implicit rules: Implicit/Search. * search path for dependencies (VPATH), and link libraries: Libraries/Search. ! * searching for strings: Text Functions. ! * secondary files: Chained Rules. ! * secondary targets: Special Targets. ! * selecting words: Filename Functions. ! * sequences of commands: Sequences. ! * setting options from environment: Options/Recursion. ! * setting options in makefiles: Options/Recursion. ! * setting variables: Setting. ! * several rules for one target: Multiple Rules. ! * several targets in a rule: Multiple Targets. ! * shell command: Simple Makefile. ! * shell command, and directory search: Commands/Search. ! * shell command, execution: Execution. ! * shell command, function for: Shell Function. ! * shell file name pattern (in include): Include. ! * shell wildcards (in include): Include. ! * signal: Interrupts. ! * silent operation: Echoing. ! * simple makefile: Simple Makefile. ! * simple variable expansion: Using Variables. ! * simplifying with variables: Variables Simplify. ! * simply expanded variables: Flavors. ! * sorting words: Text Functions. ! * spaces, in variable values: Flavors. ! * spaces, stripping: Text Functions. ! * special targets: Special Targets. ! * specifying makefile name: Makefile Names. ! * standard input: Parallel. ! * standards conformance: Overview. ! * standards for makefiles: Makefile Conventions. ! * static pattern rule: Static Pattern. ! * static pattern rule, syntax of: Static Usage. ! * static pattern rule, versus implicit: Static versus Implicit. ! * stem <1>: Pattern Match. ! * stem: Static Usage. ! * stem, variable for: Automatic. ! * strings, searching for: Text Functions. ! * stripping whitespace: Text Functions. ! * sub-make: Variables/Recursion. ! * subdirectories, recursion for: Recursion. ! * substitution variable reference: Substitution Refs. ! * suffix rule: Suffix Rules. ! * suffix rule, for archive: Archive Suffix Rules. ! * suffix, adding: Filename Functions. ! * suffix, function to find: Filename Functions. ! * suffix, substituting in variables: Substitution Refs. ! * switches: Options Summary. ! * symbol directories, updating archive: Archive Symbols. ! * syntax of rules: Rule Syntax. ! * tab character (in commands): Rule Syntax. ! * tabs in rules: Rule Introduction. ! * tangle <1>: Implicit Variables. ! * tangle: Catalogue of Rules. ! * target: Rules. ! * target pattern, implicit: Pattern Intro. * target pattern, static (not implicit): Static Usage. ! * target, deleting on error: Errors. ! * target, deleting on interrupt: Interrupts. ! * target, multiple in pattern rule: Pattern Intro. ! * target, multiple rules for one: Multiple Rules. ! * target, touching: Instead of Execution. ! * targets: Rule Syntax. ! * targets without a file: Phony Targets. ! * targets, built-in special: Special Targets. ! * targets, empty: Empty Targets. ! * targets, force: Force Targets. ! * targets, introduction to: Rule Introduction. ! * targets, multiple: Multiple Targets. ! * targets, phony: Phony Targets. ! * terminal rule: Match-Anything Rules. ! * testing compilation: Testing. ! * tex <1>: Implicit Variables. ! * tex: Catalogue of Rules. ! * texi2dvi <1>: Implicit Variables. ! * texi2dvi: Catalogue of Rules. ! * Texinfo, rule to format: Catalogue of Rules. ! * tilde (~): Wildcards. ! * touching files: Instead of Execution. ! * undefined variables, warning message: Options Summary. ! * updating archive symbol directories: Archive Symbols. ! * updating makefiles: Remaking Makefiles. ! * value: Using Variables. ! * value, how a variable gets it: Values. ! * variable: Using Variables. ! * variable definition: Makefile Contents. ! * variables: Variables Simplify. ! * variables, $ in name: Computed Names. ! * variables, and implicit rule: Automatic. ! * variables, appending to: Appending. ! * variables, automatic: Automatic. ! * variables, command line: Overriding. * variables, command line, and recursion: Options/Recursion. ! * variables, computed names: Computed Names. ! * variables, defining verbatim: Defining. ! * variables, environment <1>: Environment. ! * variables, environment: Variables/Recursion. ! * variables, exporting: Variables/Recursion. ! * variables, flavors: Flavors. ! * variables, how they get their values: Values. ! * variables, how to reference: Reference. ! * variables, loops in expansion: Flavors. ! * variables, modified reference: Substitution Refs. ! * variables, nested references: Computed Names. ! * variables, origin of: Origin Function. ! * variables, overriding: Override Directive. ! * variables, overriding with arguments: Overriding. ! * variables, recursively expanded: Flavors. ! * variables, setting: Setting. ! * variables, simply expanded: Flavors. ! * variables, spaces in values: Flavors. ! * variables, substituting suffix in: Substitution Refs. ! * variables, substitution reference: Substitution Refs. ! * variables, warning for undefined: Options Summary. ! * varying dependencies: Static Pattern. ! * verbatim variable definition: Defining. ! * vpath: Directory Search. ! * weave <1>: Implicit Variables. ! * weave: Catalogue of Rules. ! * Web, rule to run: Catalogue of Rules. ! * what if: Instead of Execution. ! * whitespace, in variable values: Flavors. ! * whitespace, stripping: Text Functions. ! * wildcard: Wildcards. ! * wildcard pitfalls: Wildcard Pitfall. ! * wildcard, function: Filename Functions. ! * wildcard, in include: Include. ! * wildcard, in archive member: Archive Members. ! * words, extracting first: Filename Functions. ! * words, filtering: Text Functions. ! * words, filtering out: Text Functions. ! * words, finding number: Filename Functions. ! * words, iterating over: Foreach Function. ! * words, joining lists: Filename Functions. ! * words, removing duplicates: Text Functions. ! * words, selecting: Filename Functions. ! * writing rule commands: Commands. ! * writing rules: Rules. ! * yacc <1>: Implicit Variables. ! * yacc: Catalogue of Rules. ! * Yacc, rule to run: Catalogue of Rules. ! !  ! File: make.info, Node: Name Index, Prev: Concept Index, Up: Top ! ! Index of Functions, Variables, & Directives ! ******************************************* ! ! * Menu: ! ! * $%: Automatic. ! * $(%D): Automatic. ! * $(%F): Automatic. ! * $(*D): Automatic. ! * $(*F): Automatic. ! * $(: Last Resort. ! * .DEFAULT: Special Targets. ! * .DEFAULT, and empty commands: Empty Commands. ! * .DELETE_ON_ERROR: Errors. ! * .EXPORT_ALL_VARIABLES <1>: Variables/Recursion. ! * .EXPORT_ALL_VARIABLES: Special Targets. ! * .IGNORE <1>: Errors. ! * .IGNORE: Special Targets. ! * .INTERMEDIATE: Special Targets. ! * .PHONY <1>: Special Targets. ! * .PHONY: Phony Targets. ! * .POSIX: Options/Recursion. ! * .PRECIOUS <1>: Interrupts. ! * .PRECIOUS: Special Targets. ! * .SECONDARY: Special Targets. ! * .SILENT <1>: Echoing. ! * .SILENT: Special Targets. ! * .SUFFIXES <1>: Suffix Rules. ! * .SUFFIXES: Special Targets. ! * /usr/gnu/include: Include. ! * /usr/include: Include. ! * /usr/local/include: Include. ! * < (automatic variable): Automatic. ! * : Flavors. ! * MAKE: MAKE Variable. ! * Makefile: Makefile Names. ! * MAKEFILES <1>: Variables/Recursion. ! * MAKEFILES: MAKEFILES Variable. ! * MAKEFLAGS: Options/Recursion. ! * MAKEINFO: Implicit Variables. ! * MAKELEVEL <1>: Flavors. ! * MAKELEVEL: Variables/Recursion. ! * MAKEOVERRIDES: Options/Recursion. ! * MFLAGS: Options/Recursion. ! * notdir: Filename Functions. ! * origin: Origin Function. ! * OUTPUT_OPTION: Catalogue of Rules. ! * override: Override Directive. ! * patsubst <1>: Text Functions. ! * patsubst: Substitution Refs. ! * PC: Implicit Variables. ! * PFLAGS: Implicit Variables. ! * RFLAGS: Implicit Variables. ! * RM: Implicit Variables. ! * shell: Shell Function. ! * SHELL: Execution. ! * SHELL (command execution): Execution. ! * sort: Text Functions. ! * strip: Text Functions. ! * subst <1>: Text Functions. ! * subst: Multiple Targets. ! * suffix: Filename Functions. ! * SUFFIXES: Suffix Rules. ! * TANGLE: Implicit Variables. ! * TEX: Implicit Variables. ! * TEXI2DVI: Implicit Variables. ! * unexport: Variables/Recursion. ! * vpath: Selective Search. ! * VPATH <1>: General Search. ! * VPATH: Directory Search. ! * WEAVE: Implicit Variables. ! * wildcard <1>: Filename Functions. ! * wildcard: Wildcard Function. ! * word: Filename Functions. ! * words: Filename Functions. ! * YACC: Implicit Variables. ! * YACCR: Implicit Variables. ! * YFLAGS: Implicit Variables. ! --- 38,760 ---- * Menu: ! * # (comments), in commands: Commands. ! * # (comments), in makefile: Makefile Contents. ! * #include: Automatic Dependencies. ! * $, in function call: Syntax of Functions. ! * $, in rules: Rule Syntax. ! * $, in variable name: Computed Names. ! * $, in variable reference: Reference. ! * %, in pattern rules: Pattern Intro. ! * %, quoting in patsubst: Text Functions. ! * %, quoting in static pattern: Static Usage. ! * %, quoting in vpath: Selective Search. ! * %, quoting with \ (backslash) <1>: Text Functions. ! * %, quoting with \ (backslash) <2>: Selective Search. ! * %, quoting with \ (backslash): Static Usage. ! * * (wildcard character): Wildcards. ! * +, and define: Sequences. ! * +=: Appending. ! * ,v (RCS file extension): Catalogue of Rules. ! * - (in commands): Errors. ! * -, and define: Sequences. ! * --assume-new <1>: Options Summary. ! * --assume-new: Instead of Execution. ! * --assume-new, and recursion: Options/Recursion. ! * --assume-old <1>: Options Summary. ! * --assume-old: Avoiding Compilation. ! * --assume-old, and recursion: Options/Recursion. ! * --debug: Options Summary. ! * --directory <1>: Recursion. ! * --directory: Options Summary. ! * --directory, and --print-directory: -w Option. ! * --directory, and recursion: Options/Recursion. ! * --dry-run <1>: Echoing. ! * --dry-run <2>: Instead of Execution. ! * --dry-run: Options Summary. ! * --environment-overrides: Options Summary. ! * --file <1>: Makefile Arguments. ! * --file <2>: Makefile Names. ! * --file: Options Summary. ! * --file, and recursion: Options/Recursion. ! * --help: Options Summary. ! * --ignore-errors <1>: Errors. ! * --ignore-errors: Options Summary. ! * --include-dir <1>: Options Summary. ! * --include-dir: Include. ! * --jobs <1>: Options Summary. ! * --jobs: Parallel. ! * --jobs, and recursion: Options/Recursion. ! * --just-print <1>: Options Summary. ! * --just-print <2>: Echoing. ! * --just-print: Instead of Execution. ! * --keep-going <1>: Errors. ! * --keep-going <2>: Options Summary. ! * --keep-going: Testing. ! * --load-average <1>: Parallel. ! * --load-average: Options Summary. ! * --makefile <1>: Makefile Names. ! * --makefile <2>: Options Summary. ! * --makefile: Makefile Arguments. ! * --max-load <1>: Options Summary. ! * --max-load: Parallel. ! * --new-file <1>: Instead of Execution. ! * --new-file: Options Summary. ! * --new-file, and recursion: Options/Recursion. ! * --no-builtin-rules: Options Summary. ! * --no-keep-going: Options Summary. ! * --no-print-directory <1>: -w Option. ! * --no-print-directory: Options Summary. ! * --old-file <1>: Avoiding Compilation. ! * --old-file: Options Summary. ! * --old-file, and recursion: Options/Recursion. ! * --print-data-base: Options Summary. ! * --print-directory: Options Summary. ! * --print-directory, and --directory: -w Option. ! * --print-directory, and recursion: -w Option. ! * --print-directory, disabling: -w Option. ! * --question <1>: Instead of Execution. ! * --question: Options Summary. ! * --quiet <1>: Echoing. ! * --quiet: Options Summary. ! * --recon <1>: Options Summary. ! * --recon <2>: Echoing. ! * --recon: Instead of Execution. ! * --silent <1>: Options Summary. ! * --silent: Echoing. ! * --stop: Options Summary. ! * --touch <1>: Options Summary. ! * --touch: Instead of Execution. ! * --touch, and recursion: MAKE Variable. ! * --version: Options Summary. ! * --warn-undefined-variables: Options Summary. ! * --what-if <1>: Options Summary. ! * --what-if: Instead of Execution. ! * -b: Options Summary. ! * -C <1>: Recursion. ! * -C: Options Summary. ! * -C, and -w: -w Option. ! * -C, and recursion: Options/Recursion. ! * -d: Options Summary. ! * -e: Options Summary. ! * -e (shell flag): Automatic Dependencies. ! * -f <1>: Options Summary. ! * -f <2>: Makefile Arguments. ! * -f: Makefile Names. ! * -f, and recursion: Options/Recursion. ! * -h: Options Summary. ! * -i: Errors. ! * -I: Options Summary. ! * -i: Options Summary. ! * -I: Include. ! * -j <1>: Parallel. ! * -j: Options Summary. ! * -j, and archive update: Archive Pitfalls. ! * -j, and recursion: Options/Recursion. ! * -k <1>: Testing. ! * -k <2>: Options Summary. ! * -k: Errors. ! * -l: Options Summary. ! * -l (library search): Libraries/Search. ! * -l (load average): Parallel. ! * -m: Options Summary. ! * -M (to compiler): Automatic Dependencies. ! * -MM (to GNU compiler): Automatic Dependencies. ! * -n <1>: Instead of Execution. ! * -n <2>: Options Summary. ! * -n: Echoing. ! * -o <1>: Options Summary. ! * -o: Avoiding Compilation. ! * -o, and recursion: Options/Recursion. ! * -p: Options Summary. ! * -q <1>: Instead of Execution. ! * -q: Options Summary. ! * -r: Options Summary. ! * -S: Options Summary. ! * -s <1>: Options Summary. ! * -s: Echoing. ! * -t <1>: Instead of Execution. ! * -t: Options Summary. ! * -t, and recursion: MAKE Variable. ! * -v: Options Summary. ! * -W: Options Summary. ! * -w: Options Summary. ! * -W: Instead of Execution. ! * -w, and -C: -w Option. ! * -w, and recursion: -w Option. ! * -W, and recursion: Options/Recursion. ! * -w, disabling: -w Option. ! * .a (archives): Archive Suffix Rules. ! * .c: Catalogue of Rules. ! * .C: Catalogue of Rules. ! * .cc: Catalogue of Rules. ! * .ch: Catalogue of Rules. ! * .d: Automatic Dependencies. ! * .def: Catalogue of Rules. ! * .dvi: Catalogue of Rules. ! * .f: Catalogue of Rules. ! * .F: Catalogue of Rules. ! * .info: Catalogue of Rules. ! * .l: Catalogue of Rules. ! * .ln: Catalogue of Rules. ! * .mod: Catalogue of Rules. ! * .o: Catalogue of Rules. ! * .p: Catalogue of Rules. ! * .PRECIOUS intermediate files: Chained Rules. ! * .r: Catalogue of Rules. ! * .s: Catalogue of Rules. ! * .S: Catalogue of Rules. ! * .sh: Catalogue of Rules. ! * .sym: Catalogue of Rules. ! * .tex: Catalogue of Rules. ! * .texi: Catalogue of Rules. ! * .texinfo: Catalogue of Rules. ! * .txinfo: Catalogue of Rules. ! * .w: Catalogue of Rules. ! * .web: Catalogue of Rules. ! * .y: Catalogue of Rules. ! * :: rules (double-colon): Double-Colon. ! * := <1>: Flavors. ! * :=: Setting. ! * = <1>: Flavors. ! * =: Setting. ! * ? (wildcard character): Wildcards. ! * @ (in commands): Echoing. ! * @, and define: Sequences. ! * [...] (wildcard characters): Wildcards. * \ (backslash), for continuation lines: Simple Makefile. ! * \ (backslash), in commands: Execution. ! * \ (backslash), to quote % <1>: Selective Search. ! * \ (backslash), to quote % <2>: Static Usage. ! * \ (backslash), to quote %: Text Functions. ! * __.SYMDEF: Archive Symbols. ! * algorithm for directory search: Search Algorithm. ! * all (standard target): Goals. ! * appending to variables: Appending. ! * ar: Implicit Variables. ! * archive: Archives. ! * archive member targets: Archive Members. ! * archive symbol directory updating: Archive Symbols. ! * archive, and -j: Archive Pitfalls. ! * archive, and parallel execution: Archive Pitfalls. ! * archive, suffix rule for: Archive Suffix Rules. ! * Arg list too long: Options/Recursion. ! * arguments of functions: Syntax of Functions. ! * as <1>: Implicit Variables. ! * as: Catalogue of Rules. ! * assembly, rule to compile: Catalogue of Rules. * automatic generation of dependencies <1>: Automatic Dependencies. ! * automatic generation of dependencies: Include. ! * automatic variables: Automatic. ! * backquotes: Shell Function. * backslash (\), for continuation lines: Simple Makefile. ! * backslash (\), in commands: Execution. ! * backslash (\), to quote % <1>: Selective Search. ! * backslash (\), to quote % <2>: Text Functions. ! * backslash (\), to quote %: Static Usage. ! * backslashes in pathnames and wildcard expansion: Wildcard Pitfall. ! * basename: File Name Functions. ! * binary packages: Install Command Categories. ! * broken pipe: Parallel. ! * bugs, reporting: Bugs. ! * built-in special targets: Special Targets. ! * C++, rule to compile: Catalogue of Rules. ! * C, rule to compile: Catalogue of Rules. ! * cc <1>: Implicit Variables. ! * cc: Catalogue of Rules. ! * cd (shell command) <1>: Execution. ! * cd (shell command): MAKE Variable. ! * chains of rules: Chained Rules. ! * check (standard target): Goals. ! * clean (standard target): Goals. ! * clean target <1>: Simple Makefile. ! * clean target: Cleanup. ! * cleaning up: Cleanup. ! * clobber (standard target): Goals. ! * co <1>: Catalogue of Rules. ! * co: Implicit Variables. ! * combining rules by dependency: Combine By Dependency. * command line variable definitions, and recursion: Options/Recursion. ! * command line variables: Overriding. ! * commands: Rule Syntax. ! * commands, backslash (\) in: Execution. ! * commands, comments in: Commands. ! * commands, echoing: Echoing. ! * commands, empty: Empty Commands. ! * commands, errors in: Errors. ! * commands, execution: Execution. ! * commands, execution in parallel: Parallel. ! * commands, expansion: Shell Function. ! * commands, how to write: Commands. ! * commands, instead of executing: Instead of Execution. ! * commands, introduction to: Rule Introduction. ! * commands, quoting newlines in: Execution. ! * commands, sequences of: Sequences. ! * comments, in commands: Commands. ! * comments, in makefile: Makefile Contents. ! * compatibility: Features. ! * compatibility in exporting: Variables/Recursion. ! * compilation, testing: Testing. ! * computed variable name: Computed Names. ! * conditionals: Conditionals. ! * continuation lines: Simple Makefile. ! * conventions for makefiles: Makefile Conventions. ! * ctangle <1>: Implicit Variables. ! * ctangle: Catalogue of Rules. ! * cweave <1>: Implicit Variables. ! * cweave: Catalogue of Rules. ! * deducing commands (implicit rules): make Deduces. ! * default directries for included makefiles: Include. ! * default goal <1>: How Make Works. ! * default goal: Rules. ! * default makefile name: Makefile Names. ! * default rules, last-resort: Last Resort. ! * defining variables verbatim: Defining. ! * deletion of target files <1>: Interrupts. ! * deletion of target files: Errors. ! * dependencies: Rule Syntax. ! * dependencies, automatic generation <1>: Include. ! * dependencies, automatic generation: Automatic Dependencies. ! * dependencies, introduction to: Rule Introduction. ! * dependencies, list of all: Automatic. ! * dependencies, list of changed: Automatic. * dependencies, varying (static pattern): Static Pattern. ! * dependency: Rules. ! * dependency pattern, implicit: Pattern Intro. * dependency pattern, static (not implicit): Static Usage. ! * directive: Makefile Contents. ! * directories, printing them: -w Option. ! * directories, updating archive symbol: Archive Symbols. ! * directory part: File Name Functions. ! * directory search (VPATH): Directory Search. * directory search (VPATH), and implicit rules: Implicit/Search. * directory search (VPATH), and link libraries: Libraries/Search. * directory search (VPATH), and shell commands: Commands/Search. ! * directory search algorithm: Search Algorithm. ! * directory search, traditional: Search Algorithm. ! * dist (standard target): Goals. ! * distclean (standard target): Goals. ! * dollar sign ($), in function call: Syntax of Functions. ! * dollar sign ($), in rules: Rule Syntax. ! * dollar sign ($), in variable name: Computed Names. * dollar sign ($), in variable reference: Reference. ! * double-colon rules: Double-Colon. ! * duplicate words, removing: Text Functions. ! * E2BIG: Options/Recursion. ! * echoing of commands: Echoing. ! * editor: Introduction. ! * Emacs (M-x compile): Errors. ! * empty commands: Empty Commands. ! * empty targets: Empty Targets. ! * environment: Environment. ! * environment, and recursion: Variables/Recursion. ! * environment, SHELL in: Execution. ! * errors (in commands): Errors. ! * errors with wildcards: Wildcard Pitfall. ! * execution, in parallel: Parallel. ! * execution, instead of: Instead of Execution. ! * execution, of commands: Execution. ! * exit status (errors): Errors. ! * explicit rule, definition of: Makefile Contents. ! * exporting variables: Variables/Recursion. ! * f77 <1>: Implicit Variables. ! * f77: Catalogue of Rules. ! * features of GNU make: Features. ! * features, missing: Missing. ! * file name functions: File Name Functions. ! * file name of makefile: Makefile Names. * file name of makefile, how to specify: Makefile Names. ! * file name prefix, adding: File Name Functions. ! * file name suffix: File Name Functions. ! * file name suffix, adding: File Name Functions. ! * file name with wildcards: Wildcards. ! * file name, basename of: File Name Functions. ! * file name, directory part: File Name Functions. ! * file name, nondirectory part: File Name Functions. ! * files, assuming new: Instead of Execution. ! * files, assuming old: Avoiding Compilation. ! * files, avoiding recompilation of: Avoiding Compilation. ! * files, intermediate: Chained Rules. ! * filtering out words: Text Functions. ! * filtering words: Text Functions. ! * finding strings: Text Functions. ! * flags: Options Summary. ! * flags for compilers: Implicit Variables. ! * flavors of variables: Flavors. ! * FORCE: Force Targets. ! * force targets: Force Targets. ! * Fortran, rule to compile: Catalogue of Rules. ! * functions: Functions. ! * functions, for file names: File Name Functions. ! * functions, for text: Text Functions. ! * functions, syntax of: Syntax of Functions. ! * g++ <1>: Implicit Variables. ! * g++: Catalogue of Rules. ! * gcc: Catalogue of Rules. * generating dependencies automatically <1>: Automatic Dependencies. * generating dependencies automatically: Include. ! * get <1>: Implicit Variables. ! * get: Catalogue of Rules. ! * globbing (wildcards): Wildcards. ! * goal: How Make Works. ! * goal, default <1>: Rules. ! * goal, default: How Make Works. ! * goal, how to specify: Goals. ! * home directory: Wildcards. ! * IEEE Standard 1003.2: Overview. ! * implicit rule: Implicit Rules. ! * implicit rule, and directory search: Implicit/Search. ! * implicit rule, and VPATH: Implicit/Search. ! * implicit rule, definition of: Makefile Contents. ! * implicit rule, how to use: Using Implicit. ! * implicit rule, introduction to: make Deduces. ! * implicit rule, predefined: Catalogue of Rules. ! * implicit rule, search algorithm: Implicit Rule Search. ! * included makefiles, default directries: Include. ! * including (MAKEFILES variable): MAKEFILES Variable. ! * including other makefiles: Include. ! * incompatibilities: Missing. ! * Info, rule to format: Catalogue of Rules. ! * install (standard target): Goals. ! * intermediate files: Chained Rules. ! * intermediate files, preserving: Chained Rules. ! * intermediate targets, explicit: Special Targets. ! * interrupt: Interrupts. ! * job slots: Parallel. ! * job slots, and recursion: Options/Recursion. ! * jobs, limiting based on load: Parallel. ! * joining lists of words: File Name Functions. ! * killing (interruption): Interrupts. ! * last-resort default rules: Last Resort. ! * ld: Catalogue of Rules. ! * lex <1>: Implicit Variables. ! * lex: Catalogue of Rules. ! * Lex, rule to run: Catalogue of Rules. * libraries for linking, directory search: Libraries/Search. ! * library archive, suffix rule for: Archive Suffix Rules. ! * limiting jobs based on load: Parallel. ! * link libraries, and directory search: Libraries/Search. ! * linking, predefined rule for: Catalogue of Rules. ! * lint: Catalogue of Rules. ! * lint, rule to run: Catalogue of Rules. ! * list of all dependencies: Automatic. ! * list of changed dependencies: Automatic. ! * load average: Parallel. ! * loops in variable expansion: Flavors. ! * lpr (shell command) <1>: Wildcard Examples. ! * lpr (shell command): Empty Targets. ! * m2c: Catalogue of Rules. ! * macro: Using Variables. ! * make depend: Automatic Dependencies. ! * MAKECMDGOALS: Goals. ! * makefile: Introduction. ! * makefile name: Makefile Names. ! * makefile name, how to specify: Makefile Names. ! * makefile rule parts: Rule Introduction. ! * makefile, and MAKEFILES variable: MAKEFILES Variable. ! * makefile, conventions for: Makefile Conventions. ! * makefile, how make processes: How Make Works. ! * makefile, how to write: Makefiles. ! * makefile, including: Include. ! * makefile, overriding: Overriding Makefiles. ! * makefile, remaking of: Remaking Makefiles. ! * makefile, simple: Simple Makefile. ! * makeinfo <1>: Implicit Variables. ! * makeinfo: Catalogue of Rules. ! * match-anything rule: Match-Anything Rules. * match-anything rule, used to override: Overriding Makefiles. ! * missing features: Missing. ! * mistakes with wildcards: Wildcard Pitfall. ! * modified variable reference: Substitution Refs. ! * Modula-2, rule to compile: Catalogue of Rules. ! * mostlyclean (standard target): Goals. ! * multiple rules for one target: Multiple Rules. ! * multiple rules for one target (::): Double-Colon. ! * multiple targets: Multiple Targets. ! * multiple targets, in pattern rule: Pattern Intro. ! * name of makefile: Makefile Names. ! * name of makefile, how to specify: Makefile Names. ! * nested variable reference: Computed Names. ! * newline, quoting, in commands: Execution. ! * newline, quoting, in makefile: Simple Makefile. ! * nondirectory part: File Name Functions. ! * obj: Variables Simplify. ! * OBJ: Variables Simplify. ! * OBJECTS: Variables Simplify. ! * objects: Variables Simplify. ! * objs: Variables Simplify. ! * OBJS: Variables Simplify. ! * old-fashioned suffix rules: Suffix Rules. ! * options: Options Summary. ! * options, and recursion: Options/Recursion. ! * options, setting from environment: Options/Recursion. ! * options, setting in makefiles: Options/Recursion. ! * order of pattern rules: Pattern Intro. ! * origin of variable: Origin Function. ! * overriding makefiles: Overriding Makefiles. ! * overriding variables with arguments: Overriding. ! * overriding with override: Override Directive. ! * parallel execution: Parallel. * parallel execution, and archive update: Archive Pitfalls. ! * parts of makefile rule: Rule Introduction. ! * Pascal, rule to compile: Catalogue of Rules. ! * pattern rule: Pattern Intro. ! * pattern rules, order of: Pattern Intro. ! * pattern rules, static (not implicit): Static Pattern. ! * pattern rules, static, syntax of: Static Usage. ! * pc <1>: Implicit Variables. ! * pc: Catalogue of Rules. ! * phony targets: Phony Targets. ! * pitfalls of wildcards: Wildcard Pitfall. ! * portability: Features. ! * POSIX: Overview. ! * POSIX.2: Options/Recursion. ! * post-installation commands: Install Command Categories. ! * pre-installation commands: Install Command Categories. ! * precious targets: Special Targets. ! * prefix, adding: File Name Functions. ! * preserving intermediate files: Chained Rules. ! * preserving with .PRECIOUS <1>: Chained Rules. ! * preserving with .PRECIOUS: Special Targets. ! * preserving with .SECONDARY: Special Targets. ! * print (standard target): Goals. ! * print target <1>: Empty Targets. ! * print target: Wildcard Examples. ! * printing directories: -w Option. ! * printing of commands: Echoing. ! * problems and bugs, reporting: Bugs. ! * problems with wildcards: Wildcard Pitfall. ! * processing a makefile: How Make Works. ! * question mode: Instead of Execution. ! * quoting %, in patsubst: Text Functions. ! * quoting %, in static pattern: Static Usage. ! * quoting %, in vpath: Selective Search. ! * quoting newline, in commands: Execution. ! * quoting newline, in makefile: Simple Makefile. ! * Ratfor, rule to compile: Catalogue of Rules. ! * RCS, rule to extract from: Catalogue of Rules. ! * README: Makefile Names. ! * realclean (standard target): Goals. ! * recompilation: Introduction. ! * recompilation, avoiding: Avoiding Compilation. ! * recording events with empty targets: Empty Targets. ! * recursion: Recursion. ! * recursion, and -C: Options/Recursion. ! * recursion, and -f: Options/Recursion. ! * recursion, and -j: Options/Recursion. ! * recursion, and -o: Options/Recursion. ! * recursion, and -t: MAKE Variable. ! * recursion, and -W: Options/Recursion. ! * recursion, and -w: -w Option. * recursion, and command line variable definitions: Options/Recursion. ! * recursion, and environment: Variables/Recursion. ! * recursion, and MAKE variable: MAKE Variable. ! * recursion, and MAKEFILES variable: MAKEFILES Variable. ! * recursion, and options: Options/Recursion. ! * recursion, and printing directories: -w Option. ! * recursion, and variables: Variables/Recursion. ! * recursion, level of: Variables/Recursion. ! * recursive variable expansion <1>: Flavors. ! * recursive variable expansion: Using Variables. ! * recursively expanded variables: Flavors. ! * reference to variables <1>: Reference. ! * reference to variables: Advanced. ! * relinking: How Make Works. ! * remaking makefiles: Remaking Makefiles. ! * removal of target files <1>: Errors. ! * removal of target files: Interrupts. ! * removing duplicate words: Text Functions. ! * removing, to clean up: Cleanup. ! * reporting bugs: Bugs. ! * rm: Implicit Variables. ! * rm (shell command) <1>: Wildcard Examples. ! * rm (shell command) <2>: Errors. ! * rm (shell command) <3>: Phony Targets. ! * rm (shell command): Simple Makefile. ! * rule commands: Commands. ! * rule dependencies: Rule Syntax. ! * rule syntax: Rule Syntax. ! * rule targets: Rule Syntax. ! * rule, and $: Rule Syntax. ! * rule, double-colon (::): Double-Colon. ! * rule, explicit, definition of: Makefile Contents. ! * rule, how to write: Rules. ! * rule, implicit: Implicit Rules. ! * rule, implicit, and directory search: Implicit/Search. ! * rule, implicit, and VPATH: Implicit/Search. ! * rule, implicit, chains of: Chained Rules. ! * rule, implicit, definition of: Makefile Contents. ! * rule, implicit, how to use: Using Implicit. ! * rule, implicit, introduction to: make Deduces. ! * rule, implicit, predefined: Catalogue of Rules. ! * rule, introduction to: Rule Introduction. ! * rule, multiple for one target: Multiple Rules. ! * rule, no commands or dependencies: Force Targets. ! * rule, pattern: Pattern Intro. ! * rule, static pattern: Static Pattern. ! * rule, static pattern versus implicit: Static versus Implicit. ! * rule, with multiple targets: Multiple Targets. ! * s. (SCCS file prefix): Catalogue of Rules. ! * SCCS, rule to extract from: Catalogue of Rules. ! * search algorithm, implicit rule: Implicit Rule Search. ! * search path for dependencies (VPATH): Directory Search. * search path for dependencies (VPATH), and implicit rules: Implicit/Search. * search path for dependencies (VPATH), and link libraries: Libraries/Search. ! * searching for strings: Text Functions. ! * secondary files: Chained Rules. ! * secondary targets: Special Targets. ! * sed (shell command): Automatic Dependencies. ! * selecting a word: File Name Functions. ! * selecting word lists: File Name Functions. ! * sequences of commands: Sequences. ! * setting options from environment: Options/Recursion. ! * setting options in makefiles: Options/Recursion. ! * setting variables: Setting. ! * several rules for one target: Multiple Rules. ! * several targets in a rule: Multiple Targets. ! * shar (standard target): Goals. ! * shell command: Simple Makefile. ! * shell command, and directory search: Commands/Search. ! * shell command, execution: Execution. ! * shell command, function for: Shell Function. ! * shell file name pattern (in include): Include. ! * shell wildcards (in include): Include. ! * SHELL, MS-DOS specifics: Execution. ! * signal: Interrupts. ! * silent operation: Echoing. ! * simple makefile: Simple Makefile. ! * simple variable expansion: Using Variables. ! * simplifying with variables: Variables Simplify. ! * simply expanded variables: Flavors. ! * sorting words: Text Functions. ! * spaces, in variable values: Flavors. ! * spaces, stripping: Text Functions. ! * special targets: Special Targets. ! * specifying makefile name: Makefile Names. ! * standard input: Parallel. ! * standards conformance: Overview. ! * standards for makefiles: Makefile Conventions. ! * static pattern rule: Static Pattern. ! * static pattern rule, syntax of: Static Usage. ! * static pattern rule, versus implicit: Static versus Implicit. ! * stem <1>: Pattern Match. ! * stem: Static Usage. ! * stem, variable for: Automatic. ! * strings, searching for: Text Functions. ! * stripping whitespace: Text Functions. ! * sub-make: Variables/Recursion. ! * subdirectories, recursion for: Recursion. ! * substitution variable reference: Substitution Refs. ! * suffix rule: Suffix Rules. ! * suffix rule, for archive: Archive Suffix Rules. ! * suffix, adding: File Name Functions. ! * suffix, function to find: File Name Functions. ! * suffix, substituting in variables: Substitution Refs. ! * switches: Options Summary. ! * symbol directories, updating archive: Archive Symbols. ! * syntax of rules: Rule Syntax. ! * tab character (in commands): Rule Syntax. ! * tabs in rules: Rule Introduction. ! * TAGS (standard target): Goals. ! * tangle <1>: Implicit Variables. ! * tangle: Catalogue of Rules. ! * tar (standard target): Goals. ! * target: Rules. ! * target pattern, implicit: Pattern Intro. * target pattern, static (not implicit): Static Usage. ! * target, deleting on error: Errors. ! * target, deleting on interrupt: Interrupts. ! * target, multiple in pattern rule: Pattern Intro. ! * target, multiple rules for one: Multiple Rules. ! * target, touching: Instead of Execution. ! * targets: Rule Syntax. ! * targets without a file: Phony Targets. ! * targets, built-in special: Special Targets. ! * targets, empty: Empty Targets. ! * targets, force: Force Targets. ! * targets, introduction to: Rule Introduction. ! * targets, multiple: Multiple Targets. ! * targets, phony: Phony Targets. ! * terminal rule: Match-Anything Rules. ! * test (standard target): Goals. ! * testing compilation: Testing. ! * tex <1>: Catalogue of Rules. ! * tex: Implicit Variables. ! * TeX, rule to run: Catalogue of Rules. ! * texi2dvi <1>: Implicit Variables. ! * texi2dvi: Catalogue of Rules. ! * Texinfo, rule to format: Catalogue of Rules. ! * tilde (~): Wildcards. ! * touch (shell command) <1>: Wildcard Examples. ! * touch (shell command): Empty Targets. ! * touching files: Instead of Execution. ! * traditional directory search: Search Algorithm. ! * undefined variables, warning message: Options Summary. ! * updating archive symbol directories: Archive Symbols. ! * updating makefiles: Remaking Makefiles. ! * value: Using Variables. ! * value, how a variable gets it: Values. ! * variable: Using Variables. ! * variable definition: Makefile Contents. ! * variables: Variables Simplify. ! * variables, $ in name: Computed Names. ! * variables, and implicit rule: Automatic. ! * variables, appending to: Appending. ! * variables, automatic: Automatic. ! * variables, command line: Overriding. * variables, command line, and recursion: Options/Recursion. ! * variables, computed names: Computed Names. ! * variables, defining verbatim: Defining. ! * variables, environment <1>: Variables/Recursion. ! * variables, environment: Environment. ! * variables, exporting: Variables/Recursion. ! * variables, flavors: Flavors. ! * variables, how they get their values: Values. ! * variables, how to reference: Reference. ! * variables, loops in expansion: Flavors. ! * variables, modified reference: Substitution Refs. ! * variables, nested references: Computed Names. ! * variables, origin of: Origin Function. ! * variables, overriding: Override Directive. ! * variables, overriding with arguments: Overriding. ! * variables, recursively expanded: Flavors. ! * variables, setting: Setting. ! * variables, simply expanded: Flavors. ! * variables, spaces in values: Flavors. ! * variables, substituting suffix in: Substitution Refs. ! * variables, substitution reference: Substitution Refs. ! * variables, warning for undefined: Options Summary. ! * varying dependencies: Static Pattern. ! * verbatim variable definition: Defining. ! * vpath: Directory Search. ! * VPATH, and implicit rules: Implicit/Search. ! * VPATH, and link libraries: Libraries/Search. ! * weave <1>: Catalogue of Rules. ! * weave: Implicit Variables. ! * Web, rule to run: Catalogue of Rules. ! * what if: Instead of Execution. ! * whitespace, in variable values: Flavors. ! * whitespace, stripping: Text Functions. ! * wildcard: Wildcards. ! * wildcard pitfalls: Wildcard Pitfall. ! * wildcard, function: File Name Functions. ! * wildcard, in archive member: Archive Members. ! * wildcard, in include: Include. ! * wildcards and MS-DOS/MS-Windows backslashes: Wildcard Pitfall. ! * word, selecting a: File Name Functions. ! * words, extracting first: File Name Functions. ! * words, filtering: Text Functions. ! * words, filtering out: Text Functions. ! * words, finding number: File Name Functions. ! * words, iterating over: Foreach Function. ! * words, joining lists: File Name Functions. ! * words, removing duplicates: Text Functions. ! * words, selecting lists of: File Name Functions. ! * writing rule commands: Commands. ! * writing rules: Rules. ! * yacc <1>: Sequences. ! * yacc <2>: Implicit Variables. ! * yacc: Catalogue of Rules. ! * Yacc, rule to run: Catalogue of Rules. ! * ~ (tilde): Wildcards. diff -crP ../make-3.75/make.info-9 ./make.info-9 *** ../make-3.75/make.info-9 Wed Dec 31 19:00:00 1969 --- ./make.info-9 Tue Sep 16 11:04:28 1997 *************** *** 0 **** --- 1,197 ---- + This is Info file make.info, produced by Makeinfo version 1.67 from the + input file make.texinfo. + + INFO-DIR-SECTION The GNU make utility + START-INFO-DIR-ENTRY + * GNU make: (make.info). The GNU make utility. + END-INFO-DIR-ENTRY + + This file documents the GNU Make utility, which determines + automatically which pieces of a large program need to be recompiled, + and issues the commands to recompile them. + + This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make + Manual', for `make', Version 3.76 Beta. + + Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free + Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + + Permission is granted to copy and distribute modified versions of + this manual under the conditions for verbatim copying, provided that + the entire resulting derived work is distributed under the terms of a + permission notice identical to this one. + + Permission is granted to copy and distribute translations of this + manual into another language, under the above conditions for modified + versions, except that this permission notice may be stated in a + translation approved by the Free Software Foundation. + +  + File: make.info, Node: Name Index, Prev: Concept Index, Up: Top + + Index of Functions, Variables, & Directives + ******************************************* + + * Menu: + + * $%: Automatic. + * $(%D): Automatic. + * $(%F): Automatic. + * $(*D): Automatic. + * $(*F): Automatic. + * $(: Last Resort. + * .DEFAULT: Special Targets. + * .DEFAULT, and empty commands: Empty Commands. + * .DELETE_ON_ERROR: Errors. + * .EXPORT_ALL_VARIABLES <1>: Variables/Recursion. + * .EXPORT_ALL_VARIABLES: Special Targets. + * .IGNORE <1>: Errors. + * .IGNORE: Special Targets. + * .INTERMEDIATE: Special Targets. + * .PHONY <1>: Phony Targets. + * .PHONY: Special Targets. + * .POSIX: Options/Recursion. + * .PRECIOUS <1>: Interrupts. + * .PRECIOUS: Special Targets. + * .SECONDARY: Special Targets. + * .SILENT <1>: Echoing. + * .SILENT: Special Targets. + * .SUFFIXES <1>: Special Targets. + * .SUFFIXES: Suffix Rules. + * /usr/gnu/include: Include. + * /usr/include: Include. + * /usr/local/include: Include. + * < (automatic variable): Automatic. + * : MAKE Variable. + * MAKE: Flavors. + * MAKECMDGOALS: Goals. + * Makefile: Makefile Names. + * makefile: Makefile Names. + * MAKEFILES <1>: Variables/Recursion. + * MAKEFILES: MAKEFILES Variable. + * MAKEFLAGS: Options/Recursion. + * MAKEINFO: Implicit Variables. + * MAKELEVEL <1>: Flavors. + * MAKELEVEL: Variables/Recursion. + * MAKEOVERRIDES: Options/Recursion. + * MFLAGS: Options/Recursion. + * notdir: File Name Functions. + * origin: Origin Function. + * OUTPUT_OPTION: Catalogue of Rules. + * override: Override Directive. + * patsubst <1>: Text Functions. + * patsubst: Substitution Refs. + * PC: Implicit Variables. + * PFLAGS: Implicit Variables. + * RFLAGS: Implicit Variables. + * RM: Implicit Variables. + * SHELL: Execution. + * shell: Shell Function. + * SHELL (command execution): Execution. + * sort: Text Functions. + * strip: Text Functions. + * subst <1>: Text Functions. + * subst: Multiple Targets. + * suffix: File Name Functions. + * SUFFIXES: Suffix Rules. + * TANGLE: Implicit Variables. + * TEX: Implicit Variables. + * TEXI2DVI: Implicit Variables. + * unexport: Variables/Recursion. + * vpath: Selective Search. + * VPATH: General Search. + * vpath: Directory Search. + * VPATH: Directory Search. + * WEAVE: Implicit Variables. + * wildcard <1>: File Name Functions. + * wildcard: Wildcard Function. + * word: File Name Functions. + * wordlist: File Name Functions. + * words: File Name Functions. + * YACC: Implicit Variables. + * YACCR: Implicit Variables. + * YFLAGS: Implicit Variables. + + Only in ../make-3.75: make.ky diff -crP ../make-3.75/make.man ./make.man *** ../make-3.75/make.man Wed May 19 13:56:38 1993 --- ./make.man Mon Aug 18 14:11:22 1997 *************** *** 8,14 **** makefile ] [ option ] ... target ... .SH WARNING ! This man paage is an extract of the documentation of .I GNU make . It is updated only occasionally, because the GNU project does not use nroff. For complete, current documentation, refer to the Info file --- 8,14 ---- makefile ] [ option ] ... target ... .SH WARNING ! This man page is an extract of the documentation of .I GNU make . It is updated only occasionally, because the GNU project does not use nroff. For complete, current documentation, refer to the Info file *************** *** 110,116 **** .B \-b .TP 0.5i .B \-m ! These options are ignored for compatibility with other versions of .IR make . .TP 0.5i .BI "\-C " dir --- 110,116 ---- .B \-b .TP 0.5i .B \-m ! These options are ignored for compatibility with other versions of .IR make . .TP 0.5i .BI "\-C " dir *************** *** 157,163 **** .B \-I options are used to specify several directories, the directories are searched in the order specified. ! Unlike the arguments to other flags of .IR make , directories given with .B \-I --- 157,163 ---- .B \-I options are used to specify several directories, the directories are searched in the order specified. ! Unlike the arguments to other flags of .IR make , directories given with .B \-I *************** *** 236,246 **** Cancel the effect of the .B \-k option. ! This is never necessary except in a recursive .I make where .B \-k ! might be inherited from the top-level .I make via MAKEFLAGS or if you set .B \-k --- 236,246 ---- Cancel the effect of the .B \-k option. ! This is never necessary except in a recursive .I make where .B \-k ! might be inherited from the top-level .I make via MAKEFLAGS or if you set .B \-k *************** *** 254,260 **** .IR make . .TP 0.5i .B \-v ! Print the version of the .I make program plus a copyright, a list of authors and a notice that there is no warranty. --- 254,260 ---- .IR make . .TP 0.5i .B \-v ! Print the version of the .I make program plus a copyright, a list of authors and a notice that there is no warranty. *************** *** 285,291 **** .I touch command on the given file before running .IR make , ! except that the modification time is changed only in the imagination of .IR make . .SH "SEE ALSO" .PD 0 --- 285,291 ---- .I touch command on the given file before running .IR make , ! except that the modification time is changed only in the imagination of .IR make . .SH "SEE ALSO" .PD 0 Only in ../make-3.75: make.pg diff -crP ../make-3.75/make.texinfo ./make.texinfo *** ../make-3.75/make.texinfo Sun Jul 14 12:30:15 1996 --- ./make.texinfo Tue Sep 16 10:17:33 1997 *************** *** 7,17 **** @c FSF publishers: format makebook.texi instead of using this file directly. ! @set RCSID $Id: make.texinfo,v 2.161 1996/06/22 21:21:30 roland Exp $ @set EDITION 0.51 ! @set VERSION 3.75 Beta ! @set UPDATED 9 May 1996 ! @set UPDATE-MONTH May 1996 @comment The ISBN number might need to change on next publication. @set ISBN 1-882114-78-7 @c CHANGE THIS BEFORE PRINTING AGAIN! --roland 9may96 --- 7,17 ---- @c FSF publishers: format makebook.texi instead of using this file directly. ! @set RCSID $Id: make.texinfo,v 2.165 1997/09/16 14:17:33 psmith Exp $ @set EDITION 0.51 ! @set VERSION 3.76 Beta ! @set UPDATED 26 Aug 1997 ! @set UPDATE-MONTH Aug 1997 @comment The ISBN number might need to change on next publication. @set ISBN 1-882114-78-7 @c CHANGE THIS BEFORE PRINTING AGAIN! --roland 9may96 *************** *** 25,30 **** --- 25,35 ---- @syncodeindex pg cp @ifinfo + @dircategory The GNU make utility + @direntry + * GNU make: (make.info). The GNU make utility. + @end direntry + This file documents the GNU Make utility, which determines automatically which pieces of a large program need to be recompiled, and issues the commands to recompile them. *************** *** 32,38 **** This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{The GNU Make Manual}, for @code{make}, Version @value{VERSION}. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 37,43 ---- This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{The GNU Make Manual}, for @code{make}, Version @value{VERSION}. ! Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 68,74 **** @author Richard M. Stallman and Roland McGrath @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1988, '89, '90, '91, '92, '93, '94, '95, '96 Free Software Foundation, Inc. @sp 2 Published by the Free Software Foundation @* 59 Temple Place -- Suite 330, @* --- 73,79 ---- @author Richard M. Stallman and Roland McGrath @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free Software Foundation, Inc. @sp 2 Published by the Free Software Foundation @* 59 Temple Place -- Suite 330, @* *************** *** 95,101 **** @page @ifinfo ! @node Top, Overview, (dir), (dir) @top Make The GNU @code{make} utility automatically determines which pieces of a --- 100,106 ---- @page @ifinfo ! @node Top, Overview, , (dir) @top Make The GNU @code{make} utility automatically determines which pieces of a *************** *** 196,201 **** --- 201,207 ---- to every dependency. * Selective Search:: Specifying a search path for a specified class of names. + * Search Algorithm:: When and how search paths are applied. * Commands/Search:: How to write shell commands that work together with search paths. * Implicit/Search:: How search paths affect implicit rules. *************** *** 239,244 **** --- 245,252 ---- * Defining:: An alternate way to set a variable to a verbatim string. * Environment:: Variable values can come from the environment. + * Automatic:: Some special variables have predefined + meanings for use with implicit rules. Advanced Features for Reference to Variables *************** *** 256,262 **** * Syntax of Functions:: How to write a function call. * Text Functions:: General-purpose text manipulation functions. ! * Filename Functions:: Functions for manipulating file names. * Foreach Function:: Repeat some text with controlled variation. * Origin Function:: Find where a variable got its value. * Shell Function:: Substitute the output of a shell command. --- 264,270 ---- * Syntax of Functions:: How to write a function call. * Text Functions:: General-purpose text manipulation functions. ! * File Name Functions:: Functions for manipulating file names. * Foreach Function:: Repeat some text with controlled variation. * Origin Function:: Find where a variable got its value. * Shell Function:: Substitute the output of a shell command. *************** *** 288,294 **** * Last Resort:: How to defining commands for rules which cannot find any. * Suffix Rules:: The old-fashioned style of implicit rule. ! * Search Algorithm:: The precise algorithm for applying implicit rules. Defining and Redefining Pattern Rules --- 296,302 ---- * Last Resort:: How to defining commands for rules which cannot find any. * Suffix Rules:: The old-fashioned style of implicit rule. ! * Implicit Rule Search:: The precise algorithm for applying implicit rules. Defining and Redefining Pattern Rules *************** *** 307,312 **** --- 315,321 ---- * Archive Members:: Archive members as targets. * Archive Update:: The implicit rule for archive member targets. + * Archive Pitfalls:: Dangers to watch out for when using archives. * Archive Suffix Rules:: You can write a special kind of suffix rule for updating archives. *************** *** 1093,1098 **** --- 1102,1109 ---- @cindex @code{-I} @cindex @code{--include-dir} + @cindex included makefiles, default directries + @cindex default directries for included makefiles @findex /usr/gnu/include @findex /usr/local/include @findex /usr/include *************** *** 1103,1109 **** (@pxref{Options Summary, ,Summary of Options}). Then the following directories (if they exist) are searched, in this order: ! @file{@var{prefix}/include} (normally @file{/usr/local/include}) @file{/usr/gnu/include}, @file{/usr/local/include}, @file{/usr/include}. --- 1114,1123 ---- (@pxref{Options Summary, ,Summary of Options}). Then the following directories (if they exist) are searched, in this order: ! @file{@var{prefix}/include} (normally @file{/usr/local/include} ! @footnote{GNU Make compiled for MS-DOS and MS-Windows behaves as if ! @var{prefix} has been defined to be the root of the DJGPP tree ! hierarchy.}) @file{/usr/gnu/include}, @file{/usr/local/include}, @file{/usr/include}. *************** *** 1455,1461 **** directory. For example @file{~/bin} expands to @file{/home/you/bin}. If the @samp{~} is followed by a word, the string represents the home directory of the user named by that word. For example @file{~john/bin} ! expands to @file{/home/john/bin}.@refill Wildcard expansion happens automatically in targets, in dependencies, and in commands (where the shell does the expansion). In other --- 1469,1478 ---- directory. For example @file{~/bin} expands to @file{/home/you/bin}. If the @samp{~} is followed by a word, the string represents the home directory of the user named by that word. For example @file{~john/bin} ! expands to @file{/home/john/bin}. On systems which don't have a home ! directory for each user (such as MS-DOS or MS-Windows), this ! functionality can be simulated by setting the environment variable ! @var{HOME}.@refill Wildcard expansion happens automatically in targets, in dependencies, and in commands (where the shell does the expansion). In other *************** *** 1569,1574 **** --- 1586,1609 ---- These are described in the following section. @end iftex + @cindex wildcards and MS-DOS/MS-Windows backslashes + @cindex backslashes in pathnames and wildcard expansion + + Microsoft operating systems (MS-DOS and MS-Windows) use backslashes to + separate directories in pathnames, like so: + + @example + c:\foo\bar\baz.c + @end example + + This is equivalent to the Unix-style @file{c:/foo/bar/baz.c} (the + @file{c:} part is the so-called drive letter). When @code{make} runs on + these systems, it supports backslashes as well as the Unix-style forward + slashes in pathnames. However, this support does @emph{not} include the + wildcard expansion, where backslash is a quote character. Therefore, + you @emph{must} use Unix-style slashes in these cases. + + @node Wildcard Function, , Wildcard Pitfall, Wildcards @subsection The Function @code{wildcard} @findex wildcard *************** *** 1645,1650 **** --- 1680,1686 ---- to every dependency. * Selective Search:: Specifying a search path for a specified class of names. + * Search Algorithm:: When and how search paths are applied. * Commands/Search:: How to write shell commands that work together with search paths. * Implicit/Search:: How search paths affect implicit rules. *************** *** 1665,1678 **** Thus, if a file that is listed as a target or dependency does not exist in the current directory, @code{make} searches the directories listed in @code{VPATH} for a file with that name. If a file is found in one of ! them, that file becomes the dependency. Rules may then specify the ! names of source files in the dependencies as if they all existed in the ! current directory. @xref{Commands/Search, ,Writing Shell Commands with ! Directory Search}. In the @code{VPATH} variable, directory names are separated by colons or blanks. The order in which directories are listed is the order followed ! by @code{make} in its search. For example, --- 1701,1716 ---- Thus, if a file that is listed as a target or dependency does not exist in the current directory, @code{make} searches the directories listed in @code{VPATH} for a file with that name. If a file is found in one of ! them, that file may become the dependency (see below). Rules may then ! specify the names of files in the dependency list as if they all ! existed in the current directory. @xref{Commands/Search, ,Writing Shell ! Commands with Directory Search}. In the @code{VPATH} variable, directory names are separated by colons or blanks. The order in which directories are listed is the order followed ! by @code{make} in its search. (On MS-DOS and MS-Windows, semi-colons ! are used as separators of directory names in @code{VPATH}, since the ! colon can be used in the pathname itself, after the drive letter.) For example, *************** *** 1701,1715 **** assuming the file @file{foo.c} does not exist in the current directory but is found in the directory @file{src}. ! @node Selective Search, Commands/Search, General Search, Directory Search @subsection The @code{vpath} Directive @findex vpath ! Similar to the @code{VPATH} variable but more selective is the @code{vpath} ! directive (note lower case), which allows you to specify a search path for a particular class ! of file names, those that match a particular pattern. Thus you can supply ! certain search directories for one class of file names and other directories ! (or none) for other file names. There are three forms of the @code{vpath} directive: --- 1739,1754 ---- assuming the file @file{foo.c} does not exist in the current directory but is found in the directory @file{src}. ! @node Selective Search, Search Algorithm, General Search, Directory Search @subsection The @code{vpath} Directive @findex vpath ! Similar to the @code{VPATH} variable, but more selective, is the ! @code{vpath} directive (note lower case), which allows you to specify a ! search path for a particular class of file names: those that match a ! particular pattern. Thus you can supply certain search directories for ! one class of file names and other directories (or none) for other file ! names. There are three forms of the @code{vpath} directive: *************** *** 1719,1726 **** @var{pattern}. The search path, @var{directories}, is a list of directories to be ! searched, separated by colons or blanks, just like the search path used ! in the @code{VPATH} variable. @item vpath @var{pattern} Clear out the search path associated with @var{pattern}. --- 1758,1765 ---- @var{pattern}. The search path, @var{directories}, is a list of directories to be ! searched, separated by colons (semi-colons on MS-DOS and MS-Windows) or ! blanks, just like the search path used in the @code{VPATH} variable. @item vpath @var{pattern} Clear out the search path associated with @var{pattern}. *************** *** 1800,1806 **** will look for a file ending in @samp{.c} in @file{foo}, then @file{bar}, then @file{blish}. ! @node Commands/Search, Implicit/Search, Selective Search, Directory Search @subsection Writing Shell Commands with Directory Search @cindex shell command, and directory search @cindex directory search (@code{VPATH}), and shell commands --- 1839,1912 ---- will look for a file ending in @samp{.c} in @file{foo}, then @file{bar}, then @file{blish}. ! @node Search Algorithm, Commands/Search, Selective Search, Directory Search ! @subsection How Directory Searches are Performed ! @cindex algorithm for directory search ! @cindex directory search algorithm ! ! When a dependency is found through directory search, regardless of type ! (general or selective), the pathname located may not be the one that ! @code{make} actually provides you in the dependency list. Sometimes ! the path discovered through directory search is thrown away. ! ! The algorithm @code{make} uses to decide whether to keep or abandon a ! path found via directory search is as follows: ! ! @enumerate ! @item ! If a target file does not exist at the path specified in the makefile, ! directory search is performed. ! ! @item ! If the directory search is successful, that path is kept and this file ! is tentatively stored as the target. ! ! @item ! All dependencies of this target are examined using this same method. ! ! @item ! After processing the dependencies, the target may or may not need to be ! rebuilt: ! ! @enumerate a ! @item ! If the target does @emph{not} need to be rebuilt, the path to the file ! found during directory search is used for any dependency lists which ! contain this target. In short, if @code{make} doesn't need to rebuild ! the target then you use the path found via directory search. ! ! @item ! If the target @emph{does} need to be rebuilt (is out-of-date), the ! pathname found during directory search is @emph{thrown away}, and the ! target is rebuilt using the file name specified in the makefile. In ! short, if @code{make} must rebuild, then the target is rebuilt locally, ! not in the directory found via directory search. ! @end enumerate ! @end enumerate ! ! This algorithm may seem complex, but in practice it is quite often ! exactly what you want. ! ! @cindex traditional directory search ! @cindex directory search, traditional ! Other versions of @code{make} use a simpler algorithm: if the file does ! not exist, and it is found via directory search, then that pathname is ! always used whether or not the target needs to be built. Thus, if the ! target is rebuilt it is created at the pathname discovered during ! directory search. ! ! @vindex GPATH ! If, in fact, this is the behavior you want for some or all of your ! directories, you can use the @code{GPATH} variable to indicate this to ! @code{make}. ! ! @code{GPATH} has the same syntax and format as @code{VPATH} (that is, a ! space- or colon-delimited list of pathnames). If an out-of-date target ! is found by directory search in a directory that also appears in ! @code{GPATH}, then that pathname is not thrown away. The target is ! rebuilt using the expanded path. ! ! @node Commands/Search, Implicit/Search, Search Algorithm, Directory Search @subsection Writing Shell Commands with Directory Search @cindex shell command, and directory search @cindex directory search (@code{VPATH}), and shell commands *************** *** 1884,1890 **** the current directory, in directories specified by matching @code{vpath} search paths and the @code{VPATH} search path, and then in the directories @file{/lib}, @file{/usr/lib}, and @file{@var{prefix}/lib} ! (normally @file{/usr/local/lib}). For example, --- 1990,1998 ---- the current directory, in directories specified by matching @code{vpath} search paths and the @code{VPATH} search path, and then in the directories @file{/lib}, @file{/usr/lib}, and @file{@var{prefix}/lib} ! (normally @file{/usr/local/lib}, but MS-DOS/MS-Windows versions of ! @code{make} behave as if @var{prefix} is defined to be the root of the ! DJGPP installation tree). For example, *************** *** 2112,2118 **** which no rules are found (either explicit rules or implicit rules). @xref{Last Resort}. If @code{.DEFAULT} commands are specified, every file mentioned as a dependency, but not as a target in a rule, will have ! these commands executed on its behalf. @xref{Search Algorithm, ,Implicit Rule Search Algorithm}. @findex .PRECIOUS --- 2220,2226 ---- which no rules are found (either explicit rules or implicit rules). @xref{Last Resort}. If @code{.DEFAULT} commands are specified, every file mentioned as a dependency, but not as a target in a rule, will have ! these commands executed on its behalf. @xref{Implicit Rule Search, ,Implicit Rule Search Algorithm}. @findex .PRECIOUS *************** *** 2409,2414 **** --- 2517,2524 ---- @group objects = foo.o bar.o + all: $(objects) + $(objects): %.o: %.c $(CC) -c $(CFLAGS) $< -o $@@ @end group *************** *** 2603,2609 **** @group %.d: %.c $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \ ! | sed '\''s/\($*\)\.o[ :]*/\1 $@@/g'\'' > $@@' @end group @end smallexample --- 2713,2720 ---- @group %.d: %.c $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \ ! | sed '\''s/\($*\)\.o[ :]*/\1.o $@@ : /g'\'' > $@@; \ ! [ -s $@@ ] || rm -f $@@' @end group @end smallexample *************** *** 2757,2769 **** take shortcuts that do not affect the results.) @cindex @code{cd} (shell command) ! @strong{Please note:} this implies that shell commands such as ! @code{cd} that set variables local to each process will not affect the ! following command lines. If you want to use @code{cd} to affect the ! next command, put the two on a single line with a semicolon between ! them. Then @code{make} will consider them a single command and pass ! them, together, to a shell which will execute them in sequence. For ! example: @example foo : bar/lose --- 2868,2882 ---- take shortcuts that do not affect the results.) @cindex @code{cd} (shell command) ! @strong{Please note:} this implies that shell commands such as @code{cd} ! that set variables local to each process will not affect the following ! command lines. @footnote{On MS-DOS, the value of current working ! directory is @strong{global}, so changing it @emph{will} affect the ! following command lines on those systems.} If you want to use @code{cd} ! to affect the next command, put the two on a single line with a ! semicolon between them. Then @code{make} will consider them a single ! command and pass them, together, to a shell which will execute them in ! sequence. For example: @example foo : bar/lose *************** *** 2794,2806 **** The program used as the shell is taken from the variable @code{SHELL}. By default, the program @file{/bin/sh} is used. @cindex environment, @code{SHELL} in Unlike most variables, the variable @code{SHELL} is never set from the environment. This is because the @code{SHELL} environment variable is used to specify your personal choice of shell program for interactive ! use. It would be very bad for personal choices like this to affect ! the functioning of makefiles. @xref{Environment, ,Variables from the ! Environment}. @node Parallel, Errors, Execution, Commands @section Parallel Execution --- 2907,2981 ---- The program used as the shell is taken from the variable @code{SHELL}. By default, the program @file{/bin/sh} is used. + @vindex COMSPEC + On MS-DOS, if @code{SHELL} is not set, the value of the variable + @code{COMSPEC} (which is always set) is used instead. + + @cindex @code{SHELL}, MS-DOS specifics + The processing of lines that set the variable @code{SHELL} in Makefiles + is different on MS-DOS. The stock shell, @file{command.com}, is + ridiculously limited in its functionality and many users of @code{make} + tend to install a replacement shell. Therefore, on MS-DOS, @code{make} + examines the value of @code{SHELL}, and changes its behavior based on + whether it points to a Unix-style or DOS-style shell. This allows + reasonable functionality even if @code{SHELL} points to + @file{command.com}. + + If @code{SHELL} points to a Unix-style shell, @code{make} on MS-DOS + additionally checks whether that shell can indeed be found; if not, it + ignores the line that sets @code{SHELL}. In MS-DOS, GNU @code{make} + searches for the shell in the following places: + + @enumerate + @item + In the precise place pointed to by the value of @code{SHELL}. For + example, if the makefile specifies @samp{SHELL = /bin/sh}, @code{make} + will look in the directory @file{/bin} on the current drive. + + @item + In the current directory. + + @item + In each of the directories in the @code{PATH} variable, in order. + + @end enumerate + + In every directory it examines, @code{make} will first look for the + specific file (@file{sh} in the example above). If this is not found, + it will also look in that directory for that file with one of the known + extensions which identify executable files. For example @file{.exe}, + @file{.com}, @file{.bat}, @file{.btm}, @file{.sh}, and some others. + + If any of these attempts is successful, the value of @code{SHELL} will + be set to the full pathname of the shell as found. However, if none of + these is found, the value of @code{SHELL} will not be changed, and thus + the line that sets it will be effectively ignored. This is so + @code{make} will only support features specific to a Unix-style shell if + such a shell is actually installed on the system where @code{make} runs. + + Note that this extended search for the shell is limited to the cases + where @code{SHELL} is set from the Makefile; if it is set in the + environment or command line, you are expected to set it to the full + pathname of the shell, exactly as things are on Unix. + + The effect of the above DOS-specific processing is that a Makefile that + says @samp{SHELL = /bin/sh} (as many Unix makefiles do), will work + on MS-DOS unaltered if you have e.g. @file{sh.exe} installed in some + directory along your @code{PATH}. + @cindex environment, @code{SHELL} in Unlike most variables, the variable @code{SHELL} is never set from the environment. This is because the @code{SHELL} environment variable is used to specify your personal choice of shell program for interactive ! use. It would be very bad for personal choices like this to affect the ! functioning of makefiles. @xref{Environment, ,Variables from the ! Environment}. However, on MS-DOS and MS-Windows the value of ! @code{SHELL} in the environment @strong{is} used, since on those systems ! most users do not set this variable, and therefore it is most likely set ! specifically to be used by @code{make}. On MS-DOS, if the setting of ! @code{SHELL} is not suitable for @code{make}, you can set the variable ! @code{MAKESHELL} to the shell that @code{make} should use; this will ! override the value of @code{SHELL}. @node Parallel, Errors, Execution, Commands @section Parallel Execution *************** *** 2817,2822 **** --- 2992,3000 ---- @samp{--jobs} option tells @code{make} to execute many commands simultaneously.@refill + On MS-DOS, the @samp{-j} option has no effect, since that system doesn't + support multi-processing. + If the @samp{-j} option is followed by an integer, this is the number of commands to execute at once; this is called the number of @dfn{job slots}. If there is nothing looking like an integer after the @samp{-j} option, *************** *** 3033,3039 **** @example subsystem: ! cd subdir; $(MAKE) @end example @noindent --- 3211,3217 ---- @example subsystem: ! cd subdir && $(MAKE) @end example @noindent *************** *** 3069,3081 **** @example @group subsystem: ! cd subdir; $(MAKE) @end group @end example The value of this variable is the file name with which @code{make} was invoked. If this file name was @file{/bin/make}, then the command executed ! is @samp{cd subdir; /bin/make}. If you use a special version of @code{make} to run the top-level makefile, the same special version will be executed for recursive invocations. @cindex @code{cd} (shell command) --- 3247,3259 ---- @example @group subsystem: ! cd subdir && $(MAKE) @end group @end example The value of this variable is the file name with which @code{make} was invoked. If this file name was @file{/bin/make}, then the command executed ! is @samp{cd subdir && /bin/make}. If you use a special version of @code{make} to run the top-level makefile, the same special version will be executed for recursive invocations. @cindex @code{cd} (shell command) *************** *** 3092,3098 **** any commands; see @ref{Instead of Execution}.) Following the usual definition of @samp{-t}, a @samp{make -t} command in the example would create a file named @file{subsystem} and do nothing else. What you ! really want it to do is run @samp{@w{cd subdir;} @w{make -t}}; but that would require executing the command, and @samp{-t} says not to execute commands.@refill @cindex @code{-t}, and recursion --- 3270,3276 ---- any commands; see @ref{Instead of Execution}.) Following the usual definition of @samp{-t}, a @samp{make -t} command in the example would create a file named @file{subsystem} and do nothing else. What you ! really want it to do is run @samp{@w{cd subdir &&} @w{make -t}}; but that would require executing the command, and @samp{-t} says not to execute commands.@refill @cindex @code{-t}, and recursion *************** *** 3343,3349 **** @example subsystem: ! cd subdir; $(MAKE) MAKEFLAGS= @end example @vindex MAKEOVERRIDES --- 3521,3527 ---- @example subsystem: ! cd subdir && $(MAKE) MAKEFLAGS= @end example @vindex MAKEOVERRIDES *************** *** 3382,3388 **** @example subsystem: ! cd subdir; $(MAKE) $(MFLAGS) @end example @noindent --- 3560,3566 ---- @example subsystem: ! cd subdir && $(MAKE) $(MFLAGS) @end example @noindent *************** *** 4508,4514 **** which is normally present in the environment to specify the user's choice of interactive shell. It would be very undesirable for this choice to affect @code{make}. So @code{make} ignores the environment value of ! @code{SHELL}.@refill @node Conditionals, Functions, Using Variables, Top @chapter Conditional Parts of Makefiles --- 4686,4694 ---- which is normally present in the environment to specify the user's choice of interactive shell. It would be very undesirable for this choice to affect @code{make}. So @code{make} ignores the environment value of ! @code{SHELL} (except on MS-DOS and MS-Windows, where @code{SHELL} is ! usually not set. @xref{Execution, ,Special handling of SHELL on ! MS-DOS}.)@refill @node Conditionals, Functions, Using Variables, Top @chapter Conditional Parts of Makefiles *************** *** 4805,4811 **** @menu * Syntax of Functions:: How to write a function call. * Text Functions:: General-purpose text manipulation functions. ! * Filename Functions:: Functions for manipulating file names. * Foreach Function:: Repeat some text with controlled variation. * Origin Function:: Find where a variable got its value. * Shell Function:: Substitute the output of a shell command. --- 4985,4991 ---- @menu * Syntax of Functions:: How to write a function call. * Text Functions:: General-purpose text manipulation functions. ! * File Name Functions:: Functions for manipulating file names. * Foreach Function:: Repeat some text with controlled variation. * Origin Function:: Find where a variable got its value. * Shell Function:: Substitute the output of a shell command. *************** *** 4874,4880 **** Here the @code{subst} function replaces each space with a comma, through the value of @code{foo}, and substitutes the result. ! @node Text Functions, Filename Functions, Syntax of Functions, Functions @section Functions for String Substitution and Analysis @cindex functions, for text --- 5054,5060 ---- Here the @code{subst} function replaces each space with a comma, through the value of @code{foo}, and substitutes the result. ! @node Text Functions, File Name Functions, Syntax of Functions, Functions @section Functions for String Substitution and Analysis @cindex functions, for text *************** *** 5138,5144 **** @code{CFLAGS} was specified with a command argument (@pxref{Override Directive, , The @code{override} Directive}). ! @node Filename Functions, Foreach Function, Text Functions, Functions @section Functions for File Names @cindex functions, for file names @cindex file name functions --- 5318,5324 ---- @code{CFLAGS} was specified with a command argument (@pxref{Override Directive, , The @code{override} Directive}). ! @node File Name Functions, Foreach Function, Text Functions, Functions @section Functions for File Names @cindex functions, for file names @cindex file name functions *************** *** 5205,5215 **** For example, @example ! $(suffix src/foo.c hacks) @end example @noindent ! produces the result @samp{.c}. @item $(basename @var{names}@dots{}) @findex basename --- 5385,5395 ---- For example, @example ! $(suffix src/foo.c src-1.0/bar.c hacks) @end example @noindent ! produces the result @samp{.c .c}. @item $(basename @var{names}@dots{}) @findex basename *************** *** 5217,5231 **** @cindex file name, basename of Extracts all but the suffix of each file name in @var{names}. If the file name contains a period, the basename is everything starting up to ! (and not including) the last period. Otherwise, the basename is the ! entire file name. For example, @example ! $(basename src/foo.c hacks) @end example @noindent ! produces the result @samp{src/foo hacks}. @c plural convention with dots (be consistent) @item $(addsuffix @var{suffix},@var{names}@dots{}) --- 5397,5412 ---- @cindex file name, basename of Extracts all but the suffix of each file name in @var{names}. If the file name contains a period, the basename is everything starting up to ! (and not including) the last period. Periods in the directory part are ! ignored. If there is no period, the basename is the entire file name. ! For example, @example ! $(basename src/foo.c src-1.0/bar hacks) @end example @noindent ! produces the result @samp{src/foo src-1.0/bar hacks}. @c plural convention with dots (be consistent) @item $(addsuffix @var{suffix},@var{names}@dots{}) *************** *** 5284,5291 **** @item $(word @var{n},@var{text}) @findex word ! @cindex words, selecting ! @cindex selecting words Returns the @var{n}th word of @var{text}. The legitimate values of @var{n} start from 1. If @var{n} is bigger than the number of words in @var{text}, the value is empty. For example, --- 5465,5472 ---- @item $(word @var{n},@var{text}) @findex word ! @cindex word, selecting a ! @cindex selecting a word Returns the @var{n}th word of @var{text}. The legitimate values of @var{n} start from 1. If @var{n} is bigger than the number of words in @var{text}, the value is empty. For example, *************** *** 5297,5302 **** --- 5478,5502 ---- @noindent returns @samp{bar}. + @item $(wordlist @var{s},@var{e},@var{text}) + @findex wordlist + @cindex words, selecting lists of + @cindex selecting word lists + Returns the list of words in @var{text} starting with word @var{s} and + ending with word @var{e} (inclusive). The legitimate values of @var{s} + and @var{e} start from 1. If @var{s} is bigger than the number of words + in @var{text}, the value is empty. If @var{e} is bigger than the number + of words in @var{text}, words up to the end of @var{text} are returned. + If @var{s} is greater than @var{e}, @code{make} swaps them for you. For + example, + + @example + $(wordlist 2, 3, foo bar baz) + @end example + + @noindent + returns @samp{bar baz}. + @c Following item phrased to prevent overfull hbox. --RJC 17 Jul 92 @item $(words @var{text}) @findex words *************** *** 5333,5339 **** @xref{Wildcards, ,Using Wildcard Characters in File Names}. @end table ! @node Foreach Function, Origin Function, Filename Functions, Functions @section The @code{foreach} Function @findex foreach @cindex words, iterating over --- 5533,5539 ---- @xref{Wildcards, ,Using Wildcard Characters in File Names}. @end table ! @node Foreach Function, Origin Function, File Name Functions, Functions @section The @code{foreach} Function @findex foreach @cindex words, iterating over *************** *** 5546,5553 **** (@samp{`}) perform in most shells: it does @dfn{command expansion}. This means that it takes an argument that is a shell command and returns the output of the command. The only processing @code{make} does on the result, ! before substituting it into the surrounding text, is to convert newlines to ! spaces.@refill The commands run by calls to the @code{shell} function are run when the function calls are expanded. In most cases, this is when the makefile is --- 5746,5755 ---- (@samp{`}) perform in most shells: it does @dfn{command expansion}. This means that it takes an argument that is a shell command and returns the output of the command. The only processing @code{make} does on the result, ! before substituting it into the surrounding text, is to convert each ! newline or carriage-return / newline pair to a single space. It also ! removes the trailing (carriage-return and) newline, if it's the last ! thing in the result.@refill The commands run by calls to the @code{shell} function are run when the function calls are expanded. In most cases, this is when the makefile is *************** *** 5662,5667 **** --- 5864,5891 ---- targets not in the makefile may be specified, if @code{make} can find implicit rules that say how to make them. + @cindex @code{MAKECMDGOALS} + @vindex MAKECMDGOALS + @code{Make} will set the special variable @code{MAKECMDGOALS} to the + list of goals you specified on the command line. If no goals were given + on the command line, this variable is empty. Note that this variable + should be used only in special circumstances. + + An example of appropriate use is to avoid including @file{.d} files + during @code{clean} rules (@pxref{Automatic Dependencies}), so + @code{make} won't create them only to immediately remove them + again:@refill + + @example + @group + sources = foo.c bar.c + + ifneq ($(MAKECMDGOALS),clean) + include $(sources:.c=.d) + endif + @end group + @end example + One use of specifying a goal is if you want to compile only a part of the program, or only one of several programs. Specify as a goal each file that you wish to remake. For example, consider a directory containing *************** *** 6095,6100 **** --- 6319,6325 ---- there is more than one @samp{-j} option, the last one is effective. @xref{Parallel, ,Parallel Execution}, for more information on how commands are run. + Note that this option is ignored on MS-DOS. @item -k @cindex @code{-k} *************** *** 6312,6318 **** * Last Resort:: How to defining commands for rules which cannot find any. * Suffix Rules:: The old-fashioned style of implicit rule. ! * Search Algorithm:: The precise algorithm for applying implicit rules. @end menu --- 6537,6543 ---- * Last Resort:: How to defining commands for rules which cannot find any. * Suffix Rules:: The old-fashioned style of implicit rule. ! * Implicit Rule Search:: The precise algorithm for applying implicit rules. @end menu *************** *** 6370,6376 **** In general, @code{make} searches for an implicit rule for each target, and for each double-colon rule, that has no commands. A file that is mentioned only as a dependency is considered a target whose rule specifies nothing, ! so implicit rule search happens for it. @xref{Search Algorithm, ,Implicit Rule Search Algorithm}, for the details of how the search is done. Note that explicit dependencies do not influence implicit rule search. --- 6595,6601 ---- In general, @code{make} searches for an implicit rule for each target, and for each double-colon rule, that has no commands. A file that is mentioned only as a dependency is considered a target whose rule specifies nothing, ! so implicit rule search happens for it. @xref{Implicit Rule Search, ,Implicit Rule Search Algorithm}, for the details of how the search is done. Note that explicit dependencies do not influence implicit rule search. *************** *** 7253,7259 **** within the directory. The variant variables' names are formed by appending @samp{D} or @samp{F}, respectively. These variants are semi-obsolete in GNU @code{make} since the functions @code{dir} and ! @code{notdir} can be used to get a similar effect (@pxref{Filename Functions, , Functions for File Names}). Note, however, that the @samp{F} variants all omit the trailing slash which always appears in the output of the @code{dir} function. Here is a table of the variants: --- 7478,7484 ---- within the directory. The variant variables' names are formed by appending @samp{D} or @samp{F}, respectively. These variants are semi-obsolete in GNU @code{make} since the functions @code{dir} and ! @code{notdir} can be used to get a similar effect (@pxref{File Name Functions, , Functions for File Names}). Note, however, that the @samp{F} variants all omit the trailing slash which always appears in the output of the @code{dir} function. Here is a table of the variants: *************** *** 7508,7514 **** You can use a last-resort rule to override part of another makefile. @xref{Overriding Makefiles, , Overriding Part of Another Makefile}. ! @node Suffix Rules, Search Algorithm, Last Resort, Implicit Rules @section Old-Fashioned Suffix Rules @cindex old-fashioned suffix rules @cindex suffix rule --- 7733,7739 ---- You can use a last-resort rule to override part of another makefile. @xref{Overriding Makefiles, , Overriding Part of Another Makefile}. ! @node Suffix Rules, Implicit Rule Search, Last Resort, Implicit Rules @section Old-Fashioned Suffix Rules @cindex old-fashioned suffix rules @cindex suffix rule *************** *** 7610,7616 **** with a rule for the special target @code{.SUFFIXES}, but that does not alter this variable. ! @node Search Algorithm, , Suffix Rules, Implicit Rules @section Implicit Rule Search Algorithm @cindex implicit rule, search algorithm @cindex search algorithm, implicit rule --- 7835,7841 ---- with a rule for the special target @code{.SUFFIXES}, but that does not alter this variable. ! @node Implicit Rule Search, , Suffix Rules, Implicit Rules @section Implicit Rule Search Algorithm @cindex implicit rule, search algorithm @cindex search algorithm, implicit rule *************** *** 8160,8165 **** --- 8385,8394 ---- variable @code{MAKELEVEL}. @xref{Recursion, ,Recursive Use of @code{make}}. @item + Provide any goals given on the command line in the variable + @code{MAKECMDGOALS}. @xref{Goals, ,Arguments to Specify the Goals}. + + @item Specify static pattern rules. @xref{Static Pattern, ,Static Pattern Rules}. @item *************** *** 8423,8465 **** @item $(dir @var{names}@dots{}) Extract the directory part of each file name.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(notdir @var{names}@dots{}) Extract the non-directory part of each file name.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(suffix @var{names}@dots{}) Extract the suffix (the last @samp{.} and following characters) of each file name.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(basename @var{names}@dots{}) Extract the base name (name without suffix) of each file name.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(addsuffix @var{suffix},@var{names}@dots{}) Append @var{suffix} to each word in @var{names}.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(addprefix @var{prefix},@var{names}@dots{}) Prepend @var{prefix} to each word in @var{names}.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(join @var{list1},@var{list2}) Join two parallel lists of words.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(word @var{n},@var{text}) Extract the @var{n}th word (one-origin) of @var{text}.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(words @var{text}) Count the number of words in @var{text}.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(firstword @var{names}@dots{}) Extract the first word of @var{names}.@* ! @xref{Filename Functions, ,Functions for File Names}. @item $(wildcard @var{pattern}@dots{}) Find file names matching a shell file name pattern (@emph{not} a --- 8652,8694 ---- @item $(dir @var{names}@dots{}) Extract the directory part of each file name.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(notdir @var{names}@dots{}) Extract the non-directory part of each file name.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(suffix @var{names}@dots{}) Extract the suffix (the last @samp{.} and following characters) of each file name.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(basename @var{names}@dots{}) Extract the base name (name without suffix) of each file name.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(addsuffix @var{suffix},@var{names}@dots{}) Append @var{suffix} to each word in @var{names}.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(addprefix @var{prefix},@var{names}@dots{}) Prepend @var{prefix} to each word in @var{names}.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(join @var{list1},@var{list2}) Join two parallel lists of words.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(word @var{n},@var{text}) Extract the @var{n}th word (one-origin) of @var{text}.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(words @var{text}) Count the number of words in @var{text}.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(firstword @var{names}@dots{}) Extract the first word of @var{names}.@* ! @xref{File Name Functions, ,Functions for File Names}. @item $(wildcard @var{pattern}@dots{}) Find file names matching a shell file name pattern (@emph{not} a *************** *** 8563,8568 **** --- 8792,8803 ---- You can set @code{SHELL} in the makefile to change the shell used to run commands. @xref{Execution, ,Command Execution}. + @item MAKESHELL + + On MS-DOS only, the name of the command interpreter that is to be used + by @code{make}. This value takes precedence over the value of + @code{SHELL}. @xref{Execution, ,MAKESHELL variable}. + @item MAKE The name with which @code{make} was invoked. *************** *** 8579,8584 **** --- 8814,8825 ---- The flags given to @code{make}. You can set this in the environment or a makefile to set flags.@* @xref{Options/Recursion, ,Communicating Options to a Sub-@code{make}}. + + @item MAKECMDGOALS + + The targets given to @code{make} on the command line. Setting this + variable has no effect on the operation of @code{make}.@* + @xref{Goals, ,Arguments to Specify the Goals}. @item SUFFIXES Only in ../make-3.75: make.toc Only in ../make-3.75: make.tp Only in ../make-3.75: make.vr diff -crP ../make-3.75/makefile.com ./makefile.com *** ../make-3.75/makefile.com Sat Jun 22 15:26:57 1996 --- ./makefile.com Wed Aug 27 16:31:21 1997 *************** *** 5,11 **** $! of the shareable executable $! $ def/nolog sys sys$library: ! $ filelist = "alloca commands default dir expand file function implicit job main misc read remake remote-stub rule signame variable version vmsfunctions vmsify vpath [.glob]glob [.glob]fnmatch getopt getopt1" $ copy config.h-vms config.h $ n=0 $ loop: --- 5,11 ---- $! of the shareable executable $! $ def/nolog sys sys$library: ! $ filelist = "alloca ar arscan commands default dir expand file function implicit job main misc read remake remote-stub rule signame variable version vmsfunctions vmsify vpath [.glob]glob [.glob]fnmatch getopt getopt1" $ copy config.h-vms config.h $ n=0 $ loop: *************** *** 17,34 **** $ goto loop $ linkit: $ if p1 .nes. "" then goto link_using_library ! $ link/exe=make alloca,commands,default,dir,expand,file,function,- implicit,job,main,misc,read,remake,remote-stub,rule,- signame,variable,version,vmsfunctions,vmsify,vpath,- glob,fnmatch,getopt,getopt1 $ exit $ link_using_library: ! $ link/exe=make alloca,commands,default,dir,expand,file,function,- implicit,job,main,misc,read,remake,remote-stub,rule,- signame,variable,version,vmsfunctions,vmsify,vpath,- glob,fnmatch,getopt,getopt1,sys$library:vaxcrtl/lib $! $ compileit : subroutine ! $ cc/include=([],[.glob])/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS","NO_ARCHIVES") 'p1' $ exit $ endsubroutine : compileit --- 17,34 ---- $ goto loop $ linkit: $ if p1 .nes. "" then goto link_using_library ! $ link/exe=make alloca,ar,arscan,commands,default,dir,expand,file,function,- implicit,job,main,misc,read,remake,remote-stub,rule,- signame,variable,version,vmsfunctions,vmsify,vpath,- glob,fnmatch,getopt,getopt1 $ exit $ link_using_library: ! $ link/exe=make alloca,ar,arscan,commands,default,dir,expand,file,function,- implicit,job,main,misc,read,remake,remote-stub,rule,- signame,variable,version,vmsfunctions,vmsify,vpath,- glob,fnmatch,getopt,getopt1,sys$library:vaxcrtl/lib $! $ compileit : subroutine ! $ cc/include=([],[.glob])/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") 'p1' $ exit $ endsubroutine : compileit diff -crP ../make-3.75/makefile.vms ./makefile.vms *** ../make-3.75/makefile.vms Sat Jul 20 07:06:41 1996 --- ./makefile.vms Wed Aug 27 16:31:22 1997 *************** *** 1,4 **** ! # Copyright (C) 1988, 1989, 1996 Free Software Foundation, Inc. # This file is part of GNU Make. # # VMS extensions from GNU Make 3.60 imported by --- 1,4 ---- ! # Copyright (C) 1988, 1989, 1996, 1997 Free Software Foundation, Inc. # This file is part of GNU Make. # # VMS extensions from GNU Make 3.60 imported by *************** *** 31,43 **** #LDFLAGS = /deb LDFLAGS = ! defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","NO_ARCHIVES","allocated_variable_expand_for_file=alloc_var_expand_for_file") LOAD_AVG = /define="NO_LDAV" # If you don't want archive support, comment these out. ! #ARCHIVES = ,ar.obj,arscan.obj ! #ARCHIVES_SRC = ar.c arscan.c # If your system needs extra libraries loaded in, define them here. # System V probably need -lPW for alloca. --- 31,43 ---- #LDFLAGS = /deb LDFLAGS = ! defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","allocated_variable_expand_for_file=alloc_var_expand_for_file") LOAD_AVG = /define="NO_LDAV" # If you don't want archive support, comment these out. ! ARCHIVES = ,ar.obj,arscan.obj ! ARCHIVES_SRC = ar.c arscan.c # If your system needs extra libraries loaded in, define them here. # System V probably need -lPW for alloca. diff -crP ../make-3.75/misc.c ./misc.c *** ../make-3.75/misc.c Sat Jun 22 15:26:58 1996 --- ./misc.c Wed Aug 27 16:31:23 1997 *************** *** 1,5 **** /* Miscellaneous generic support functions for GNU Make. ! Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Miscellaneous generic support functions for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 397,403 **** return s; } ! #ifdef WIN32 /* * Same as end_of_token, but take into account a stop character */ --- 397,403 ---- return s; } ! #ifdef WINDOWS32 /* * Same as end_of_token, but take into account a stop character */ diff -crP ../make-3.75/missing ./missing *** ../make-3.75/missing Wed Dec 31 19:00:00 1969 --- ./missing Wed Aug 13 02:55:38 1997 *************** *** 0 **** --- 1,134 ---- + #! /bin/sh + # Common stub for a few missing GNU programs while installing. + # Copyright (C) 1996, 1997 Free Software Foundation, Inc. + # Franc,ois Pinard , 1996. + + # This program 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, or (at your option) + # any later version. + + # This program 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. + + if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + fi + + case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ + $0 [OPTION]... PROGRAM [ARGUMENT]... + + Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an + error status if there is no known handling for PROGRAM. + + Options: + -h, --help display this help and exit + -v, --version output version information and exit + + Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison touch file \`y.tab.c' + makeinfo touch the output file + yacc touch file \`y.tab.c'" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + touch config.h.in + ;; + + automake) + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print \ + | sed 's/^\(.*\).am$/touch \1.in/' \ + | sh + ;; + + bison|yacc) + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + touch y.tab.c + ;; + + makeinfo) + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + *) + echo 1>&2 "\ + WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; + esac + + exit 0 diff -crP ../make-3.75/read.c ./read.c *** ../make-3.75/read.c Sun Jul 14 12:30:16 1996 --- ./read.c Wed Aug 27 16:31:24 1997 *************** *** 1,5 **** /* Reading and parsing of makefiles for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Reading and parsing of makefiles for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 30,36 **** #include "glob/glob.h" #endif ! #ifndef WIN32 #ifndef _AMIGA #ifndef VMS #include --- 30,36 ---- #include "glob/glob.h" #endif ! #ifndef WINDOWS32 #ifndef _AMIGA #ifndef VMS #include *************** *** 38,44 **** struct passwd *getpwnam PARAMS ((char *name)); #endif #endif ! #endif /* !WIN32 */ /* A `struct linebuffer' is a structure which holds a line of text. `readline' reads a line from a stream into a linebuffer --- 38,44 ---- struct passwd *getpwnam PARAMS ((char *name)); #endif #endif ! #endif /* !WINDOWS32 */ /* A `struct linebuffer' is a structure which holds a line of text. `readline' reads a line from a stream into a linebuffer *************** *** 81,87 **** static char *default_include_directories[] = { ! #if defined(WIN32) && !defined(INCLUDEDIR) /* * This completly up to the user when they install MSVC or other packages. * This is defined as a placeholder. --- 81,87 ---- static char *default_include_directories[] = { ! #if defined(WINDOWS32) && !defined(INCLUDEDIR) /* * This completly up to the user when they install MSVC or other packages. * This is defined as a placeholder. *************** *** 271,276 **** --- 271,277 ---- unsigned int commands_started; register char *p; char *p2; + int len; int ignoring = 0, in_ignored_define = 0; int no_targets = 0; /* Set when reading a rule without targets. */ char *passed_filename = filename; *************** *** 283,289 **** char *pattern = 0, *pattern_percent; int makefile_errno; ! #ifdef WIN32 int check_again; #endif --- 284,290 ---- char *pattern = 0, *pattern_percent; int makefile_errno; ! #if defined (WINDOWS32) || defined (__MSDOS__) int check_again; #endif *************** *** 302,309 **** #ifdef lint /* Suppress `used before set' messages. */ two_colon = 0; - pattern_percent = 0; #endif if (debug_flag) { --- 303,311 ---- #ifdef lint /* Suppress `used before set' messages. */ two_colon = 0; #endif + pattern_percent = 0; + commands_started = lineno; if (debug_flag) { *************** *** 452,459 **** remove_comments (collapsed); /* strncmp is first to avoid dereferencing out into space. */ ! #define word1eq(s, l) (!strncmp (s, p, l) \ ! && (p[l] == '\0' || isblank (p[l]))) p = collapsed; while (isspace (*p)) ++p; --- 454,460 ---- remove_comments (collapsed); /* strncmp is first to avoid dereferencing out into space. */ ! #define word1eq(s, l) (len == l && !strncmp (s, p, l)) p = collapsed; while (isspace (*p)) ++p; *************** *** 461,466 **** --- 462,482 ---- /* This line is completely empty. */ continue; + /* Find the end of the first token */ + for (p2 = p+1; *p2 != '\0' && !isspace(*p2); ++p2) + {} + len = p2 - p; + + /* Find the start of the second token. If it's a `:', jump past + preprocessor stuff since it can't be that--this allows targets named + `export', etc. */ + while (isspace (*p2)) + ++p2; + if (*p2 == '\0') + p2 = NULL; + else if (p2[0] == ':' && p2[1] == '\0') + goto check_var; + /* We must first check for conditional and `define' directives before ignoring anything, since they control what we will do with following lines. */ *************** *** 578,584 **** v->export = v_noexport; } } ! else if (word1eq ("include", 7) || word1eq ("-include", 8) || word1eq ("sinclude", 8)) { /* We have found an `include' line specifying a nested --- 594,622 ---- v->export = v_noexport; } } ! else if (word1eq ("vpath", 5)) ! { ! char *pattern; ! unsigned int len; ! p2 = variable_expand (p + 5); ! p = find_next_token (&p2, &len); ! if (p != 0) ! { ! pattern = savestring (p, len); ! p = find_next_token (&p2, &len); ! /* No searchpath means remove all previous ! selective VPATH's with the same pattern. */ ! } ! else ! /* No pattern means remove all previous selective VPATH's. */ ! pattern = 0; ! construct_vpath_list (pattern, p); ! if (pattern != 0) ! free (pattern); ! } ! else ! check_var: ! if (word1eq ("include", 7) || word1eq ("-include", 8) || word1eq ("sinclude", 8)) { /* We have found an `include' line specifying a nested *************** *** 642,667 **** reading_filename = filename; reading_lineno_ptr = &lineno; } - else if (word1eq ("vpath", 5)) - { - char *pattern; - unsigned int len; - p2 = variable_expand (p + 5); - p = find_next_token (&p2, &len); - if (p != 0) - { - pattern = savestring (p, len); - p = find_next_token (&p2, &len); - /* No searchpath means remove all previous - selective VPATH's with the same pattern. */ - } - else - /* No pattern means remove all previous selective VPATH's. */ - pattern = 0; - construct_vpath_list (pattern, p); - if (pattern != 0) - free (pattern); - } #undef word1eq else if (try_variable_definition (filename, lineno, p, o_file)) /* This line has been dealt with. */ --- 680,685 ---- *************** *** 764,774 **** else break; } - #ifdef __MSDOS__ - /* For MS-DOS, skip a "C:\...". */ - if (p != 0 && p[1] == '\\' && isalpha (p[-1])) - p = 0; - #endif #ifdef _AMIGA /* Here, the situation is quite complicated. Let's have a look at a couple of targets: --- 782,787 ---- *************** *** 785,794 **** if (p && !(isspace(p[1]) || !p[1] || isspace(p[-1]))) p = 0; #endif ! #ifdef WIN32 do { check_again = 0; ! /* For WIN32, skip a "C:\..." or a "C:/..." */ if (p != 0 && (p[1] == '\\' || p[1] == '/') && isalpha (p[-1])) { p = index(p + 1, ':'); check_again = 1; --- 798,807 ---- if (p && !(isspace(p[1]) || !p[1] || isspace(p[-1]))) p = 0; #endif ! #if defined (WINDOWS32) || defined (__MSDOS__) do { check_again = 0; ! /* For MSDOS and WINDOWS32, skip a "C:\..." or a "C:/..." */ if (p != 0 && (p[1] == '\\' || p[1] == '/') && isalpha (p[-1])) { p = index(p + 1, ':'); check_again = 1; *************** *** 894,906 **** initbuffer (&lb); while (!feof (infile)) { lineno += nlines; nlines = readline (&lb, infile, filename, lineno); collapse_continuations (lb.buffer); p = next_token (lb.buffer); ! if ((p[5] == '\0' || isblank (p[5])) && !strncmp (p, "endef", 5)) { p += 5; remove_comments (p); --- 907,923 ---- initbuffer (&lb); while (!feof (infile)) { + unsigned int len; + lineno += nlines; nlines = readline (&lb, infile, filename, lineno); collapse_continuations (lb.buffer); p = next_token (lb.buffer); ! len = strlen (p); ! if ((len == 5 || (len > 5 && isblank (p[5]))) ! && !strncmp (p, "endef", 5)) { p += 5; remove_comments (p); *************** *** 915,926 **** (void) define_variable (var, strlen (var), definition, origin, 1); free (definition); freebuffer (&lb); ! return lineno; } else { ! unsigned int len = strlen (lb.buffer); ! /* Increase the buffer size if necessary. */ if (idx + len + 1 > length) { --- 932,942 ---- (void) define_variable (var, strlen (var), definition, origin, 1); free (definition); freebuffer (&lb); ! return (lineno + nlines); } else { ! len = strlen (lb.buffer); /* Increase the buffer size if necessary. */ if (idx + len + 1 > length) { *************** *** 1462,1468 **** /* See if this is first target seen whose name does not start with a `.', unless it contains a slash. */ if (default_goal_file == 0 && set_default ! && (*name != '.' || index (name, '/') != 0)) { int reject = 0; --- 1478,1488 ---- /* See if this is first target seen whose name does not start with a `.', unless it contains a slash. */ if (default_goal_file == 0 && set_default ! && (*name != '.' || index (name, '/') != 0 ! #ifdef __MSDOS__ ! || index (name, '\\') != 0 ! #endif ! )) { int reject = 0; *************** *** 1622,1630 **** *p =' '; #endif #ifdef __MSDOS__ ! /* For MS-DOS, skip a "C:\...". */ ! if (stopchar == ':' && p != 0 && p[1] == '\\' && isalpha (p[-1])) ! p = 0; #endif #ifdef _AMIGA if (stopchar == ':' && p && *p == ':' && --- 1642,1652 ---- *p =' '; #endif #ifdef __MSDOS__ ! /* For MS-DOS, skip a "C:\..." or a "C:/..." until we find a ! first colon which isn't followed by a slash or a backslash. */ ! if (stopchar == ':') ! while (p != 0 && (p[1] == '\\' || p[1] == '/') && isalpha (p[-1])) ! p = find_char_unquote (p + 1, stopchars, 1); #endif #ifdef _AMIGA if (stopchar == ':' && p && *p == ':' && *************** *** 1633,1640 **** p = find_char_unquote (p+1, stopchars, 1); } #endif ! #ifdef WIN32 ! /* For WIN32, skip a "C:\..." or "C:/...". */ if (stopchar == ':' && p != 0 && (p[1] == '\\' || p[1] == '/') && --- 1655,1662 ---- p = find_char_unquote (p+1, stopchars, 1); } #endif ! #ifdef WINDOWS32 ! /* For WINDOWS32, skip a "C:\..." or "C:/...". */ if (stopchar == ':' && p != 0 && (p[1] == '\\' || p[1] == '/') && *************** *** 1943,1948 **** --- 1965,1974 ---- register char **dirs = (char **) xmalloc ((5 + defsize) * sizeof (char *)); register unsigned int idx = 0; + #ifdef __MSDOS__ + defsize++; + #endif + /* First consider any dirs specified with -I switches. Ignore dirs that don't exist. */ *************** *** 1974,1979 **** --- 2000,2021 ---- /* Now add at the end the standard default dirs. */ + #ifdef __MSDOS__ + { + /* The environment variable $DJDIR holds the root of the + DJGPP directory tree; add ${DJDIR}/include. */ + struct variable *djdir = lookup_variable ("DJDIR", 5); + + if (djdir) + { + char *defdir = (char *) xmalloc (strlen (djdir->value) + 8 + 1); + + strcat (strcpy (defdir, djdir->value), "/include"); + dirs[idx++] = defdir; + } + } + #endif + for (i = 0; default_include_directories[i] != 0; ++i) if (stat (default_include_directories[i], &stbuf) == 0 && S_ISDIR (stbuf.st_mode)) *************** *** 2029,2035 **** free (home_dir); home_dir = getenv ("HOME"); } ! #if !defined(_AMIGA) && !defined(WIN32) if (home_dir == 0 || home_dir[0] == '\0') { extern char *getlogin (); --- 2071,2077 ---- free (home_dir); home_dir = getenv ("HOME"); } ! #if !defined(_AMIGA) && !defined(WINDOWS32) if (home_dir == 0 || home_dir[0] == '\0') { extern char *getlogin (); *************** *** 2042,2048 **** home_dir = p->pw_dir; } } ! #endif /* !AMIGA && !WIN32 */ if (home_dir != 0) { char *new = concat (home_dir, "", name + 1); --- 2084,2090 ---- home_dir = p->pw_dir; } } ! #endif /* !AMIGA && !WINDOWS32 */ if (home_dir != 0) { char *new = concat (home_dir, "", name + 1); *************** *** 2051,2057 **** return new; } } ! #if !defined(_AMIGA) && !defined(WIN32) else { struct passwd *pwent; --- 2093,2099 ---- return new; } } ! #if !defined(_AMIGA) && !defined(WINDOWS32) else { struct passwd *pwent; *************** *** 2069,2075 **** else if (userend != 0) *userend = '/'; } ! #endif /* !AMIGA && !WIN32 */ #endif /* !VMS */ return 0; } --- 2111,2117 ---- else if (userend != 0) *userend = '/'; } ! #endif /* !AMIGA && !WINDOWS32 */ #endif /* !VMS */ return 0; } diff -crP ../make-3.75/readme.vms ./readme.vms *** ../make-3.75/readme.vms Sat Jul 20 07:06:42 1996 --- ./readme.vms Tue Sep 16 10:17:36 1997 *************** *** 1,21 **** ! This is the VMS port of GNU Make version 3.75. It is based on the VMS port of GNU Make 3.60 by Mike Moretti. ! This port was done by Klaus Kämpf (kkaempf@progis.de) of ! proGIS Software, Aachen, Germany To build Make, simply type @makefile. This should compile all the ! necessary files and link Make. ! There is also a file called makefile.vms. If you already have GNU ! Make 3.74 built you can just use Make with this makefile to rebuild. Here are some notes about GNU Make for VMS: - Libraries are not supported. They were in GNU Make 3.60 but somehow I didn't - care porting the code. If there is enough interest, I'll do it at some - later time. - The variable $^ separates files with commas instead of spaces (It's the natural thing to do for VMS). --- 1,17 ---- ! This is the VMS port of GNU Make. It is based on the VMS port of GNU Make 3.60 by Mike Moretti. ! This port was done by Klaus Kämpf of ! proGIS Software, Aachen, Germany. To build Make, simply type @makefile. This should compile all the ! necessary files and link Make. There is also a file called ! makefile.vms. If you already have GNU Make built you can just use ! Make with this makefile to rebuild. Here are some notes about GNU Make for VMS: The variable $^ separates files with commas instead of spaces (It's the natural thing to do for VMS). *************** *** 40,47 **** You can use a : in a filename only if you preceed it with a backslash ('\'). E.g.- hobbes\:[bogas.files] - - None of the stuff in vpath.c has been implemented yet. Make ignores success, informational, or warning errors (-S-, -I-, or -W-). But it will stop on -E- and -F- errors. (unless you do something to override --- 36,41 ---- diff -crP ../make-3.75/remake.c ./remake.c *** ../make-3.75/remake.c Sat Jul 20 07:06:40 1996 --- ./remake.c Wed Aug 27 16:31:25 1997 *************** *** 1,5 **** /* Basic dependency engine for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Basic dependency engine for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 29,38 **** #include #endif #ifdef VMS #include #endif ! #ifdef WIN32 #include #endif --- 29,42 ---- #include #endif + #ifdef __MSDOS__ + #include "variable.h" + #endif + #ifdef VMS #include #endif ! #ifdef WINDOWS32 #include #endif *************** *** 52,61 **** extern time_t f_mtime PARAMS ((struct file *file, int search)); - #ifdef VMS - extern int vms_stat PARAMS ((char *name, struct stat *buf)); - #endif - /* Remake all the goals in the `struct dep' chain GOALS. Return -1 if nothing was done, 0 if all goals were updated successfully, or 1 if a goal failed. --- 56,61 ---- *************** *** 566,578 **** if (!must_make) { ! DEBUGPR ("No need to remake target `%s'.\n"); notice_finished_file (file); return 0; } DEBUGPR ("Must remake target `%s'.\n"); /* Now, take appropriate actions to remake the file. */ remake_file (file); --- 566,611 ---- if (!must_make) { ! if (debug_flag) ! { ! print_spaces(depth); ! printf("No need to remake target `%s'", file->name); ! if (!streq(file->name, file->hname)) ! printf("; using VPATH name `%s'", file->hname); ! printf(".\n"); ! fflush(stdout); ! } ! notice_finished_file (file); + + /* Since we don't need to remake the file, convert it to use the + VPATH filename if we found one. hfile will be either the + local name if no VPATH or the VPATH name if one was found. */ + + while (file) + { + file->name = file->hname; + file = file->prev; + } + return 0; } DEBUGPR ("Must remake target `%s'.\n"); + /* It needs to be remade. If it's VPATH and not reset via GPATH, toss the + VPATH */ + if (!streq(file->name, file->hname)) + { + if (debug_flag) + { + print_spaces (depth); + printf(" Ignoring VPATH name `%s'.\n", file->hname); + fflush(stdout); + } + file->ignore_vpath = 1; + } + /* Now, take appropriate actions to remake the file. */ remake_file (file); *************** *** 745,751 **** check_renamed (file); mtime = file_mtime (file); check_renamed (file); ! if (mtime > this_mtime) *must_make_ptr = 1; /* Otherwise, update all non-intermediate files we depend on, if necessary, and see whether any of them is more --- 778,784 ---- check_renamed (file); mtime = file_mtime (file); check_renamed (file); ! if (mtime != (time_t) -1 && mtime > this_mtime) *must_make_ptr = 1; /* Otherwise, update all non-intermediate files we depend on, if necessary, and see whether any of them is more *************** *** 1003,1009 **** { mtime = name_mtime (file->name); ! if (mtime == (time_t) -1 && search) { /* If name_mtime failed, search VPATH. */ char *name = file->name; --- 1036,1042 ---- { mtime = name_mtime (file->name); ! if (mtime == (time_t) -1 && search && !file->ignore_vpath) { /* If name_mtime failed, search VPATH. */ char *name = file->name; *************** *** 1016,1024 **** /* vpath_search and library_search store zero in MTIME if they didn't need to do a stat call for their work. */ file->last_mtime = mtime; ! rename_file (file, name); check_renamed (file); ! return file_mtime (file); } } } --- 1049,1068 ---- /* vpath_search and library_search store zero in MTIME if they didn't need to do a stat call for their work. */ file->last_mtime = mtime; ! ! /* If we found it in VPATH, see if it's in GPATH too; if so, ! change the name right now; if not, defer until after the ! dependencies are updated. */ ! if (gpath_search (name, strlen(name) - strlen(file->name) - 1)) ! { ! rename_file (file, name); ! check_renamed (file); ! return file_mtime (file); ! } ! ! rehash_file (file, name); check_renamed (file); ! mtime = name_mtime (name); } } } *************** *** 1026,1054 **** { /* Files can have bogus timestamps that nothing newly made will be "newer" than. Updating their dependents could just result in loops. ! So notify the user of the anomaly by treating future files as ! unrecoverably absent. */ ! static time_t now; ! if (mtime != -1 && mtime > now && ! file->updated) { /* This file's time appears to be in the future. Update our concept of the present, and compare again. */ ! #ifdef VMS ! /* Handle vms 64bit to 32bit time hack introduced in vms_stat ... */ ! static unsigned long vms_now[2]; /* assumes 32 bit long ! */ ! sys$gettim (vms_now); ! now = ((vms_now[0]>>24) & 0xff) + ((vms_now[1]<<8) & 0xffffff00); ! if (mtime > now) ! #else extern time_t time (); ! if (mtime > time (&now)) #endif ! { ! error ("*** File `%s' has modification time in the future", ! file->name); ! file->update_status = 2; ! } } } --- 1070,1108 ---- { /* Files can have bogus timestamps that nothing newly made will be "newer" than. Updating their dependents could just result in loops. ! So notify the user of the anomaly with a warning. ! ! We only need to do this once, for now. */ ! static time_t now = 0; ! if (!clock_skew_detected ! && mtime != (time_t)-1 && mtime > now ! && !file->updated) { /* This file's time appears to be in the future. Update our concept of the present, and compare again. */ ! extern time_t time (); ! time (&now); ! ! #ifdef WINDOWS32 ! /* ! * FAT filesystems round time to nearest even second(!). Just ! * allow for any file (NTFS or FAT) to perhaps suffer from this ! * braindamage. ! * ! * Apparently, this doesn't happen with the MS-DOS/DJGPP port, ! * although MS-DOS and MS-Windows 3.X/9X also use FAT filesystems. ! */ ! if (mtime > now && (((mtime % 2) == 0) && ((mtime-1) > now))) ! #else ! if (mtime > now) #endif ! { ! error("*** Warning: File `%s' has modification time in the future", ! file->name); ! clock_skew_detected = 1; ! } } } *************** *** 1073,1083 **** { struct stat st; - #ifdef VMS - if (vms_stat (name, &st) < 0) - #else if (stat (name, &st) < 0) - #endif return (time_t) -1; return (time_t) st.st_mtime; --- 1127,1133 ---- *************** *** 1099,1105 **** "/lib", "/usr/lib", #endif ! #if defined(WIN32) && !defined(LIBDIR) /* * This is completely up to the user at product install time. Just define * a placeholder. --- 1149,1155 ---- "/lib", "/usr/lib", #endif ! #if defined(WINDOWS32) && !defined(LIBDIR) /* * This is completely up to the user at product install time. Just define * a placeholder. *************** *** 1144,1149 **** --- 1194,1223 ---- } /* Now try the standard set of directories. */ + + #ifdef __MSDOS__ + { + /* The default library directory is at ${DJDIR}/lib. */ + struct variable *djdir = lookup_variable ("DJDIR", 5); + + if (djdir) + { + size_t djdir_len = strlen (djdir->value); + + if (djdir_len > sizeof(LIBDIR) + 8 + strlen(libname) + 4 + 2) + buf = (char *) xrealloc (djdir_len + 1); + sprintf (buf, "%s/lib/lib%s.a", djdir->value, libname); + mtime = name_mtime (buf); + if (mtime != (time_t) -1) + { + *lib = buf; + if (mtime_ptr != 0) + *mtime_ptr = mtime; + return 1; + } + } + } + #endif for (dp = dirs; *dp != 0; ++dp) { diff -crP ../make-3.75/signame.c ./signame.c *** ../make-3.75/signame.c Wed Mar 20 10:10:25 1996 --- ./signame.c Mon Jun 23 18:48:40 1997 *************** *** 1,19 **** /* Convert between signal names and numbers. Copyright (C) 1990, 1992, 1993, 1995, 1996 Free Software Foundation, Inc. ! This program 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, or (at your option) ! any later version. ! ! This program 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; see the file COPYING. If not, write to ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include --- 1,21 ---- /* Convert between signal names and numbers. Copyright (C) 1990, 1992, 1993, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. ! The GNU C Library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! The GNU C Library 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 ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with the GNU C Library; see the file COPYING.LIB. If not, ! write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include *************** *** 230,235 **** --- 232,240 ---- #endif #if defined (SIGINFO) init_sig (SIGINFO, "INFO", "Information request"); + #endif + #if defined (SIGNOFP) + init_sig (SIGNOFP, "NOFP", "Floating point co-processor not available"); #endif } diff -crP ../make-3.75/signame.h ./signame.h *** ../make-3.75/signame.h Thu Feb 23 18:42:12 1995 --- ./signame.h Mon Jun 23 18:48:41 1997 *************** *** 1,19 **** /* Convert between signal names and numbers. ! Copyright (C) 1990, 1992, 1993, 1995 Free Software Foundation, Inc. ! This program 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, or (at your option) ! any later version. ! This program 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; see the file COPYING. If not, write to ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #if defined (__STDC__) && __STDC__ --- 1,21 ---- /* Convert between signal names and numbers. ! Copyright (C) 1990, 1992, 1993, 1995, 1997 Free Software Foundation, Inc. ! This file is part of the GNU C Library. ! The GNU C Library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! The GNU C Library 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 ! Library General Public License for more details. ! You should have received a copy of the GNU Library General Public ! License along with the GNU C Library; see the file COPYING.LIB. If not, ! write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ #if defined (__STDC__) && __STDC__ diff -crP ../make-3.75/stamp-h.in ./stamp-h.in *** ../make-3.75/stamp-h.in Wed Dec 31 19:00:00 1969 --- ./stamp-h.in Tue Sep 16 11:00:27 1997 *************** *** 0 **** --- 1 ---- + timestamp Only in ../make-3.75: tags diff -crP ../make-3.75/texinfo.tex ./texinfo.tex *** ../make-3.75/texinfo.tex Sun Jul 14 12:30:17 1996 --- ./texinfo.tex Sat Jul 26 15:12:35 1997 *************** *** 1,7 **** ! %% TeX macros to handle texinfo files % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, ! % 94, 95, 1996 Free Software Foundation, Inc. %This texinfo.tex file is free software; you can redistribute it and/or %modify it under the terms of the GNU General Public License as --- 1,8 ---- ! %% TeX macros to handle Texinfo files. ! %% $Id: texinfo.tex,v 2.218 1997/07/26 19:12:35 karl Exp $ % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, ! % 94, 95, 96, 97 Free Software Foundation, Inc. %This texinfo.tex file is free software; you can redistribute it and/or %modify it under the terms of the GNU General Public License as *************** *** 35,41 **** % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} ! \deftexinfoversion$Revision: 2.174 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number --- 36,42 ---- % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} ! \deftexinfoversion$Revision: 2.218 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number *************** *** 46,65 **** % Save some parts of plain tex whose names we will redefine. - \let\ptextilde=\~ - \let\ptexlbrace=\{ - \let\ptexrbrace=\} - \let\ptexdots=\dots - \let\ptexdot=\. - \let\ptexstar=\* - \let\ptexend=\end - \let\ptexbullet=\bullet \let\ptexb=\b \let\ptexc=\c \let\ptexi=\i \let\ptext=\t - \let\ptexl=\l - \let\ptexL=\L % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space --- 47,65 ---- % Save some parts of plain tex whose names we will redefine. \let\ptexb=\b + \let\ptexbullet=\bullet \let\ptexc=\c + \let\ptexcomma=\, + \let\ptexdot=\. + \let\ptexdots=\dots + \let\ptexend=\end + \let\ptexequiv = \equiv \let\ptexi=\i + \let\ptexlbrace=\{ + \let\ptexrbrace=\} + \let\ptexstar=\* \let\ptext=\t % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space *************** *** 72,78 **** \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } ! \let\~ = \tie % And make it available as @~. \message{Basics,} \chardef\other=12 --- 72,78 ---- \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } ! \message{Basics,} \chardef\other=12 *************** *** 101,112 **** \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} % Margin to add to right of even pages, to left of odd pages. ! \newdimen \bindingoffset \bindingoffset=0pt ! \newdimen \normaloffset \normaloffset=\hoffset \newdimen\pagewidth \newdimen\pageheight - \pagewidth=\hsize \pageheight=\vsize % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, --- 101,112 ---- \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} + \hyphenation{white-space} % Margin to add to right of even pages, to left of odd pages. ! \newdimen \bindingoffset ! \newdimen \normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, *************** *** 119,189 **** \showboxbreadth\maxdimen\showboxdepth\maxdimen }% ! %---------------------Begin change----------------------- % ! %%%% For @cropmarks command. ! % Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\cornerlong \newdimen\cornerthick ! \newdimen \topandbottommargin ! \newdimen \outerhsize \newdimen \outervsize ! \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks \outerhsize=7in %\outervsize=9.5in % Alternative @smallbook page size is 9.25in \outervsize=9.25in \topandbottommargin=.75in ! % ! %---------------------End change----------------------- % \onepageout takes a vbox as an argument. Note that \pagecontents ! % does insertions itself, but you have to call it yourself. ! \chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}} ! \def\onepageout#1{\hoffset=\normaloffset ! \ifodd\pageno \advance\hoffset by \bindingoffset ! \else \advance\hoffset by -\bindingoffset\fi ! {\escapechar=`\\\relax % makes sure backslash is used in output files. ! \shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}% ! {\let\hsize=\pagewidth \makefootline}}}% ! \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi} ! ! %%%% For @cropmarks command %%%% ! ! % Here is a modification of the main output routine for Near East Publications ! % This provides right-angle cropmarks at all four corners. ! % The contents of the page are centerlined into the cropmarks, ! % and any desired binding offset is added as an \hskip on either ! % site of the centerlined box. (P. A. MacKay, 12 November, 1986) ! % ! \def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up ! {\escapechar=`\\\relax % makes sure backslash is used in output files. ! \shipout ! \vbox to \outervsize{\hsize=\outerhsize ! \vbox{\line{\ewtop\hfill\ewtop}} ! \nointerlineskip ! \line{\vbox{\moveleft\cornerthick\nstop} ! \hfill ! \vbox{\moveright\cornerthick\nstop}} ! \vskip \topandbottommargin ! \centerline{\ifodd\pageno\hskip\bindingoffset\fi ! \vbox{ ! {\let\hsize=\pagewidth \makeheadline} ! \pagebody{#1} ! {\let\hsize=\pagewidth \makefootline}} ! \ifodd\pageno\else\hskip\bindingoffset\fi} ! \vskip \topandbottommargin plus1fill minus1fill ! \boxmaxdepth\cornerthick ! \line{\vbox{\moveleft\cornerthick\nsbot} ! \hfill ! \vbox{\moveright\cornerthick\nsbot}} ! \nointerlineskip ! \vbox{\line{\ewbot\hfill\ewbot}} ! }} \advancepageno ! \ifnum\outputpenalty>-20000 \else\dosupereject\fi} ! % ! % Do @cropmarks to get crop marks ! \def\cropmarks{\let\onepageout=\croppageout } \newinsert\margin \dimen\margin=\maxdimen --- 119,218 ---- \showboxbreadth\maxdimen\showboxdepth\maxdimen }% ! % For @cropmarks command. ! % Do @cropmarks to get crop marks. ! % ! \newif\ifcropmarks ! \let\cropmarks = \cropmarkstrue % ! % Dimensions to add cropmarks at corners. ! % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\cornerlong \newdimen\cornerthick ! \newdimen\topandbottommargin ! \newdimen\outerhsize \newdimen\outervsize ! \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks \outerhsize=7in %\outervsize=9.5in % Alternative @smallbook page size is 9.25in \outervsize=9.25in \topandbottommargin=.75in ! ! % Main output routine. ! \chardef\PAGE = 255 ! \output = {\onepageout{\pagecontents\PAGE}} ! ! \newbox\headlinebox ! \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents ! % does insertions, but you have to call it yourself. ! \def\onepageout#1{% ! \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi ! % ! \ifodd\pageno \advance\hoffset by \bindingoffset ! \else \advance\hoffset by -\bindingoffset\fi ! % ! % Do this outside of the \shipout so @code etc. will be expanded in ! % the headline as they should be, not taken literally (outputting ''code). ! \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% ! \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% ! % ! {% ! % Have to do this stuff outside the \shipout because we want it to ! % take effect in \write's, yet the group defined by the \vbox ends ! % before the \shipout runs. ! % ! \escapechar = `\\ % use backslash in output files. ! \indexdummies % don't expand commands in the output. ! \normalturnoffactive % \ in index entries must not stay \, e.g., if ! % the page break happens to be in the middle of an example. ! \shipout\vbox{% ! \ifcropmarks \vbox to \outervsize\bgroup ! \hsize = \outerhsize ! \line{\ewtop\hfil\ewtop}% ! \nointerlineskip ! \line{% ! \vbox{\moveleft\cornerthick\nstop}% ! \hfill ! \vbox{\moveright\cornerthick\nstop}% ! }% ! \vskip\topandbottommargin ! \line\bgroup ! \hfil % center the page within the outer (page) hsize. ! \ifodd\pageno\hskip\bindingoffset\fi ! \vbox\bgroup ! \fi ! % ! \unvbox\headlinebox ! \pagebody{#1}% ! \ifdim\ht\footlinebox > 0pt ! % Only leave this space if the footline is nonempty. ! % (We lessened \vsize for it in \oddfootingxxx.) ! % The \baselineskip=24pt in plain's \makefootline has no effect. ! \vskip 2\baselineskip ! \unvbox\footlinebox ! \fi ! % ! \ifcropmarks ! \egroup % end of \vbox\bgroup ! \hfil\egroup % end of (centering) \line\bgroup ! \vskip\topandbottommargin plus1fill minus1fill ! \boxmaxdepth = \cornerthick ! \line{% ! \vbox{\moveleft\cornerthick\nsbot}% ! \hfill ! \vbox{\moveright\cornerthick\nsbot}% ! }% ! \nointerlineskip ! \line{\ewbot\hfil\ewbot}% ! \egroup % \vbox from first cropmarks clause ! \fi ! }% end of \shipout\vbox ! }% end of group with \turnoffactive \advancepageno ! \ifnum\outputpenalty>-20000 \else\dosupereject\fi ! } \newinsert\margin \dimen\margin=\maxdimen *************** *** 198,204 **** \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } - % % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) --- 227,232 ---- *************** *** 366,376 **** %\def\'{{'}} % Used to generate quoted braces. - \def\mylbrace {{\tt \char '173}} \def\myrbrace {{\tt \char '175}} \let\{=\mylbrace \let\}=\myrbrace % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } --- 394,436 ---- %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt \char '173}} \def\myrbrace {{\tt \char '175}} \let\{=\mylbrace \let\}=\myrbrace + \begingroup + % Definitions to produce actual \{ & \} command in an index. + \catcode`\{ = 12 \catcode`\} = 12 + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\@ = 0 \catcode`\\ = 12 + @gdef@lbracecmd[\{]% + @gdef@rbracecmd[\}]% + @endgroup + + % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent + % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. + \let\, = \c + \let\dotaccent = \. + \def\ringaccent#1{{\accent23 #1}} + \let\tieaccent = \t + \let\ubaraccent = \b + \let\udotaccent = \d + + % Other special characters: @questiondown @exclamdown + % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. + \def\questiondown{?`} + \def\exclamdown{!`} + + % Dotless i and dotless j, used for accents. + \def\imacro{i} + \def\jmacro{j} + \def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ptexi + \else\ifx\temp\jmacro \j + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi + } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } *************** *** 579,585 **** % @sp n outputs n lines of vertical space \def\sp{\parsearg\spxxx} ! \def\spxxx #1{\par \vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment --- 639,645 ---- % @sp n outputs n lines of vertical space \def\sp{\parsearg\spxxx} ! \def\spxxx #1{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment *************** *** 592,597 **** --- 652,660 ---- \let\c=\comment + % @paragraphindent is defined for the Info formatting commands only. + \let\paragraphindent=\comment + % Prevent errors for section commands. % Used in @ignore and in failing conditionals. \def\ignoresections{% *************** *** 673,690 **** % \def\ignore{\doignore{ignore}} ! % Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text. % \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} \def\html{\doignore{html}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. ! ! \def\dircategory{\comment} % Ignore text until a line `@end #1'. % --- 736,759 ---- % \def\ignore{\doignore{ignore}} ! % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. % \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} + \def\ifnottex{\doignore{ifnottex}} \def\html{\doignore{html}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} + % Also ignore @macro ... @end macro. The user must run texi2dvi, + % which runs makeinfo to do macro expansion. Ignore @unmacro, too. + \def\macro{\doignore{macro}} + \let\unmacro = \comment + + % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. ! \let\dircategory = \comment % Ignore text until a line `@end #1'. % *************** *** 698,703 **** --- 767,776 ---- % Make sure that spaces turn into tokens that match what \doignoretext wants. \catcode32 = 10 % + % Ignore braces, too, so mismatched braces don't cause trouble. + \catcode`\{ = 9 + \catcode`\} = 9 + % % And now expand that command. \doignoretext } *************** *** 717,722 **** --- 790,796 ---- \immediate\write16{If you are running another version of TeX, relax.} \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} + \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} \immediate\write16{ to use a workaround.} *************** *** 788,794 **** \pretolerance = 10000 % % Do not execute instructions in @tex ! \def\tex{\doignore{tex}} } % @set VAR sets the variable VAR to an empty value. --- 862,868 ---- \pretolerance = 10000 % % Do not execute instructions in @tex ! \def\tex{\doignore{tex}}% } % @set VAR sets the variable VAR to an empty value. *************** *** 800,806 **** % didn't need it. Make sure the catcode of space is correct to avoid % losing inside @example, for instance. % ! \def\set{\begingroup\catcode` =10 \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% \def\temp{#2}% --- 874,882 ---- % didn't need it. Make sure the catcode of space is correct to avoid % losing inside @example, for instance. % ! \def\set{\begingroup\catcode` =10 ! \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. ! \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% \def\temp{#2}% *************** *** 821,830 **** % @value{foo} gets the text saved in variable foo. % ! \def\value#1{\expandafter ! \ifx\csname SET#1\endcsname\relax ! {\{No value for ``#1''\}} ! \else \csname SET#1\endcsname \fi} % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. --- 897,912 ---- % @value{foo} gets the text saved in variable foo. % ! \def\value{\begingroup ! \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. ! \valuexxx} ! \def\valuexxx#1{% ! \expandafter\ifx\csname SET#1\endcsname\relax ! {\{No value for ``#1''\}}% ! \else ! \csname SET#1\endcsname ! \fi ! \endgroup} % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. *************** *** 856,866 **** \def\ifclearfail{\nestedignore{ifclear}} \defineunmatchedend{ifclear} ! % @iftex always succeeds; we read the text following, through @end ! % iftex). But `@end iftex' should be valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \defineunmatchedend{iftex} % We can't just want to start a group at @iftex (for example) and end it % at @end iftex, since then @set commands inside the conditional have no --- 938,953 ---- \def\ifclearfail{\nestedignore{ifclear}} \defineunmatchedend{ifclear} ! % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text ! % following, through the first @end iftex (etc.). Make `@end iftex' ! % (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} + \def\ifnothtml{\conditionalsucceed{ifnothtml}} + \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} \defineunmatchedend{iftex} + \defineunmatchedend{ifnothtml} + \defineunmatchedend{ifnotinfo} % We can't just want to start a group at @iftex (for example) and end it % at @end iftex, since then @set commands inside the conditional have no *************** *** 924,929 **** --- 1011,1017 ---- \expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi \global\let\lastnode=\relax} + % @refill is a no-op. \let\refill=\relax % @setfilename is done at the beginning of every texinfo file. *************** *** 935,953 **** \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. \comment % Ignore the actual filename. } \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} ! \def\inforef #1{\inforefzzz #1,,,,**} ! \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, ! node \samp{\ignorespaces#1{}}} ! ! \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx} ! \def\macroxxx#1#2 \end macro{% ! \expandafter\gdef\macrotemp#1{#2}% ! \endgroup} %\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx} %\def\linemacroxxx#1#2 \end linemacro{% --- 1023,1047 ---- \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. + % Just to be on the safe side, close the input stream before the \input. + \openin 1 texinfo.cnf + \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi + \closein1 + \temp + % \comment % Ignore the actual filename. } + % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} ! % \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx} ! % \def\macroxxx#1#2 \end macro{% ! % \expandafter\gdef\macrotemp#1{#2}% ! % \endgroup} %\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx} %\def\linemacroxxx#1#2 \end linemacro{% *************** *** 959,964 **** --- 1053,1059 ---- %\def\butfirst#1{} + \message{fonts,} % Font-change commands. *************** *** 972,979 **** % We don't need math for this one. \def\ttsl{\tenttsl} ! %% Try out Computer Modern fonts at \magstephalf ! \let\mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). --- 1067,1075 ---- % We don't need math for this one. \def\ttsl{\tenttsl} ! % Use Computer Modern fonts at \magstephalf (11pt). ! \newcount\mainmagstep ! \mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). *************** *** 988,994 **** \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} ! \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} --- 1084,1090 ---- \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} ! \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} *************** *** 1028,1034 **** \setfont\deftt\ttshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} ! % Fonts for indices and small examples. % We actually use the slanted font rather than the italic, % because texinfo normally uses the slanted fonts for that. % Do not make many font distinctions in general in the index, since they --- 1124,1130 ---- \setfont\deftt\ttshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} ! % Fonts for indices and small examples (9pt). % We actually use the slanted font rather than the italic, % because texinfo normally uses the slanted fonts for that. % Do not make many font distinctions in general in the index, since they *************** *** 1045,1062 **** \font\indi=cmmi9 \font\indsy=cmsy9 ! % Fonts for headings \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} ! \setfont\chapsf\sfbshape{12}{\magstep2} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} --- 1141,1172 ---- \font\indi=cmmi9 \font\indsy=cmsy9 ! % Fonts for title page: ! \setfont\titlerm\rmbshape{12}{\magstep3} ! \setfont\titleit\itbshape{10}{\magstep4} ! \setfont\titlesl\slbshape{10}{\magstep4} ! \setfont\titlett\ttbshape{12}{\magstep3} ! \setfont\titlettsl\ttslshape{10}{\magstep4} ! \setfont\titlesf\sfbshape{17}{\magstep1} ! \let\titlebf=\titlerm ! \setfont\titlesc\scbshape{10}{\magstep4} ! \font\titlei=cmmi12 scaled \magstep3 ! \font\titlesy=cmsy10 scaled \magstep4 ! \def\authorrm{\secrm} ! ! % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} ! \setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 + % Section fonts (14.4pt). \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} *************** *** 1074,1104 **** % \setfont\ssectt\ttshape{10}{\magstep1} % \setfont\ssecsf\sfshape{10}{\magstep1} ! %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. ! %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than ! %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. %\setfont\ssectt\ttshape{10}{1315} %\setfont\ssecsf\sfshape{10}{1315} %\let\ssecbf=\ssecrm \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} ! \setfont\ssecttsl\ttslshape{10}{\magstep1} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf ! \font\ssecsy=cmsy10 scaled \magstep1 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. - % Fonts for title page: - \setfont\titlerm\rmbshape{12}{\magstep3} - \let\authorrm = \secrm - % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts, we --- 1184,1211 ---- % \setfont\ssectt\ttshape{10}{\magstep1} % \setfont\ssecsf\sfshape{10}{\magstep1} ! %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. ! %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than ! %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. %\setfont\ssectt\ttshape{10}{1315} %\setfont\ssecsf\sfshape{10}{1315} %\let\ssecbf=\ssecrm + % Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} ! \setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf ! \font\ssecsy=cmsy10 scaled 1315 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts, we *************** *** 1123,1148 **** \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl ! \resetmathfonts} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl ! \resetmathfonts} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl ! \resetmathfonts} \def\indexfonts{% \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl ! \resetmathfonts} % Set up the default fonts, so we can use them for creating boxes. % --- 1230,1263 ---- \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts} + \def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl + \resetmathfonts \setleading{25pt}} + \def\titlefont#1{{\titlefonts #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl ! \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl ! \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl ! \resetmathfonts \setleading{15pt}} ! \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? \def\indexfonts{% \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl ! \resetmathfonts \setleading{12pt}} % Set up the default fonts, so we can use them for creating boxes. % *************** *** 1186,1197 **** } \let\ttfont=\t \def\samp #1{`\tclose{#1}'\null} ! \def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} \let\file=\samp - \let\email=\samp - \let\url=\samp % perhaps include a hypertex \special eventually % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. --- 1301,1319 ---- } \let\ttfont=\t \def\samp #1{`\tclose{#1}'\null} ! \setfont\smallrm\rmshape{8}{1000} ! \font\smallsy=cmsy9 ! \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% ! \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% ! \vbox{\hrule\kern-0.4pt ! \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% ! \kern-0.4pt\hrule}% ! \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} ! % The old definition, with no lozenge: ! %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} \let\file=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. *************** *** 1223,1263 **** % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) ! % and arrange explicitly to hyphenate an a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} % The following is used by \doprintindex to insure that long function names % wrap around. It is necessary for - and _ to be active before the index is % read from the file, as \entry parses the arguments long before \code is % ever called. -- mycroft ! \global\def\indexbreaks{\catcode`\-=\active \let-\realdash \catcode`\_=\active \let_\realunder} } \def\realdash{-} - \def\realunder{_} \def\codedash{-\discretionary{}{}{}} ! \def\codeunder{\normalunderscore\discretionary{}{}{}} \def\codex #1{\tclose{#1}\endgroup} %\let\exp=\tclose %Was temporary % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. ! % \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% ! \else{\tclose{\ttsl\look}}\fi ! \else{\tclose{\ttsl\look}}\fi} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. ! % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the --- 1345,1434 ---- % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) ! % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active + \catcode`\|=\active \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} % The following is used by \doprintindex to insure that long function names % wrap around. It is necessary for - and _ to be active before the index is % read from the file, as \entry parses the arguments long before \code is % ever called. -- mycroft ! % _ is always active; and it shouldn't be \let = to an _ that is a ! % subscript character anyway. Then, @cindex @samp{_} (for example) ! % fails. --karl ! \global\def\indexbreaks{% ! \catcode`\-=\active \let-\realdash ! } } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} ! \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} \def\codex #1{\tclose{#1}\endgroup} %\let\exp=\tclose %Was temporary % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. ! ! % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), ! % `example' (@kbd uses ttsl only inside of @example and friends), ! % or `code' (@kbd uses normal tty font always). ! \def\kbdinputstyle{\parsearg\kbdinputstylexxx} ! \def\kbdinputstylexxx#1{% ! \def\arg{#1}% ! \ifx\arg\worddistinct ! \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% ! \else\ifx\arg\wordexample ! \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% ! \else\ifx\arg\wordcode ! \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% ! \fi\fi\fi ! } ! \def\worddistinct{distinct} ! \def\wordexample{example} ! \def\wordcode{code} ! ! % Default is kbdinputdistinct. (Too much of a hassle to call the macro, ! % the catcodes are wrong for parsearg to work.) ! \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} ! \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% ! \else{\tclose{\kbdfont\look}}\fi ! \else{\tclose{\kbdfont\look}}\fi} ! ! % @url. Quotes do not seem necessary, so use \code. ! \let\url=\code ! ! % @uref (abbreviation for `urlref') takes an optional second argument ! % specifying the text to display. First (mandatory) arg is the url. ! % Perhaps eventually put in a hypertex \special here. ! % ! \def\uref#1{\urefxxx #1,,\finish} ! \def\urefxxx#1,#2,#3\finish{% ! \setbox0 = \hbox{\ignorespaces #2}% ! \ifdim\wd0 > 0pt ! \unhbox0\ (\code{#1})% ! \else ! \code{#1}% ! \fi ! } ! ! % rms does not like the angle brackets --karl, 17may97. ! % So now @email is just like @uref. ! %\def\email#1{$\langle${\tt #1}$\rangle$} ! \let\email=\uref % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. ! % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the *************** *** 1268,1279 **** \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} ! \def\l#1{{\li #1}\null} % ! \def\r#1{{\rm #1}} % roman font % Use of \lowercase was suggested. ! \def\sc#1{{\smallcaps#1}} % smallcaps font ! \def\ii#1{{\it #1}} % italic font \message{page headings,} --- 1439,1457 ---- \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} ! % @l was never documented to mean ``switch to the Lisp font'', ! % and it is not used as such in any manual I can find. We need it for ! % Polish suppressed-l. --karl, 22sep96. ! %\def\l#1{{\li #1}\null} ! \def\r#1{{\rm #1}} % roman font % Use of \lowercase was suggested. ! \def\sc#1{{\smallcaps#1}} % smallcaps font ! \def\ii#1{{\it #1}} % italic font ! ! % @pounds{} is a sterling sign. ! \def\pounds{{\it\$}} ! \message{page headings,} *************** *** 1281,1294 **** \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. - \def\titlefont#1{{\titlerm #1}} - \newif\ifseenauthor \newif\iffinishedtitlepage \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% ! \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts \let\subtitlerm=\tenrm --- 1459,1470 ---- \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% ! \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts \let\subtitlerm=\tenrm *************** *** 1304,1313 **** % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% ! \def\titlezzz##1{\leftline{\titlefont{##1}} ! % print a rule at the page bottom also. ! \finishedtitlepagefalse ! \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % --- 1480,1489 ---- % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% ! \def\titlezzz##1{\leftline{\titlefonts\rm ##1} ! % print a rule at the page bottom also. ! \finishedtitlepagefalse ! \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % *************** *** 1325,1331 **** \let\oldpage = \page \def\page{% \iffinishedtitlepage\else ! \finishtitlepage \fi \oldpage \let\page = \oldpage --- 1501,1507 ---- \let\oldpage = \page \def\page{% \iffinishedtitlepage\else ! \finishtitlepage \fi \oldpage \let\page = \oldpage *************** *** 1393,1402 **** \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} ! \gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish} ! \gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{% ! \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}} ! \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% --- 1569,1575 ---- \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} ! \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% *************** *** 1404,1426 **** \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% ! \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} ! \gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish} ! \gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{% ! \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}} ! \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} % }% unbind the catcode of @. ! % @headings double turns headings on for double-sided printing. ! % @headings single turns headings on for single-sided printing. ! % @headings off turns them off. ! % @headings on same as @headings double, retained for compatibility. ! % @headings after turns on double-sided headings after this page. ! % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. ! % By default, they are off. \def\headings #1 {\csname HEADINGS#1\endcsname} --- 1577,1603 ---- \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% ! \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% ! % ! % Leave some space for the footline. Hopefully ok to assume ! % @evenfooting will not be used by itself. ! \global\advance\pageheight by -\baselineskip ! \global\advance\vsize by -\baselineskip ! } ! \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} % }% unbind the catcode of @. ! % @headings double turns headings on for double-sided printing. ! % @headings single turns headings on for single-sided printing. ! % @headings off turns them off. ! % @headings on same as @headings double, retained for compatibility. ! % @headings after turns on double-sided headings after this page. ! % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. ! % By default, they are off at the start of a document, ! % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} *************** *** 1434,1455 **** % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{ - %\pagealignmacro \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} } % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{ - %\pagealignmacro \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} } \def\HEADINGSon{\HEADINGSdouble} --- 1611,1634 ---- % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} + \global\let\contentsalignmacro = \chapoddpage } + \let\contentsalignmacro = \chappager + % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} + \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} *************** *** 1460,1465 **** --- 1639,1645 ---- \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} + \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} *************** *** 1468,1473 **** --- 1648,1654 ---- \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} + \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings *************** *** 1491,1496 **** --- 1672,1678 ---- \def\settitle{\parsearg\settitlezzz} \def\settitlezzz #1{\gdef\thistitle{#1}} + \message{tables,} % @tabs -- simple alignment *************** *** 1787,1793 **** \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% ! \ifhmode \errmessage{\in hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% --- 1969,1975 ---- \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% ! \ifhmode \errmessage{In hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% *************** *** 1805,1811 **** % To make preamble: % ! % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % --- 1987,1993 ---- % To make preamble: % ! % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % *************** *** 1813,1818 **** --- 1995,2001 ---- % current hsize to be used for each column. You may use as many % columns as desired. + % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... *************** *** 1822,1854 **** % the preamble, break the line within one argument and it % will parse correctly, i.e., % ! % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: ! % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} ! % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. ! % @item, @tab, @multicolumn or @endmulticolumn do not need to be on their % own lines, but it will not hurt if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col ! % @item ! % first col stuff ! % @tab ! % second col stuff ! % @tab ! % third col ! % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. ! % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable --- 2005,2037 ---- % the preamble, break the line within one argument and it % will parse correctly, i.e., % ! % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: ! % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} ! % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. ! % @item, @tab, @multitable or @end multitable do not need to be on their % own lines, but it will not hurt if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col ! % @item ! % first col stuff ! % @tab ! % second col stuff ! % @tab ! % third col ! % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. ! % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable *************** *** 1862,1868 **** % 0pt means it depends on current normal line spacing. %%%% ! % Dimensions \newskip\multitableparskip \newskip\multitableparindent --- 2045,2051 ---- % 0pt means it depends on current normal line spacing. %%%% ! % Dimensions \newskip\multitableparskip \newskip\multitableparindent *************** *** 1899,1905 **** % We don't need this so we don't use it. \else \global\advance\colcount by1 ! \setbox0=\hbox{#1}% \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi% \fi% --- 2082,2089 ---- % We don't need this so we don't use it. \else \global\advance\colcount by1 ! \setbox0=\hbox{#1 }% Add a normal word space as a separator; ! % typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi% \fi% *************** *** 1931,1948 **** % To parse everything between @multitable and @item : \setuptable#1 \endsetuptable % Need to reset this to 0 after \setuptable. ! \global\colcount=0\relax% % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. ! % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup&\global\advance\colcount by 1\relax% \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. ! % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % If user has set preamble in terms of percent of \hsize % we will use that dimension as the width of the column, and --- 2115,2132 ---- % To parse everything between @multitable and @item : \setuptable#1 \endsetuptable % Need to reset this to 0 after \setuptable. ! \global\colcount=0\relax% % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. ! % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup&\global\advance\colcount by 1\relax% \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. ! % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % If user has set preamble in terms of percent of \hsize % we will use that dimension as the width of the column, and *************** *** 1954,1985 **** \ifsetpercent \else % If user has set preamble in terms of percent of \hsize ! % we will advance \hsize by \multitablecolspace \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi ! \noindent##}\cr% % \everycr will reset column counter, \colcount, at the end of ! % each line. Every column entry will cause \colcount to advance by one. % The table preamble % looks at the current \colcount to find the correct column width. \global\everycr{\noalign{% ! \filbreak%% keeps underfull box messages off when table breaks over pages. \global\colcount=0\relax}} } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. - \setbox0=\vbox{Xy} \ifdim\multitablelinespace=0pt %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced ! \gdef\multistrut{\vrule height\ht0 depth\dp0 width0pt\relax} %% Test to see if parskip is larger than space between lines of ! %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \else \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 --- 2138,2180 ---- \ifsetpercent \else % If user has set preamble in terms of percent of \hsize ! % we will advance \hsize by \multitablecolspace \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi ! % Ignoring space at the beginning and end avoids an occasional spurious ! % blank line, when TeX decides to break the line at the space before the ! % box from the multistrut, so the strut ends up on a line by itself. ! % For example: ! % @multitable @columnfractions .11 .89 ! % @item @code{#} ! % @tab Legal holiday which is valid in major parts of the whole country. ! % Is automatically provided with highlighting sequences respectively marking ! % characters. ! \noindent\ignorespaces##\unskip\multistrut}\cr % \everycr will reset column counter, \colcount, at the end of ! % each line. Every column entry will cause \colcount to advance by one. % The table preamble % looks at the current \colcount to find the correct column width. \global\everycr{\noalign{% ! % \filbreak%% keeps underfull box messages off when table breaks over pages. ! % Maybe so, but it also creates really weird page breaks when the table ! % breaks over pages Wouldn't \vfil be better? Wait until the problem ! % manifests itself, so it can be fixed for real --karl. \global\colcount=0\relax}} } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. \ifdim\multitablelinespace=0pt %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced ! \let\multistrut = \strut %% Test to see if parskip is larger than space between lines of ! %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \else \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 *************** *** 1994,1999 **** --- 2189,2196 ---- \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} + + \message{indexing,} % Index generation facilities *************** *** 2006,2019 **** % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for ! % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. \def\newindex #1{ \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file ! \openout \csname#1indfile\endcsname \jobname.#1 % Open the file ! \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\doindex {#1}} } --- 2203,2216 ---- % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for ! % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. \def\newindex #1{ \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file ! \openout \csname#1indfile\endcsname \jobname.#1 % Open the file ! \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\doindex {#1}} } *************** *** 2025,2032 **** \def\newcodeindex #1{ \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file ! \openout \csname#1indfile\endcsname \jobname.#1 % Open the file ! \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\docodeindex {#1}} } --- 2222,2229 ---- \def\newcodeindex #1{ \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file ! \openout \csname#1indfile\endcsname \jobname.#1 % Open the file ! \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\docodeindex {#1}} } *************** *** 2037,2043 **** \def\synindex #1 #2 {% \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname \expandafter\let\csname#1indfile\endcsname=\synindexfoo ! \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\doindex {#2}}% } --- 2234,2240 ---- \def\synindex #1 #2 {% \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname \expandafter\let\csname#1indfile\endcsname=\synindexfoo ! \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\doindex {#2}}% } *************** *** 2046,2052 **** \def\syncodeindex #1 #2 {% \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname \expandafter\let\csname#1indfile\endcsname=\synindexfoo ! \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\docodeindex {#2}}% } --- 2243,2249 ---- \def\syncodeindex #1 #2 {% \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname \expandafter\let\csname#1indfile\endcsname=\synindexfoo ! \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\docodeindex {#2}}% } *************** *** 2094,2120 **** \def\L{\realbackslash L}% \def\ss{\realbackslash ss}% % Take care of texinfo commands likely to appear in an index entry. \def\_{{\realbackslash _}}% \def\w{\realbackslash w }% \def\bf{\realbackslash bf }% ! \def\rm{\realbackslash rm }% \def\sl{\realbackslash sl }% \def\sf{\realbackslash sf}% \def\tt{\realbackslash tt}% \def\gtr{\realbackslash gtr}% \def\less{\realbackslash less}% \def\hat{\realbackslash hat}% ! \def\char{\realbackslash char}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% ! \def\copyright{\realbackslash copyright }% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% \def\samp##1{\realbackslash samp {##1}}% ! \def\t##1{\realbackslash r {##1}}% \def\r##1{\realbackslash r {##1}}% \def\i##1{\realbackslash i {##1}}% \def\b##1{\realbackslash b {##1}}% \def\cite##1{\realbackslash cite {##1}}% \def\key##1{\realbackslash key {##1}}% \def\file##1{\realbackslash file {##1}}% --- 2291,2331 ---- \def\L{\realbackslash L}% \def\ss{\realbackslash ss}% % Take care of texinfo commands likely to appear in an index entry. + % (Must be a way to avoid doing expansion at all, and thus not have to + % laboriously list every single command here.) + \def\@{@}% will be @@ when we switch to @ as escape char. + %\let\{ = \lbracecmd + %\let\} = \rbracecmd \def\_{{\realbackslash _}}% \def\w{\realbackslash w }% \def\bf{\realbackslash bf }% ! %\def\rm{\realbackslash rm }% \def\sl{\realbackslash sl }% \def\sf{\realbackslash sf}% \def\tt{\realbackslash tt}% \def\gtr{\realbackslash gtr}% \def\less{\realbackslash less}% \def\hat{\realbackslash hat}% ! %\def\char{\realbackslash char}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% ! \def\result{\realbackslash result}% ! \def\equiv{\realbackslash equiv}% ! \def\expansion{\realbackslash expansion}% ! \def\print{\realbackslash print}% ! \def\error{\realbackslash error}% ! \def\point{\realbackslash point}% ! \def\copyright{\realbackslash copyright}% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% + \def\dotless##1{\realbackslash dotless {##1}}% \def\samp##1{\realbackslash samp {##1}}% ! \def\,##1{\realbackslash ,{##1}}% ! \def\t##1{\realbackslash t {##1}}% \def\r##1{\realbackslash r {##1}}% \def\i##1{\realbackslash i {##1}}% \def\b##1{\realbackslash b {##1}}% + \def\sc##1{\realbackslash sc {##1}}% \def\cite##1{\realbackslash cite {##1}}% \def\key##1{\realbackslash key {##1}}% \def\file##1{\realbackslash file {##1}}% *************** *** 2122,2127 **** --- 2333,2339 ---- \def\kbd##1{\realbackslash kbd {##1}}% \def\dfn##1{\realbackslash dfn {##1}}% \def\emph##1{\realbackslash emph {##1}}% + \def\value##1{\realbackslash value {##1}}% \unsepspaces } *************** *** 2139,2144 **** --- 2351,2357 ---- \def\indexnofonts{% % Just ignore accents. + \let\,=\indexdummyfont \let\"=\indexdummyfont \let\`=\indexdummyfont \let\'=\indexdummyfont *************** *** 2151,2156 **** --- 2364,2370 ---- \let\u=\indexdummyfont \let\v=\indexdummyfont \let\H=\indexdummyfont + \let\dotless=\indexdummyfont % Take care of the plain tex special European modified letters. \def\oe{oe}% \def\ae{ae}% *************** *** 2184,2189 **** --- 2398,2404 ---- \let\var=\indexdummyfont \let\TeX=\indexdummytex \let\dots=\indexdummydots + \def\@{@}% } % To define \realbackslash, we must make \ not be an escape. *************** *** 2199,2227 **** % workhorse for all \fooindexes % #1 is name of index, #2 is stuff to put there \def\doind #1#2{% ! % Put the index entry in the margin if desired. ! \ifx\SETmarginindex\relax\else% ! \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% ! \fi% ! {\count10=\lastpenalty % ! {\indexdummies % Must do this here, since \bf, etc expand at this stage ! \escapechar=`\\% ! {\let\folio=0% Expand all macros now EXCEPT \folio ! \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now ! % so it will be output as is; and it will print as backslash in the indx. ! % ! % Now process the index-string once, with all font commands turned off, ! % to get the string to sort the index by. ! {\indexnofonts ! \xdef\temp1{#2}% ! }% ! % Now produce the complete index entry. We process the index-string again, ! % this time with font commands expanded, to get what to print in the index. ! \edef\temp{% ! \write \csname#1indfile\endcsname{% ! \realbackslash entry {\temp1}{\folio}{#2}}}% ! \temp }% ! }\penalty\count10}} \def\dosubind #1#2#3{% {\count10=\lastpenalty % --- 2414,2450 ---- % workhorse for all \fooindexes % #1 is name of index, #2 is stuff to put there \def\doind #1#2{% ! % Put the index entry in the margin if desired. ! \ifx\SETmarginindex\relax\else ! \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% ! \fi ! {% ! \count255=\lastpenalty ! {% ! \indexdummies % Must do this here, since \bf, etc expand at this stage ! \escapechar=`\\ ! {% ! \let\folio=0% We will expand all macros now EXCEPT \folio. ! \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now ! % so it will be output as is; and it will print as backslash. ! % ! % First process the index-string with all font commands turned off ! % to get the string to sort by. ! {\indexnofonts \xdef\indexsorttmp{#2}}% ! % ! % Now produce the complete index entry, with both the sort key and the ! % original text, including any font commands. ! \toks0 = {#2}% ! \edef\temp{% ! \write\csname#1indfile\endcsname{% ! \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% ! }% ! \temp ! }% ! }% ! \penalty\count255 ! }% ! } \def\dosubind #1#2#3{% {\count10=\lastpenalty % *************** *** 2275,2308 **** % Define the macros used in formatting output of the sorted index material. ! % This is what you call to cause a particular index to get printed. ! % Write ! % @unnumbered Function Index ! % @printindex fn ! \def\printindex{\parsearg\doprintindex} ! ! \def\doprintindex#1{% ! \tex ! \dobreak \chapheadingskip {10000} ! \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other ! \catcode`\$=\other ! \catcode`\~=\other ! \indexbreaks % ! % The following don't help, since the chars were translated ! % when the raw index was written, and their fonts were discarded ! % due to \indexnofonts. ! %\catcode`\"=\active ! %\catcode`\^=\active ! %\catcode`\_=\active ! %\catcode`\|=\active ! %\catcode`\<=\active ! %\catcode`\>=\active ! % % ! \def\indexbackslash{\rawbackslashxx} ! \indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt ! \begindoublecolumns % % See if the index file exists and is nonempty. \openin 1 \jobname.#1s --- 2498,2513 ---- % Define the macros used in formatting output of the sorted index material. ! % @printindex causes a particular index (the ??s file) to get printed. ! % It does not print any chapter heading (usually an @unnumbered). ! % \def\printindex{\parsearg\doprintindex} ! \def\doprintindex#1{\begingroup ! \dobreak \chapheadingskip{10000}% % ! \indexfonts \rm ! \tolerance = 9500 ! \indexbreaks % % See if the index file exists and is nonempty. \openin 1 \jobname.#1s *************** *** 2312,2318 **** % index. The easiest way to prevent this problem is to make sure % there is some text. (Index is nonexistent) ! \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so --- 2517,2523 ---- % index. The easiest way to prevent this problem is to make sure % there is some text. (Index is nonexistent) ! \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so *************** *** 2321,2333 **** \ifeof 1 (Index is empty) \else \input \jobname.#1s \fi \fi \closein 1 ! \enddoublecolumns ! \Etex ! } % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. --- 2526,2545 ---- \ifeof 1 (Index is empty) \else + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\rawbackslashxx}% + \catcode`\\ = 0 + \catcode`\@ = 11 + \escapechar = `\\ + \begindoublecolumns \input \jobname.#1s + \enddoublecolumns \fi \fi \closein 1 ! \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. *************** *** 2418,2451 **** \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par }} ! %% Define two-column mode, which is used in indexes. ! %% Adapted from the TeXbook, page 416. ! \catcode `\@=11 \newbox\partialpage - \newdimen\doublecolumnhsize ! \def\begindoublecolumns{\begingroup % Grab any single-column material above us. ! \output = {\global\setbox\partialpage ! =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}% \eject % ! % Now switch to the double-column output routine. ! \output={\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the ! % execution time, so we may as well do it once. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant ! % below is chosen so that the gutter has the same value (well, +- < ! % 1pt) as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) --- 2630,2678 ---- \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par }} ! % Define two-column mode, which we use to typeset indexes. ! % Adapted from the TeXbook, page 416, which is to say, ! % the manmac.tex format used to print the TeXbook itself. ! \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize ! \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. ! \output = {\global\setbox\partialpage = \vbox{% ! % ! % Here is a possibility not foreseen in manmac: if we accumulate a ! % whole lot of material, we might end up calling this \output ! % routine twice in a row (see the doublecol-lose test, which is ! % essentially a couple of indexes with @setchapternewpage off). In ! % that case, we must prevent the second \partialpage from ! % simply overwriting the first, causing us to lose the page. ! % This will preserve it until a real output routine can ship it ! % out. Generally, \partialpage will be empty when this runs and ! % this will be a no-op. ! \unvbox\partialpage ! % ! % Unvbox the main output page. ! \unvbox255 ! \kern-\topskip \kern\baselineskip ! }}% \eject % ! % Use the double-column output routine for subsequent pages. ! \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the ! % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant ! % below is chosen so that the gutter has the same value (well, +-<1pt) ! % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) *************** *** 2459,2565 **** % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize - \doublecolumnpagegoal - } - - \def\enddoublecolumns{\eject \endgroup \pagegoal=\vsize \unvbox\partialpage} - - \def\doublecolumnsplit{\splittopskip=\topskip \splitmaxdepth=\maxdepth - \global\dimen@=\pageheight \global\advance\dimen@ by-\ht\partialpage - \global\setbox1=\vsplit255 to\dimen@ \global\setbox0=\vbox{\unvbox1} - \global\setbox3=\vsplit255 to\dimen@ \global\setbox2=\vbox{\unvbox3} - \ifdim\ht0>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi - \ifdim\ht2>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi } - \def\doublecolumnpagegoal{% - \dimen@=\vsize \advance\dimen@ by-2\ht\partialpage \global\pagegoal=\dimen@ - } - \def\pagesofar{\unvbox\partialpage % - \hsize=\doublecolumnhsize % have to restore this since output routine - \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}} \def\doublecolumnout{% ! \setbox5=\copy255 ! {\vbadness=10000 \doublecolumnsplit} ! \ifvbox255 ! \setbox0=\vtop to\dimen@{\unvbox0} ! \setbox2=\vtop to\dimen@{\unvbox2} ! \onepageout\pagesofar \unvbox255 \penalty\outputpenalty ! \else ! \setbox0=\vbox{\unvbox5} ! \ifvbox0 ! \dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip ! \divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdepth ! {\vbadness=10000 ! \loop \global\setbox5=\copy0 ! \setbox1=\vsplit5 to\dimen@ ! \setbox3=\vsplit5 to\dimen@ ! \ifvbox5 \global\advance\dimen@ by1pt \repeat ! \setbox0=\vbox to\dimen@{\unvbox1} ! \setbox2=\vbox to\dimen@{\unvbox3} ! \global\setbox\partialpage=\vbox{\pagesofar} ! \doublecolumnpagegoal ! } ! \fi ! \fi } - \catcode `\@=\other \message{sectioning,} % Define chapters, sections, etc. ! \newcount \chapno ! \newcount \secno \secno=0 ! \newcount \subsecno \subsecno=0 ! \newcount \subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... ! \newcount \appendixno \appendixno = `\@ \def\appendixletter{\char\the\appendixno} ! \newwrite \contentsfile % This is called from \setfilename. ! \def\opencontents{\openout \contentsfile = \jobname.toc} % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise \def\thischapter{} \def\thissection{} ! \def\seccheck#1{\if \pageno<0 % ! \errmessage{@#1 not allowed after generating table of contents}\fi ! % ! } \def\chapternofonts{% ! \let\rawbackslash=\relax% ! \let\frenchspacing=\relax% ! \def\result{\realbackslash result} ! \def\equiv{\realbackslash equiv} ! \def\expansion{\realbackslash expansion} ! \def\print{\realbackslash print} ! \def\TeX{\realbackslash TeX} ! \def\dots{\realbackslash dots} ! \def\copyright{\realbackslash copyright} ! \def\tt{\realbackslash tt} ! \def\bf{\realbackslash bf } ! \def\w{\realbackslash w} ! \def\less{\realbackslash less} ! \def\gtr{\realbackslash gtr} ! \def\hat{\realbackslash hat} ! \def\char{\realbackslash char} ! \def\tclose##1{\realbackslash tclose {##1}} ! \def\code##1{\realbackslash code {##1}} ! \def\samp##1{\realbackslash samp {##1}} ! \def\r##1{\realbackslash r {##1}} ! \def\b##1{\realbackslash b {##1}} ! \def\key##1{\realbackslash key {##1}} ! \def\file##1{\realbackslash file {##1}} ! \def\kbd##1{\realbackslash kbd {##1}} ! % These are redefined because @smartitalic wouldn't work inside xdef. ! \def\i##1{\realbackslash i {##1}} ! \def\cite##1{\realbackslash cite {##1}} ! \def\var##1{\realbackslash var {##1}} ! \def\emph##1{\realbackslash emph {##1}} ! \def\dfn##1{\realbackslash dfn {##1}} } \newcount\absseclevel % used to calculate proper heading level --- 2686,2801 ---- % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } \def\doublecolumnout{% ! \splittopskip=\topskip \splitmaxdepth=\maxdepth ! % Get the available space for the double columns -- the normal ! % (undoubled) page height minus any material left over from the ! % previous page. ! \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage ! % box0 will be the left-hand column, box2 the right. ! \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ ! \onepageout\pagesofar ! \unvbox255 ! \penalty\outputpenalty ! } ! \def\pagesofar{% ! % Re-output the contents of the output page -- any previous material, ! % followed by the two boxes we just split. ! \unvbox\partialpage ! \hsize = \doublecolumnhsize ! \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } + \def\enddoublecolumns{% + \output = {\balancecolumns}\eject % split what we have + \endgroup % started in \begindoublecolumns + % + % Back to normal single-column typesetting, but take account of the + % fact that we just accumulated some stuff on the output page. + \pagegoal = \vsize + } + \def\balancecolumns{% + % Called at the end of the double column material. + \setbox0 = \vbox{\unvbox255}% + \dimen@ = \ht0 + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \divide\dimen@ by 2 + \splittopskip = \topskip + % Loop until we get a decent breakpoint. + {\vbadness=10000 \loop + \global\setbox3=\copy0 + \global\setbox1=\vsplit3 to\dimen@ + \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt + \repeat}% + \setbox0=\vbox to\dimen@{\unvbox1}% + \setbox2=\vbox to\dimen@{\unvbox3}% + \pagesofar + } + \catcode`\@ = \other + \message{sectioning,} % Define chapters, sections, etc. ! \newcount\chapno ! \newcount\secno \secno=0 ! \newcount\subsecno \subsecno=0 ! \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... ! \newcount\appendixno \appendixno = `\@ \def\appendixletter{\char\the\appendixno} ! \newwrite\contentsfile % This is called from \setfilename. ! \def\opencontents{\openout\contentsfile = \jobname.toc } % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise \def\thischapter{} \def\thissection{} ! \def\seccheck#1{\ifnum \pageno<0 ! \errmessage{@#1 not allowed after generating table of contents}% ! \fi} \def\chapternofonts{% ! \let\rawbackslash=\relax ! \let\frenchspacing=\relax ! \def\result{\realbackslash result}% ! \def\equiv{\realbackslash equiv}% ! \def\expansion{\realbackslash expansion}% ! \def\print{\realbackslash print}% ! \def\TeX{\realbackslash TeX}% ! \def\dots{\realbackslash dots}% ! \def\result{\realbackslash result}% ! \def\equiv{\realbackslash equiv}% ! \def\expansion{\realbackslash expansion}% ! \def\print{\realbackslash print}% ! \def\error{\realbackslash error}% ! \def\point{\realbackslash point}% ! \def\copyright{\realbackslash copyright}% ! \def\tt{\realbackslash tt}% ! \def\bf{\realbackslash bf}% ! \def\w{\realbackslash w}% ! \def\less{\realbackslash less}% ! \def\gtr{\realbackslash gtr}% ! \def\hat{\realbackslash hat}% ! \def\char{\realbackslash char}% ! \def\tclose##1{\realbackslash tclose{##1}}% ! \def\code##1{\realbackslash code{##1}}% ! \def\samp##1{\realbackslash samp{##1}}% ! \def\r##1{\realbackslash r{##1}}% ! \def\b##1{\realbackslash b{##1}}% ! \def\key##1{\realbackslash key{##1}}% ! \def\file##1{\realbackslash file{##1}}% ! \def\kbd##1{\realbackslash kbd{##1}}% ! % These are redefined because @smartitalic wouldn't work inside xdef. ! \def\i##1{\realbackslash i{##1}}% ! \def\cite##1{\realbackslash cite{##1}}% ! \def\var##1{\realbackslash var{##1}}% ! \def\emph##1{\realbackslash emph{##1}}% ! \def\dfn##1{\realbackslash dfn{##1}}% } \newcount\absseclevel % used to calculate proper heading level *************** *** 2646,2652 **** % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% {\chapternofonts% ! \edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % --- 2882,2889 ---- % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % *************** *** 2665,2672 **** \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% {\chapternofonts% ! \edef\temp{{\realbackslash chapentry ! {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % --- 2902,2910 ---- \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash chapentry{\the\toks0}% ! {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % *************** *** 2700,2706 **** \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% {\chapternofonts% ! \edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % --- 2938,2945 ---- \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % *************** *** 2715,2722 **** \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% {\chapternofonts% \edef\temp{{\realbackslash secentry % ! {#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % --- 2954,2962 ---- \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% {\chapternofonts% + \toks0 = {#1}% \edef\temp{{\realbackslash secentry % ! {\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % *************** *** 2730,2737 **** \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% {\chapternofonts% \edef\temp{{\realbackslash secentry % ! {#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % --- 2970,2978 ---- \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% {\chapternofonts% + \toks0 = {#1}% \edef\temp{{\realbackslash secentry % ! {\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % *************** *** 2743,2749 **** \def\unnumberedseczzz #1{\seccheck{unnumberedsec}% \plainsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % --- 2984,2991 ---- \def\unnumberedseczzz #1{\seccheck{unnumberedsec}% \plainsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % *************** *** 2756,2763 **** \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% {\chapternofonts% \edef\temp{{\realbackslash subsecentry % ! {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % --- 2998,3006 ---- \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% {\chapternofonts% + \toks0 = {#1}% \edef\temp{{\realbackslash subsecentry % ! {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % *************** *** 2770,2777 **** \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% {\chapternofonts% \edef\temp{{\realbackslash subsecentry % ! {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % --- 3013,3021 ---- \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% {\chapternofonts% + \toks0 = {#1}% \edef\temp{{\realbackslash subsecentry % ! {\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % *************** *** 2781,2789 **** \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% ! \plainsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % --- 3025,3034 ---- \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% ! \plainsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % *************** *** 2797,2804 **** \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% ! \edef\temp{{\realbackslash subsubsecentry % ! {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} {\noexpand\folio}}}% \escapechar=`\\% --- 3042,3049 ---- \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash subsubsecentry{\the\toks0} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} {\noexpand\folio}}}% \escapechar=`\\% *************** *** 2814,2820 **** \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% ! \edef\temp{{\realbackslash subsubsecentry{#1}% {\appendixletter} {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% \escapechar=`\\% --- 3059,3066 ---- \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash subsubsecentry{\the\toks0}% {\appendixletter} {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% \escapechar=`\\% *************** *** 2826,2834 **** \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% ! \plainsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % --- 3072,3081 ---- \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% ! \plainsubsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % *************** *** 2864,2873 **** % NOTE on use of \vbox for chapter headings, section headings, and % such: ! % 1) We use \vbox rather than the earlier \line to permit ! % overlong headings to fold. ! % 2) \hyphenpenalty is set to 10000 because hyphenation in a ! % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. --- 3111,3120 ---- % NOTE on use of \vbox for chapter headings, section headings, and % such: ! % 1) We use \vbox rather than the earlier \line to permit ! % overlong headings to fold. ! % 2) \hyphenpenalty is set to 10000 because hyphenation in a ! % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. *************** *** 2885,2895 **** \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 200} ! \def\heading{\parsearg\secheadingi} ! ! \def\subheading{\parsearg\subsecheadingi} ! ! \def\subsubheading{\parsearg\subsubsecheadingi} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), --- 3132,3141 ---- \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 200} ! % @heading, @subheading, @subsubheading. ! \def\heading{\parsearg\plainsecheading} ! \def\subheading{\parsearg\plainsubsecheading} ! \def\subsubheading{\parsearg\plainsubsubsecheading} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), *************** *** 2903,2909 **** %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) ! \newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} --- 3149,3155 ---- %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) ! \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} *************** *** 2912,2926 **** --- 3158,3175 ---- \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{ + \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{ + \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{ + \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} *************** *** 2932,2961 **** \global\let\unnumbchapmacro=\unnchfplain \global\let\centerchapmacro=\centerchfplain} ! \def\chfplain #1#2{% \pchapsepmacro {% ! \chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #2\enspace #1}% }% ! \bigskip ! \penalty5000 } ! \def\unnchfplain #1{% ! \pchapsepmacro % ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 10000 % ! } ! \def\centerchfplain #1{% ! \pchapsepmacro % ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt ! {\rm #1}\hfill}}\bigskip \par\penalty 10000 % ! } \CHAPFplain % The default --- 3181,3215 ---- \global\let\unnumbchapmacro=\unnchfplain \global\let\centerchapmacro=\centerchfplain} ! % Plain chapter opening. ! % #1 is the text, #2 the chapter number or empty if unnumbered. ! \def\chfplain#1#2{% \pchapsepmacro {% ! \chapfonts \rm ! \def\chapnum{#2}% ! \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% ! \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright ! \hangindent = \wd0 \centerparametersmaybe ! \unhbox0 #1\par}% }% ! \nobreak\bigskip % no page break after a chapter title ! \nobreak } ! % Plain opening for unnumbered. ! \def\unnchfplain#1{\chfplain{#1}{}} ! % @centerchap -- centered and unnumbered. ! \let\centerparametersmaybe = \relax ! \def\centerchfplain#1{{% ! \def\centerparametersmaybe{% ! \advance\rightskip by 3\rightskip ! \leftskip = \rightskip ! \parfillskip = 0pt ! }% ! \chfplain{#1}{}% ! }} \CHAPFplain % The default *************** *** 2981,3051 **** \global\let\unnumbchapmacro=\unnchfopen \global\let\centerchapmacro=\centerchfopen} - % Parameter controlling skip before section headings. - - \newskip \subsecheadingskip \subsecheadingskip = 17pt plus 8pt minus 4pt - \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} ! \newskip \secheadingskip \secheadingskip = 21pt plus 8pt minus 4pt \def\secheadingbreak{\dobreak \secheadingskip {-1000}} ! % @paragraphindent is defined for the Info formatting commands only. ! \let\paragraphindent=\comment ! % Section fonts are the base font at magstep2, which produces ! % a size a bit more than 14 points in the default situation. ! \def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}} ! \def\plainsecheading #1{\secheadingi {#1}} ! \def\secheadingi #1{{\advance \secheadingskip by \parskip % ! \secheadingbreak}% ! {\secfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}% ! \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } ! ! ! % Subsection fonts are the base font at magstep1, ! % which produces a size of 12 points. ! ! \def\subsecheading #1#2#3#4{\subsecheadingi {#2.#3.#4\enspace #1}} ! \def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip % ! \subsecheadingbreak}% ! {\subsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}% ! \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } ! ! \def\subsubsecfonts{\subsecfonts} % Maybe this should change: ! % Perhaps make sssec fonts scaled ! % magstep half ! \def\subsubsecheading #1#2#3#4#5{\subsubsecheadingi {#2.#3.#4.#5\enspace #1}} ! \def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip % ! \subsecheadingbreak}% ! {\subsubsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}% ! \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000} \message{toc printing,} - % Finish up the main text and prepare to read what we've written % to \contentsfile. \newskip\contentsrightmargin \contentsrightmargin=1in \def\startcontents#1{% ! \pagealignmacro \immediate\closeout \contentsfile \ifnum \pageno>0 ! \pageno = -1 % Request roman numbered pages. \fi % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% ! \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 ! \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. } --- 3235,3308 ---- \global\let\unnumbchapmacro=\unnchfopen \global\let\centerchapmacro=\centerchfopen} ! % Section titles. ! \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip {-1000}} + \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} + \def\plainsecheading#1{\sectionheading{sec}{}{#1}} ! % Subsection titles. ! \newskip \subsecheadingskip ! \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} ! \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} ! \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} ! % Subsubsection titles. ! \let\subsubsecheadingskip = \subsecheadingskip ! \let\subsubsecheadingbreak = \subsecheadingbreak ! \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} ! \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} ! ! % Print any size section title. ! % ! % #1 is the section type (sec/subsec/subsubsec), #2 is the section ! % number (maybe empty), #3 the text. ! \def\sectionheading#1#2#3{% ! {% ! \expandafter\advance\csname #1headingskip\endcsname by \parskip ! \csname #1headingbreak\endcsname ! }% ! {% ! % Switch to the right set of fonts. ! \csname #1fonts\endcsname \rm ! % ! % Only insert the separating space if we have a section number. ! \def\secnum{#2}% ! \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% ! % ! \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright ! \hangindent = \wd0 % zero if no section number ! \unhbox0 #3}% ! }% ! \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak ! } \message{toc printing,} % Finish up the main text and prepare to read what we've written % to \contentsfile. \newskip\contentsrightmargin \contentsrightmargin=1in \def\startcontents#1{% ! % If @setchapternewpage on, and @headings double, the contents should ! % start on an odd page, unlike chapters. Thus, we maintain ! % \contentsalignmacro in parallel with \pagealignmacro. ! % From: Torbjorn Granlund ! \contentsalignmacro \immediate\closeout \contentsfile \ifnum \pageno>0 ! \pageno = -1 % Request roman numbered pages. \fi % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% ! \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 ! % We can't do this, because then an actual ^ in a section ! % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. ! %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. } *************** *** 3069,3074 **** --- 3326,3332 ---- \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \rm + \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\secentry ##1##2##3##4{} \def\unnumbsecentry ##1##2{} *************** *** 3112,3118 **** % This space should be plenty, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % (This space doesn't include the extra space that gets added after ! % the label; that gets put in in \shortchapentry above.) \advance\dimen0 by 1.1em \hbox to \dimen0{#1\hfil}% } --- 3370,3376 ---- % This space should be plenty, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % (This space doesn't include the extra space that gets added after ! % the label; that gets put in by \shortchapentry above.) \advance\dimen0 by 1.1em \hbox to \dimen0{#1\hfil}% } *************** *** 3133,3154 **** \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} - % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % ! % If the toc has to be broken over pages, we would want to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% ! \penalty-300 \vskip\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno{#2}}% \endgroup ! \nobreak\vskip .25\baselineskip } \def\dosecentry#1#2{\begingroup --- 3391,3411 ---- \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % ! % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% ! \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno{#2}}% \endgroup ! \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup *************** *** 3173,3179 **** % % \turnoffactive is for the sake of @" used for umlauts. \def\tocentry#1#2{\begingroup ! \hyphenpenalty = 10000 \entry{\turnoffactive #1}{\turnoffactive #2}% \endgroup} --- 3430,3436 ---- % % \turnoffactive is for the sake of @" used for umlauts. \def\tocentry#1#2{\begingroup ! \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks \entry{\turnoffactive #1}{\turnoffactive #2}% \endgroup} *************** *** 3198,3205 **** \newbox\pushcharbox \newbox\bullbox \newbox\equivbox \newbox\errorbox - \let\ptexequiv = \equiv - %{\tentt %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} --- 3455,3460 ---- *************** *** 3210,3221 **** % depth .1ex\hfil} %} \def\point{$\star$} - \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} - \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % Adapted from the TeXbook's \boxit. --- 3465,3475 ---- % depth .1ex\hfil} %} + % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % Adapted from the TeXbook's \boxit. *************** *** 3247,3253 **** \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie \catcode `\%=14 ! \catcode 43=12 \catcode`\"=12 \catcode`\==12 \catcode`\|=12 --- 3501,3507 ---- \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie \catcode `\%=14 ! \catcode 43=12 % plus \catcode`\"=12 \catcode`\==12 \catcode`\|=12 *************** *** 3255,3272 **** \catcode`\>=12 \escapechar=`\\ % ! \let\~=\ptextilde \let\{=\ptexlbrace \let\}=\ptexrbrace \let\.=\ptexdot \let\*=\ptexstar \let\dots=\ptexdots ! \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}} ! \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi} \def\@{@}% \let\bullet=\ptexbullet ! \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl ! \let\L=\ptexL % \let\Etex=\endgroup} --- 3509,3525 ---- \catcode`\>=12 \escapechar=`\\ % ! \let\,=\ptexcomma \let\{=\ptexlbrace \let\}=\ptexrbrace \let\.=\ptexdot \let\*=\ptexstar \let\dots=\ptexdots ! \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% ! \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% \let\bullet=\ptexbullet ! \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext % \let\Etex=\endgroup} *************** *** 3325,3374 **** \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip ! \ctl\leaders\hrule height\circthick\hfil\ctr ! \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip ! \cbl\leaders\hrule height\circthick\hfil\cbr ! \hskip\rskip}} % \newskip\lskip\newskip\rskip \long\def\cartouche{% \begingroup ! \lskip=\leftskip \rskip=\rightskip ! \leftskip=0pt\rightskip=0pt %we want these *outside*. ! \cartinner=\hsize \advance\cartinner by-\lskip ! \advance\cartinner by-\rskip ! \cartouter=\hsize ! \advance\cartouter by 18pt % allow for 3pt kerns on either ! % side, and for 6pt waste from ! % each corner char ! \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip ! % Flag to tell @lisp, etc., not to narrow margin. ! \let\nonarrowing=\comment ! \vbox\bgroup ! \baselineskip=0pt\parskip=0pt\lineskip=0pt ! \carttop ! \hbox\bgroup ! \hskip\lskip ! \vrule\kern3pt ! \vbox\bgroup ! \hsize=\cartinner ! \kern3pt ! \begingroup ! \baselineskip=\normbskip ! \lineskip=\normlskip ! \parskip=\normpskip ! \vskip -\parskip \def\Ecartouche{% ! \endgroup ! \kern3pt ! \egroup ! \kern3pt\vrule ! \hskip\rskip ! \egroup ! \cartbot ! \egroup \endgroup }} --- 3578,3627 ---- \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip ! \ctl\leaders\hrule height\circthick\hfil\ctr ! \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip ! \cbl\leaders\hrule height\circthick\hfil\cbr ! \hskip\rskip}} % \newskip\lskip\newskip\rskip \long\def\cartouche{% \begingroup ! \lskip=\leftskip \rskip=\rightskip ! \leftskip=0pt\rightskip=0pt %we want these *outside*. ! \cartinner=\hsize \advance\cartinner by-\lskip ! \advance\cartinner by-\rskip ! \cartouter=\hsize ! \advance\cartouter by 18pt % allow for 3pt kerns on either ! % side, and for 6pt waste from ! % each corner char ! \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip ! % Flag to tell @lisp, etc., not to narrow margin. ! \let\nonarrowing=\comment ! \vbox\bgroup ! \baselineskip=0pt\parskip=0pt\lineskip=0pt ! \carttop ! \hbox\bgroup ! \hskip\lskip ! \vrule\kern3pt ! \vbox\bgroup ! \hsize=\cartinner ! \kern3pt ! \begingroup ! \baselineskip=\normbskip ! \lineskip=\normlskip ! \parskip=\normpskip ! \vskip -\parskip \def\Ecartouche{% ! \endgroup ! \kern3pt ! \egroup ! \kern3pt\vrule ! \hskip\rskip ! \egroup ! \cartbot ! \egroup \endgroup }} *************** *** 3404,3414 **** % \def\nonfillfinish{\afterenvbreak\endgroup}% - % This macro is \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt \rawbackslash % have \ input char produce \ char from current font \gobble } --- 3657,3668 ---- % \def\nonfillfinish{\afterenvbreak\endgroup}% \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt + % Make @kbd do something special, if requested. + \let\kbdfont\kbdexamplefont \rawbackslash % have \ input char produce \ char from current font \gobble } *************** *** 3431,3438 **** \let\Esmalllisp = \nonfillfinish \let\Esmallexample = \nonfillfinish % ! % Smaller interline space and fonts for small examples. ! \setleading{10pt}% \indexfonts \tt \rawbackslash % make \ output the \ character from the current font (tt) \gobble --- 3685,3691 ---- \let\Esmalllisp = \nonfillfinish \let\Esmallexample = \nonfillfinish % ! % Smaller fonts for small examples. \indexfonts \tt \rawbackslash % make \ output the \ character from the current font (tt) \gobble *************** *** 3527,3542 **** % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. ! \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested % ! \global\advance\parencount by 1 } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. ! % also in that case restore the outer-level definition of (. ! \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi ! \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % --- 3780,3796 ---- % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. ! \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested ! \global\advance\parencount by 1 ! } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. ! % also in that case restore the outer-level definition of (. ! \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi ! \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % *************** *** 3544,3551 **** } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] ! \def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&} ! \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} % First, defname, which formats the header line itself. % #1 should be the function name. --- 3798,3808 ---- } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] ! \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } ! \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } ! \def\ampnr{\&} ! \def\lbrb{{\bf\char`\[}} ! \def\rbrb{{\bf\char`\]}} % First, defname, which formats the header line itself. % #1 should be the function name. *************** *** 3638,3644 **** % This is used for \def{tp,vr}parsebody. It could probably be used for % some of the others, too, with some judicious conditionals. ! % \def\parsebodycommon#1#2#3{% \begingroup\inENV % \medbreak % --- 3895,3901 ---- % This is used for \def{tp,vr}parsebody. It could probably be used for % some of the others, too, with some judicious conditionals. ! % \def\parsebodycommon#1#2#3{% \begingroup\inENV % \medbreak % *************** *** 3672,3688 **** } % Fine, but then we have to eventually remove the \empty *and* the ! % braces (if any). That's what this does, putting the result in \tptemp. ! % ! \def\removeemptybraces\empty#1\relax{\def\tptemp{#1}}% % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. ! % \def\parsetpheaderline#1#2#3{% ! \removeemptybraces#2\relax ! #1{\tptemp}{#3}% }% \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % --- 3929,3944 ---- } % Fine, but then we have to eventually remove the \empty *and* the ! % braces (if any). That's what this does. ! % ! \def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. ! % \def\parsetpheaderline#1#2#3{% ! #1{\removeemptybraces#2\relax}{#3}% }% \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % *************** *** 3723,3729 **** \hyphenchar\tensl=0 #1% \hyphenchar\tensl=45 ! \ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\penalty 10000\vskip -\parskip\penalty 10000% --- 3979,3985 ---- \hyphenchar\tensl=0 #1% \hyphenchar\tensl=45 ! \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\penalty 10000\vskip -\parskip\penalty 10000% *************** *** 3824,3829 **** --- 4080,4086 ---- \def\defmacx #1 {\errmessage{@defmacx in invalid context}} \def\defspecx #1 {\errmessage{@defspecx in invalid context}} \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}} + \def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}} \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}} % @defmethod, and so on *************** *** 3839,3844 **** --- 4096,4111 ---- \defunargs {#3}\endgroup % } + % @deftypemethod foo-class return-type foo-method args + % + \def\deftypemethod{% + \defmethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} + % + % #1 is the class name, #2 the data type, #3 the method name, #4 the args. + \def\deftypemethodheader#1#2#3#4{% + \deftypefnheaderx{Method on #1}{#2}#3 #4\relax + } + % @defmethod == @defop Method \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} *************** *** 3916,3934 **** \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} ! % #1 is the data type. #2 is the name. \def\deftypevarheader #1#2{% ! \doind {vr}{\code{#2}}% Make entry in variables index \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}% \interlinepenalty=10000 \endgraf\penalty 10000\vskip -\parskip\penalty 10000 \endgroup} % @deftypevr {Global Flag} int enable \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} ! \def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}% \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} \interlinepenalty=10000 \endgraf\penalty 10000\vskip -\parskip\penalty 10000 --- 4183,4203 ---- \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} ! % #1 is the data type. #2 is the name, perhaps followed by text that ! % is actually part of the data type, which should not be put into the index. \def\deftypevarheader #1#2{% ! \dovarind#2 \relax% Make entry in variables index \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}% \interlinepenalty=10000 \endgraf\penalty 10000\vskip -\parskip\penalty 10000 \endgroup} + \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} % @deftypevr {Global Flag} int enable \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} ! \def\deftypevrheader #1#2#3{\dovarind#3 \relax% \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} \interlinepenalty=10000 \endgraf\penalty 10000\vskip -\parskip\penalty 10000 *************** *** 3960,3965 **** --- 4229,4235 ---- \def\deftpx #1 {\errmessage{@deftpx in invalid context}} + \message{cross reference,} % Define cross-reference macros \newwrite \auxfile *************** *** 3967,3972 **** --- 4237,4247 ---- \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. + % @inforef is simple. + \def\inforef #1{\inforefzzz #1,,,,**} + \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + % \setref{foo} defines a cross-reference point named foo. \def\setref#1{% *************** *** 4045,4051 **** % Use \turnoffactive so that punctuation chars such as underscore % work in node names. ! \def\dosetq #1#2{{\let\folio=0 \turnoffactive \auxhat% \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% \next}} --- 4320,4326 ---- % Use \turnoffactive so that punctuation chars such as underscore % work in node names. ! \def\dosetq #1#2{{\let\folio=0 \turnoffactive \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% \next}} *************** *** 4114,4197 **** #2% Output the suffix in any case. } - % Read the last existing aux file, if any. No error if none exists. - % This is the macro invoked by entries in the aux file. ! \def\xrdef #1#2{ ! {\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}} ! \def\readauxfile{% ! \begingroup ! \catcode `\^^@=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\^^C=\other ! \catcode `\^^D=\other ! \catcode `\^^E=\other ! \catcode `\^^F=\other ! \catcode `\^^G=\other ! \catcode `\^^H=\other ! \catcode `\ =\other ! \catcode `\^^L=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode `\=\other ! \catcode 26=\other ! \catcode `\^^[=\other ! \catcode `\^^\=\other ! \catcode `\^^]=\other ! \catcode `\^^^=\other ! \catcode `\^^_=\other ! \catcode `\@=\other ! \catcode `\^=\other ! \catcode `\~=\other ! \catcode `\[=\other ! \catcode `\]=\other ! \catcode`\"=\other ! \catcode`\_=\other ! \catcode`\|=\other ! \catcode`\<=\other ! \catcode`\>=\other ! \catcode `\$=\other ! \catcode `\#=\other ! \catcode `\&=\other ! % `\+ does not work, so use 43. ! \catcode 43=\other ! % Make the characters 128-255 be printing characters ! {% ! \count 1=128 ! \def\loop{% ! \catcode\count 1=\other ! \advance\count 1 by 1 ! \ifnum \count 1<256 \loop \fi }% ! }% ! % the aux file uses ' as the escape. ! % Turn off \ as an escape so we do not lose on ! % entries which were dumped with control sequences in their names. ! % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ ! % Reference to such entries still does not work the way one would wish, ! % but at least they do not bomb out when the aux file is read in. ! \catcode `\{=1 \catcode `\}=2 ! \catcode `\%=\other ! \catcode `\'=0 ! \catcode`\^=7 % to make ^^e4 etc usable in xref tags ! \catcode `\\=\other ! \openin 1 \jobname.aux ! \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue ! \global\warnedobstrue ! \fi ! % Open the new aux file. Tex will close it automatically at exit. ! \openout \auxfile=\jobname.aux \endgroup} --- 4389,4487 ---- #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. ! \def\xrdef #1#2{{% ! \catcode`\'=\other ! \expandafter\gdef\csname X#1\endcsname{#2}% ! }} ! % Read the last existing aux file, if any. No error if none exists. ! \def\readauxfile{\begingroup ! \catcode`\^^@=\other ! \catcode`\^^A=\other ! \catcode`\^^B=\other ! \catcode`\^^C=\other ! \catcode`\^^D=\other ! \catcode`\^^E=\other ! \catcode`\^^F=\other ! \catcode`\^^G=\other ! \catcode`\^^H=\other ! \catcode`\^^K=\other ! \catcode`\^^L=\other ! \catcode`\^^N=\other ! \catcode`\^^P=\other ! \catcode`\^^Q=\other ! \catcode`\^^R=\other ! \catcode`\^^S=\other ! \catcode`\^^T=\other ! \catcode`\^^U=\other ! \catcode`\^^V=\other ! \catcode`\^^W=\other ! \catcode`\^^X=\other ! \catcode`\^^Z=\other ! \catcode`\^^[=\other ! \catcode`\^^\=\other ! \catcode`\^^]=\other ! \catcode`\^^^=\other ! \catcode`\^^_=\other ! \catcode`\@=\other ! \catcode`\^=\other ! % It was suggested to define this as 7, which would allow ^^e4 etc. ! % in xref tags, i.e., node names. But since ^^e4 notation isn't ! % supported in the main text, it doesn't seem desirable. Furthermore, ! % that is not enough: for node names that actually contain a ^ ! % character, we would end up writing a line like this: 'xrdef {'hat ! % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first ! % argument, and \hat is not an expandable control sequence. It could ! % all be worked out, but why? Either we support ^^ or we don't. ! % ! % The other change necessary for this was to define \auxhat: ! % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter ! % and then to call \auxhat in \setq. ! % ! \catcode`\~=\other ! \catcode`\[=\other ! \catcode`\]=\other ! \catcode`\"=\other ! \catcode`\_=\other ! \catcode`\|=\other ! \catcode`\<=\other ! \catcode`\>=\other ! \catcode`\$=\other ! \catcode`\#=\other ! \catcode`\&=\other ! % `\+ does not work, so use 43. ! \catcode43=\other ! % Make the characters 128-255 be printing characters ! {% ! \count 1=128 ! \def\loop{% ! \catcode\count 1=\other ! \advance\count 1 by 1 ! \ifnum \count 1<256 \loop \fi ! }% }% ! % The aux file uses ' as the escape (for now). ! % Turn off \ as an escape so we do not lose on ! % entries which were dumped with control sequences in their names. ! % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ ! % Reference to such entries still does not work the way one would wish, ! % but at least they do not bomb out when the aux file is read in. ! \catcode`\{=1 ! \catcode`\}=2 ! \catcode`\%=\other ! \catcode`\'=0 ! \catcode`\\=\other ! % ! \openin 1 \jobname.aux ! \ifeof 1 \else ! \closein 1 ! \input \jobname.aux ! \global\havexrefstrue ! \global\warnedobstrue ! \fi ! % Open the new aux file. TeX will close it automatically at exit. ! \openout\auxfile=\jobname.aux \endgroup} *************** *** 4202,4211 **** % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is ! % removed. \def\supereject{\par\penalty -20000\footnoteno =0 } ! % @footnotestyle is meaningful for info output only.. \let\footnotestyle=\comment \let\ptexfootnote=\footnote --- 4492,4502 ---- % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is ! % removed. (Generally, numeric constants should always be followed by a ! % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } ! % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment \let\ptexfootnote=\footnote *************** *** 4231,4237 **** % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % ! \long\gdef\footnotezzz#1{\insert\footins{% % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. --- 4522,4532 ---- % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % ! % Oh yes, they do; otherwise, @ifset and anything else that uses ! % \parseargline fail inside footnotes because the tokens are fixed when ! % the footnote is read. --karl, 16nov96. ! % ! \long\gdef\footnotezzz{\insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. *************** *** 4253,4260 **** % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut ! #1\strut}% } }%end \catcode `\@=11 --- 4548,4560 ---- % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut ! \futurelet\next\fo@t } + \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t + \else\let\next\f@t\fi \next} + \def\f@@t{\bgroup\aftergroup\@foot\let\next} + \def\f@t#1{#1\@foot} + \def\@foot{\strut\egroup} }%end \catcode `\@=11 *************** *** 4311,4319 **** --- 4611,4661 ---- % \def\finalout{\overfullrule=0pt} + % @image. We use the macros from epsf.tex to support this. + % If epsf.tex is not installed and @image is used, we complain. + % + % Check for and read epsf.tex up front. If we read it only at @image + % time, we might be inside a group, and then its definitions would get + % undone and the next image would fail. + \openin 1 = xepsf.tex + \ifeof 1 \else + \closein 1 + \def\epsfannounce{\toks0 = }% do not bother showing banner + \input epsf.tex + \fi + % + \newif\ifwarnednoepsf + \newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://ftp.tug.org/tex/epsf.tex.} + % + % Only complain once about lack of epsf.tex. + \def\image#1{% + \ifx\epsfbox\undefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,\finish + \fi + } + % + % Arguments to @image: + % #1 is (mandatory) image filename; we tack on .eps extension. + % #2 is (optional) width, #3 is (optional) height. + % #4 is just the usual extra ignored arg for parsing this stuff. + \def\imagexxx#1,#2,#3,#4\finish{% + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + } % End of control word definitions. + \message{and turning on texinfo input format.} \def\openindices{% *************** *** 4327,4339 **** % Set some numeric style parameters, for 8.5 x 11 format. ! %\hsize = 6.5in \newdimen\defaultparindent \defaultparindent = 15pt \parindent = \defaultparindent ! \parskip 18pt plus 1pt ! \setleading{15pt} \advance\topskip by 1.2cm % Prevent underfull vbox error messages. \vbadness=10000 --- 4669,4686 ---- % Set some numeric style parameters, for 8.5 x 11 format. ! \hsize = 6in ! \hoffset = .25in \newdimen\defaultparindent \defaultparindent = 15pt \parindent = \defaultparindent ! \parskip 3pt plus 2pt minus 1pt ! \setleading{13.2pt} \advance\topskip by 1.2cm + \chapheadingskip = 15pt plus 4pt minus 2pt + \secheadingskip = 12pt plus 3pt minus 2pt + \subsecheadingskip = 9pt plus 2pt minus 2pt + % Prevent underfull vbox error messages. \vbadness=10000 *************** *** 4356,4385 **** % Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25) \def\smallbook{ ! ! % These values for secheadingskip and subsecheadingskip are ! % experiments. RJC 7 Aug 1992 ! \global\secheadingskip = 17pt plus 6pt minus 3pt ! \global\subsecheadingskip = 14pt plus 6pt minus 3pt ! ! \global\lispnarrowing = 0.3in ! \setleading{12pt} ! \advance\topskip by -1cm ! \global\parskip 3pt plus 1pt ! \global\hsize = 5in ! \global\vsize=7.5in ! \global\tolerance=700 ! \global\hfuzz=1pt ! \global\contentsrightmargin=0pt ! \global\deftypemargin=0pt ! \global\defbodyindent=.5cm ! ! \global\pagewidth=\hsize ! \global\pageheight=\vsize ! ! \global\let\smalllisp=\smalllispx ! \global\let\smallexample=\smalllispx ! \global\def\Esmallexample{\Esmalllisp} } % Use @afourpaper to print on European A4 paper. --- 4703,4730 ---- % Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25) \def\smallbook{ ! \global\chapheadingskip = 15pt plus 4pt minus 2pt ! \global\secheadingskip = 12pt plus 3pt minus 2pt ! \global\subsecheadingskip = 9pt plus 2pt minus 2pt ! % ! \global\lispnarrowing = 0.3in ! \setleading{12pt} ! \advance\topskip by -1cm ! \global\parskip 2pt plus 1pt ! \global\hsize = 5in ! \global\vsize=7.5in ! \global\tolerance=700 ! \global\hfuzz=1pt ! \global\contentsrightmargin=0pt ! \global\deftypemargin=0pt ! \global\defbodyindent=.5cm ! % ! \global\pagewidth=\hsize ! \global\pageheight=\vsize ! % ! \global\let\smalllisp=\smalllispx ! \global\let\smallexample=\smalllispx ! \global\def\Esmallexample{\Esmalllisp} } % Use @afourpaper to print on European A4 paper. *************** *** 4402,4407 **** --- 4747,4757 ---- \global\pageheight=\vsize } + \bindingoffset=0pt + \normaloffset=\hoffset + \pagewidth=\hsize + \pageheight=\vsize + % Allow control of the text dimensions. Parameters in order: textheight; % textwidth; voffset; hoffset; binding offset; topskip. % All require a dimension; *************** *** 4478,4484 **** \def~{{\tt \char '176}} \chardef\hat=`\^ \catcode`\^=\active - \def\auxhat{\def^{'hat}} \def^{{\tt \hat}} \catcode`\_=\active --- 4828,4833 ---- diff -crP ../make-3.75/variable.c ./variable.c *** ../make-3.75/variable.c Sat Jun 22 15:26:59 1996 --- ./variable.c Wed Aug 27 16:31:26 1997 *************** *** 1,5 **** /* Internals of variables for GNU Make. ! Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Internals of variables for GNU Make. ! Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 22,28 **** #include "job.h" #include "commands.h" #include "variable.h" ! #ifdef WIN32 #include "pathstuff.h" #endif --- 22,28 ---- #include "job.h" #include "commands.h" #include "variable.h" ! #ifdef WINDOWS32 #include "pathstuff.h" #endif *************** *** 333,340 **** merge_variable_sets (list0->set, next->set); - free ((char *) next); - last0 = list0; list0 = list0->next; } --- 333,338 ---- *************** *** 354,360 **** void define_automatic_variables () { ! #ifdef WIN32 extern char* default_shell; #else extern char default_shell[]; --- 352,358 ---- void define_automatic_variables () { ! #ifdef WINDOWS32 extern char* default_shell; #else extern char default_shell[]; *************** *** 373,384 **** --- 371,409 ---- ? "" : remote_description); (void) define_variable ("MAKE_VERSION", 12, buf, o_default, 0); + #ifdef __MSDOS__ + /* Allow to specify a special shell just for Make, + and use $COMSPEC as the default $SHELL when appropriate. */ + { + static char shell_str[] = "SHELL"; + const int shlen = sizeof (shell_str) - 1; + struct variable *mshp = lookup_variable ("MAKESHELL", 9); + struct variable *comp = lookup_variable ("COMSPEC", 7); + + /* Make $MAKESHELL override $SHELL even if -e is in effect. */ + if (mshp) + (void) define_variable (shell_str, shlen, + mshp->value, o_env_override, 0); + else if (comp) + { + /* $COMSPEC shouldn't override $SHELL. */ + struct variable *shp = lookup_variable (shell_str, shlen); + + if (!shp) + (void) define_variable (shell_str, shlen, comp->value, o_env, 0); + } + } + #endif /* This won't override any definition, but it will provide one if there isn't one there. */ v = define_variable ("SHELL", 5, default_shell, o_default, 0); v->export = v_export; /* Always export SHELL. */ + /* On MSDOS we do use SHELL from environment, since + it isn't a standard environment variable on MSDOS, + so whoever sets it, does that on purpose. */ + #ifndef __MSDOS__ /* Don't let SHELL come from the environment. */ if (*v->value == '\0' || v->origin == o_env || v->origin == o_env_override) { *************** *** 386,391 **** --- 411,417 ---- v->origin = o_file; v->value = savestring (default_shell, strlen (default_shell)); } + #endif /* Make sure MAKEFILES gets exported if it is set. */ v = define_variable ("MAKEFILES", 9, "", o_default, 0); *************** *** 546,565 **** && v->origin != o_env && v->origin != o_env_override) { char *value = recursively_expand (v); ! #ifdef WIN32 if (strcmp(v->name, "Path") == 0 || strcmp(v->name, "PATH") == 0) ! convert_Path_to_win32(value, ';'); #endif result[nvariables++] = concat (v->name, "=", value); free (value); } else ! #ifdef WIN32 { if (strcmp(v->name, "Path") == 0 || strcmp(v->name, "PATH") == 0) ! convert_Path_to_win32(v->value, ';'); result[nvariables++] = concat (v->name, "=", v->value); } #else --- 572,591 ---- && v->origin != o_env && v->origin != o_env_override) { char *value = recursively_expand (v); ! #ifdef WINDOWS32 if (strcmp(v->name, "Path") == 0 || strcmp(v->name, "PATH") == 0) ! convert_Path_to_windows32(value, ';'); #endif result[nvariables++] = concat (v->name, "=", value); free (value); } else ! #ifdef WINDOWS32 { if (strcmp(v->name, "Path") == 0 || strcmp(v->name, "PATH") == 0) ! convert_Path_to_windows32(v->value, ';'); result[nvariables++] = concat (v->name, "=", v->value); } #else *************** *** 734,739 **** --- 760,847 ---- } } + #ifdef __MSDOS__ + /* Many Unix Makefiles include a line saying "SHELL=/bin/sh", but + non-Unix systems don't conform to this default configuration (in + fact, most of them don't even have `/bin'). On the other hand, + $SHELL in the environment, if set, points to the real pathname of + the shell. + Therefore, we generally won't let lines like "SHELL=/bin/sh" from + the Makefile override $SHELL from the environment. But first, we + look for the basename of the shell in the directory where SHELL= + points, and along the $PATH; if it is found in any of these places, + we define $SHELL to be the actual pathname of the shell. Thus, if + you have bash.exe installed as d:/unix/bash.exe, and d:/unix is on + your $PATH, then SHELL=/usr/local/bin/bash will have the effect of + defining SHELL to be "d:/unix/bash.exe". */ + if (origin == o_file + && strcmp (expanded_name, "SHELL") == 0) + { + char shellpath[PATH_MAX]; + extern char * __dosexec_find_on_path (const char *, char *[], char *); + + /* See if we can find "/bin/sh.exe", "/bin/sh.com", etc. */ + if (__dosexec_find_on_path (value, (char **)0, shellpath)) + { + char *p; + + for (p = shellpath; *p; p++) + { + if (*p == '\\') + *p = '/'; + } + v = define_variable (expanded_name, strlen (expanded_name), + shellpath, origin, flavor == recursive); + } + else + { + char *shellbase, *bslash; + struct variable *pathv = lookup_variable ("PATH", 4); + char *path_string; + char *fake_env[2]; + size_t pathlen = 0; + + shellbase = rindex (value, '/'); + bslash = rindex (value, '\\'); + if (!shellbase || bslash > shellbase) + shellbase = bslash; + if (!shellbase && value[1] == ':') + shellbase = value + 1; + if (shellbase) + shellbase++; + else + shellbase = value; + + /* Search for the basename of the shell (with standard + executable extensions) along the $PATH. */ + if (pathv) + pathlen = strlen (pathv->value); + path_string = (char *)xmalloc (5 + pathlen + 2 + 1); + /* On MSDOS, current directory is considered as part of $PATH. */ + sprintf (path_string, "PATH=.;%s", pathv ? pathv->value : ""); + fake_env[0] = path_string; + fake_env[1] = (char *)0; + if (__dosexec_find_on_path (shellbase, fake_env, shellpath)) + { + char *p; + + for (p = shellpath; *p; p++) + { + if (*p == '\\') + *p = '/'; + } + v = define_variable (expanded_name, strlen (expanded_name), + shellpath, origin, flavor == recursive); + } + else + v = lookup_variable (expanded_name, strlen (expanded_name)); + + free (path_string); + } + } + else + #endif /* __MSDOS__ */ + v = define_variable (expanded_name, strlen (expanded_name), value, origin, flavor == recursive); *************** *** 884,890 **** print_variable_set (file->variables->set, "# "); } ! #ifdef WIN32 void sync_Path_environment(void) { --- 992,998 ---- print_variable_set (file->variables->set, "# "); } ! #ifdef WINDOWS32 void sync_Path_environment(void) { *************** *** 902,910 **** free(environ_path); /* ! * Create something WIN32 world can grok */ ! convert_Path_to_win32(path, ';'); environ_path = concat("Path", "=", path); putenv(environ_path); free(path); --- 1010,1018 ---- free(environ_path); /* ! * Create something WINDOWS32 world can grok */ ! convert_Path_to_windows32(path, ';'); environ_path = concat("Path", "=", path); putenv(environ_path); free(path); diff -crP ../make-3.75/version.c ./version.c *** ../make-3.75/version.c Wed Aug 28 17:11:46 1996 --- ./version.c Mon Aug 18 14:11:32 1997 *************** *** 1,4 **** ! char *version_string = "3.75"; /* Local variables: --- 1,9 ---- ! /* We use instead of "config.h" so that a compilation ! using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h ! (which it would do because make.h was found in $srcdir). */ ! #include ! ! char *version_string = VERSION; /* Local variables: diff -crP ../make-3.75/vmsdir.h ./vmsdir.h *** ../make-3.75/vmsdir.h Wed Mar 20 09:57:49 1996 --- ./vmsdir.h Wed Aug 27 16:31:27 1997 *************** *** 4,11 **** --- 4,13 ---- #define MAXNAMLEN 255 + #ifndef __DECC typedef unsigned long u_long; typedef unsigned short u_short; + #endif struct direct { off_t d_off; diff -crP ../make-3.75/vmsify.c ./vmsify.c *** ../make-3.75/vmsify.c Sat Jul 20 07:06:42 1996 --- ./vmsify.c Wed Aug 27 16:31:28 1997 *************** *** 330,338 **** else { strcpy (vptr, "[."); - nstate = N_DOT; vptr += 2; copyto (&vptr, &fptr, '/', 1); state = 9; } } --- 330,338 ---- else { strcpy (vptr, "[."); vptr += 2; copyto (&vptr, &fptr, '/', 1); + nstate = N_OPEN; state = 9; } } *************** *** 738,743 **** --- 738,744 ---- s = strchr (vptr, ']'); if (s != 0) { + nstate = N_OPEN; while (s > vptr) { s--; diff -crP ../make-3.75/vpath.c ./vpath.c *** ../make-3.75/vpath.c Sat Jun 22 15:27:00 1996 --- ./vpath.c Wed Aug 27 16:31:29 1997 *************** *** 1,5 **** /* Implementation of pattern-matching file search paths for GNU Make. ! Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify --- 1,5 ---- /* Implementation of pattern-matching file search paths for GNU Make. ! Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify *************** *** 19,25 **** #include "make.h" #include "filedef.h" #include "variable.h" ! #ifdef WIN32 #include "pathstuff.h" #endif --- 19,25 ---- #include "make.h" #include "filedef.h" #include "variable.h" ! #ifdef WINDOWS32 #include "pathstuff.h" #endif *************** *** 43,48 **** --- 43,52 ---- /* Structure for the general VPATH given in the variable. */ static struct vpath *general_vpath; + + /* Structure for GPATH given in the variable. */ + + static struct vpath *gpaths; static int selective_vpath_search PARAMS ((struct vpath *path, char **file, time_t *mtime_ptr)); *************** *** 98,103 **** --- 102,139 ---- general_vpath = vpaths; vpaths = save_vpaths; } + + /* If there is a GPATH variable with a nonnull value, construct the + GPATH list from it. We use variable_expand rather than just + calling lookup_variable so that it will be recursively expanded. */ + + { + /* Turn off --warn-undefined-variables while we expand SHELL and IFS. */ + int save = warn_undefined_variables_flag; + warn_undefined_variables_flag = 0; + + p = variable_expand ("$(strip $(GPATH))"); + + warn_undefined_variables_flag = save; + } + + if (*p != '\0') + { + /* Save the list of vpaths. */ + struct vpath *save_vpaths = vpaths; + + /* Empty `vpaths' so the new one will have no next, and `vpaths' + will still be nil if P contains no existing directories. */ + vpaths = 0; + + /* Parse P. */ + construct_vpath_list ("%", p); + + /* Store the created path as the GPATH, + and restore the old list of vpaths. */ + gpaths = vpaths; + vpaths = save_vpaths; + } } /* Construct the VPATH listing for the pattern and searchpath given. *************** *** 109,122 **** variable. If SEARCHPATH is nil, remove all previous listings with the same ! pattern. If PATTERN is nil, remove all VPATH listings. ! Existing and readable directories that are not "." given in the ! searchpath separated by colons are loaded into the directory hash ! table if they are not there already and put in the VPATH searchpath ! for the given pattern with trailing slashes stripped off if present ! (and if the directory is not the root, "/"). ! The length of the longest entry in the list is put in the structure as well. ! The new entry will be at the head of the VPATHS chain. */ void construct_vpath_list (pattern, dirpath) --- 145,159 ---- variable. If SEARCHPATH is nil, remove all previous listings with the same ! pattern. If PATTERN is nil, remove all VPATH listings. Existing ! and readable directories that are not "." given in the searchpath ! separated by the path element separator (defined in make.h) are ! loaded into the directory hash table if they are not there already ! and put in the VPATH searchpath for the given pattern with trailing ! slashes stripped off if present (and if the directory is not the ! root, "/"). The length of the longest entry in the list is put in ! the structure as well. The new entry will be at the head of the ! VPATHS chain. */ void construct_vpath_list (pattern, dirpath) *************** *** 173,186 **** return; } ! #ifdef WIN32 ! convert_vpath_to_win32(dirpath, ';'); #endif ! /* Figure out the maximum number of VPATH entries and ! put it in MAXELEM. We start with 2, one before the ! first colon and one nil, the list terminator and ! increment our estimated number for each colon or blank we find. */ maxelem = 2; p = dirpath; while (*p != '\0') --- 210,223 ---- return; } ! #ifdef WINDOWS32 ! convert_vpath_to_windows32(dirpath, ';'); #endif ! /* Figure out the maximum number of VPATH entries and put it in ! MAXELEM. We start with 2, one before the first separator and one ! nil (the list terminator) and increment our estimated number for ! each separator or blank we find. */ maxelem = 2; p = dirpath; while (*p != '\0') *************** *** 190,196 **** vpath = (char **) xmalloc (maxelem * sizeof (char *)); maxvpath = 0; ! /* Skip over any initial colons and blanks. */ p = dirpath; while (*p == PATH_SEPARATOR_CHAR || isblank (*p)) ++p; --- 227,233 ---- vpath = (char **) xmalloc (maxelem * sizeof (char *)); maxvpath = 0; ! /* Skip over any initial separators and blanks. */ p = dirpath; while (*p == PATH_SEPARATOR_CHAR || isblank (*p)) ++p; *************** *** 209,214 **** --- 246,255 ---- len = p - v; /* Make sure there's no trailing slash, but still allow "/" as a directory. */ + #ifdef __MSDOS__ + /* We need also to leave alone a trailing slash in "d:/". */ + if (len > 3 || (len > 1 && v[1] != ':')) + #endif if (len > 1 && p[-1] == '/') --len; *************** *** 231,237 **** free (v); } ! /* Skip over colons and blanks between entries. */ while (*p == PATH_SEPARATOR_CHAR || isblank (*p)) ++p; } --- 272,278 ---- free (v); } ! /* Skip over separators and blanks between entries. */ while (*p == PATH_SEPARATOR_CHAR || isblank (*p)) ++p; } *************** *** 270,275 **** --- 311,334 ---- } } + /* Search the GPATH list for a pathname string that matches the one passed + in. If it is found, return 1. Otherwise we return 0. */ + + int + gpath_search (file, len) + char *file; + int len; + { + register char **gp; + + if (gpaths && (len <= gpaths->maxlen)) + for (gp = gpaths->searchpath; *gp != NULL; ++gp) + if (!strncmp(*gp, file, len) && (*gp)[len] == '\0') + return 1; + + return 0; + } + /* Search the VPATH list whose pattern matches *FILE for a directory where the name pointed to by FILE exists. If it is found, we set *FILE to the newly malloc'd name of the existing file, *MTIME_PTR (if MTIME_PTR is *************** *** 287,294 **** there is nothing we can do. */ if (**file == '/' ! #ifdef WIN32 ! || **file == '\\' || (*file)[1] == ':' #endif || (vpaths == 0 && general_vpath == 0)) --- 346,353 ---- there is nothing we can do. */ if (**file == '/' ! #if defined (WINDOWS32) || defined (__MSDOS__) ! || **file == '\\' || (*file)[1] == ':' #endif || (vpaths == 0 && general_vpath == 0)) *************** *** 343,351 **** pointer to the name-within-directory and FLEN is its length. */ n = rindex (*file, '/'); ! #ifdef WIN32 ! if (!n) ! n = rindex(*file,, '\\'); #endif name_dplen = n != 0 ? n - *file : 0; filename = name_dplen > 0 ? n + 1 : *file; --- 402,414 ---- pointer to the name-within-directory and FLEN is its length. */ n = rindex (*file, '/'); ! #if defined (WINDOWS32) || defined (__MSDOS__) ! /* We need the rightmost slash or backslash. */ ! { ! char *bslash = rindex(*file, '\\'); ! if (!n || bslash > n) ! n = bslash; ! } #endif name_dplen = n != 0 ? n - *file : 0; filename = name_dplen > 0 ? n + 1 : *file; *************** *** 373,390 **** --- 436,462 ---- /* Add the directory prefix already in *FILE. */ if (name_dplen > 0) { + #ifndef VMS *n++ = '/'; + #endif bcopy (*file, n, name_dplen); n += name_dplen; } + #if defined (WINDOWS32) || defined (__MSDOS__) + /* Cause the next if to treat backslash and slash alike. */ + if (n != name && n[-1] == '\\' ) + n[-1] = '/'; + #endif /* Now add the name-within-directory at the end of NAME. */ + #ifndef VMS if (n != name && n[-1] != '/') { *n = '/'; bcopy (filename, n + 1, flen + 1); } else + #endif bcopy (filename, n, flen + 1); /* Check if the file is mentioned in a makefile. If *FILE is not *************** *** 397,403 **** inadequately commented change in July 1990; I am not sure off hand what problem it fixes. ! In December 1993 I loosened of this restriction to allow a file to be chosen if it is mentioned as a target in a makefile. This seem logical. */ { --- 469,475 ---- inadequately commented change in July 1990; I am not sure off hand what problem it fixes. ! In December 1993 I loosened this restriction to allow a file to be chosen if it is mentioned as a target in a makefile. This seem logical. */ { *************** *** 411,416 **** --- 483,491 ---- /* That file wasn't mentioned in the makefile. See if it actually exists. */ + #ifdef VMS + exists_in_cache = exists = dir_file_exists_p (vpath[i], filename); + #else /* Clobber a null into the name at the last slash. Now NAME is the name of the directory to look in. */ *n = '\0'; *************** *** 419,424 **** --- 494,500 ---- construct_vpath_list or the code just above put it there. Does the file we seek exist in it? */ exists_in_cache = exists = dir_file_exists_p (name, filename); + #endif } if (exists) *************** *** 431,438 **** --- 507,516 ---- struct stat st; + #ifndef VMS /* Put the slash back in NAME. */ *n = '/'; + #endif if (!exists_in_cache /* Makefile-mentioned file need not exist. */ || stat (name, &st) == 0) /* Does it really exist? */ diff -crP ../make-3.75/w32/compat/dirent.c ./w32/compat/dirent.c *** ../make-3.75/w32/compat/dirent.c Tue May 14 17:02:45 1996 --- ./w32/compat/dirent.c Wed Aug 27 16:34:12 1997 *************** *** 78,84 **** return; } ! /* close the WIN32 directory handle */ if (pDir->dir_hDirHandle != INVALID_HANDLE_VALUE) FindClose(pDir->dir_hDirHandle); --- 78,84 ---- return; } ! /* close the WINDOWS32 directory handle */ if (pDir->dir_hDirHandle != INVALID_HANDLE_VALUE) FindClose(pDir->dir_hDirHandle); *************** *** 134,140 **** return; } ! /* close the WIN32 directory handle */ if (pDir->dir_hDirHandle != INVALID_HANDLE_VALUE) if (!FindClose(pDir->dir_hDirHandle)) errno = EBADF; --- 134,140 ---- return; } ! /* close the WINDOWS32 directory handle */ if (pDir->dir_hDirHandle != INVALID_HANDLE_VALUE) if (!FindClose(pDir->dir_hDirHandle)) errno = EBADF; diff -crP ../make-3.75/w32/include/dirent.h ./w32/include/dirent.h *** ../make-3.75/w32/include/dirent.h Tue May 14 17:02:46 1996 --- ./w32/include/dirent.h Mon Apr 7 03:24:42 1997 *************** *** 15,21 **** struct dirent { ! ino_t d_ino; /* unused - no equivalent on WIN32 */ char d_name[NAME_MAX+1]; }; --- 15,21 ---- struct dirent { ! ino_t d_ino; /* unused - no equivalent on WINDOWS32 */ char d_name[NAME_MAX+1]; }; diff -crP ../make-3.75/w32/include/pathstuff.h ./w32/include/pathstuff.h *** ../make-3.75/w32/include/pathstuff.h Sun Jul 28 17:01:51 1996 --- ./w32/include/pathstuff.h Mon Apr 7 03:24:45 1997 *************** *** 1,8 **** #ifndef _PATHSTUFF_H #define _PATHSTUFF_H ! extern char * convert_Path_to_win32(char *Path, char to_delim); ! extern char * convert_vpath_to_win32(char *Path, char to_delim); extern char * w32ify(char *file, int resolve); extern char * getcwd_fs(char *buf, int len); --- 1,8 ---- #ifndef _PATHSTUFF_H #define _PATHSTUFF_H ! extern char * convert_Path_to_windows32(char *Path, char to_delim); ! extern char * convert_vpath_to_windows32(char *Path, char to_delim); extern char * w32ify(char *file, int resolve); extern char * getcwd_fs(char *buf, int len); diff -crP ../make-3.75/w32/include/sub_proc.h ./w32/include/sub_proc.h *** ../make-3.75/w32/include/sub_proc.h Fri Jul 19 17:41:24 1996 --- ./w32/include/sub_proc.h Wed Aug 27 16:34:23 1997 *************** *** 4,26 **** /* * Component Name: * ! * $Date: 1996/07/19 21:41:24 $ * ! * $Source: /gd4/gnu/cvsroot/make/w32/include/sub_proc.h,v $ * ! * $Revision: 1.2 $ ! * ! * Description: ! * ! * (C) COPYRIGHT TIVOLI Systems, Inc. 1991-1994 ! * Unpublished Work ! * All Rights Reserved ! * Licensed Material - Property of TIVOLI Systems, Inc. */ ! /* $Id: sub_proc.h,v 1.2 1996/07/19 21:41:24 roland Exp $ */ ! #ifdef WIN32 #define EXTERN_DECL(entry, args) extern entry args #define VOID_DECL void --- 4,19 ---- /* * Component Name: * ! * $Date: 1997/08/27 20:34:23 $ * ! * $Source: /home/gd/gnu/cvsroot/make/w32/include/sub_proc.h,v $ * ! * $Revision: 1.4 $ */ ! /* $Id: sub_proc.h,v 1.4 1997/08/27 20:34:23 psmith Exp $ */ ! #ifdef WINDOWS32 #define EXTERN_DECL(entry, args) extern entry args #define VOID_DECL void diff -crP ../make-3.75/w32/include/w32err.h ./w32/include/w32err.h *** ../make-3.75/w32/include/w32err.h Tue May 14 17:02:46 1996 --- ./w32/include/w32err.h Mon Apr 7 03:24:50 1997 *************** *** 5,10 **** #define EXTERN_DECL(entry, args) entry args #endif ! EXTERN_DECL(char * map_win32_error_to_string, (DWORD error)); #endif /* !_W32ERR_H */ --- 5,10 ---- #define EXTERN_DECL(entry, args) entry args #endif ! EXTERN_DECL(char * map_windows32_error_to_string, (DWORD error)); #endif /* !_W32ERR_H */ diff -crP ../make-3.75/w32/pathstuff.c ./w32/pathstuff.c *** ../make-3.75/w32/pathstuff.c Sun Jul 28 14:03:31 1996 --- ./w32/pathstuff.c Tue Sep 16 10:17:39 1997 *************** *** 4,13 **** #include "pathstuff.h" /* ! * Convert delimiter separated vpath to Canonical format. */ char * ! convert_vpath_to_win32(char *Path, char to_delim) { char *etok; /* token separator for old Path */ --- 4,13 ---- #include "pathstuff.h" /* ! * Convert delimiter separated vpath to Canonical format. */ char * ! convert_vpath_to_windows32(char *Path, char to_delim) { char *etok; /* token separator for old Path */ *************** *** 19,67 **** if (isblank(*etok)) *etok = to_delim; ! return (convert_Path_to_win32(Path, to_delim)); } /* ! * Convert delimiter separated path to Canonical format. */ char * ! convert_Path_to_win32(char *Path, char to_delim) { char *etok; /* token separator for old Path */ char *p; /* points to element of old Path */ /* is this a multi-element Path ? */ for (p = Path, etok = strpbrk(p, ":;"); ! etok; etok = strpbrk(p, ":;")) if ((etok - p) == 1) { if (*(etok - 1) == ';' || *(etok - 1) == ':') { ! etok[-1] = to_delim; ! etok[0] = to_delim; p = ++etok; continue; /* ignore empty bucket */ ! } else if (etok = strpbrk(etok+1, ":;")) { /* found one to count, handle drive letter */ *etok = to_delim; p = ++etok; } else /* all finished, force abort */ ! p += strlen(p); } else { /* found another one, no drive letter */ *etok = to_delim; p = ++etok; } - #if 0 - /* convert to backward slashes */ - for (p = Path, p = strchr(p, '/'); p; p = strchr(p, '/')) - *p = '\\'; - #endif return Path; ! } /* * Convert to forward slashes. Resolve to full pathname optionally --- 19,66 ---- if (isblank(*etok)) *etok = to_delim; ! return (convert_Path_to_windows32(Path, to_delim)); } /* ! * Convert delimiter separated path to Canonical format. */ char * ! convert_Path_to_windows32(char *Path, char to_delim) { char *etok; /* token separator for old Path */ char *p; /* points to element of old Path */ /* is this a multi-element Path ? */ for (p = Path, etok = strpbrk(p, ":;"); ! etok; etok = strpbrk(p, ":;")) if ((etok - p) == 1) { if (*(etok - 1) == ';' || *(etok - 1) == ':') { ! etok[-1] = to_delim; ! etok[0] = to_delim; p = ++etok; continue; /* ignore empty bucket */ ! } else if (!isalpha(*p)) { ! /* found one to count, handle things like '.' */ ! *etok = to_delim; ! p = ++etok; ! } else if ((*etok == ':') && (etok = strpbrk(etok+1, ":;"))) { /* found one to count, handle drive letter */ *etok = to_delim; p = ++etok; } else /* all finished, force abort */ ! p += strlen(p); } else { /* found another one, no drive letter */ *etok = to_delim; p = ++etok; } return Path; ! } /* * Convert to forward slashes. Resolve to full pathname optionally *************** *** 100,109 **** #ifdef unused /* * Convert delimiter separated pathnames (e.g. PATH) or single file pathname ! * (e.g. c:/foo, c:\bar) to NutC format. If we are handed a string that ! * _NutPathToNutc() fails to convert, just return the path we were handed ! * and assume the caller will know what to do with it (It was probably ! * a mistake to try and convert it anyway due to some of the bizarre things * that might look like pathnames in makefiles). */ char * --- 99,108 ---- #ifdef unused /* * Convert delimiter separated pathnames (e.g. PATH) or single file pathname ! * (e.g. c:/foo, c:\bar) to NutC format. If we are handed a string that ! * _NutPathToNutc() fails to convert, just return the path we were handed ! * and assume the caller will know what to do with it (It was probably ! * a mistake to try and convert it anyway due to some of the bizarre things * that might look like pathnames in makefiles). */ char * *************** *** 119,126 **** char *rval; /* is this a multi-element path ? */ ! for (p = path, etok = strpbrk(p, ":;"), count = 0; ! etok; etok = strpbrk(p, ":;")) if ((etok - p) == 1) { if (*(etok - 1) == ';' || --- 118,125 ---- char *rval; /* is this a multi-element path ? */ ! for (p = path, etok = strpbrk(p, ":;"), count = 0; ! etok; etok = strpbrk(p, ":;")) if ((etok - p) == 1) { if (*(etok - 1) == ';' || *************** *** 132,146 **** p = ++etok, count++; else /* all finished, force abort */ ! p += strlen(p); ! } else /* found another one, no drive letter */ p = ++etok, count++; if (count) { count++; /* x1;x2;x3 <- need to count x3 */ ! /* * Hazard a guess on how big the buffer needs to be. * We have to convert things like c:/foo to /c=/foo. */ --- 131,145 ---- p = ++etok, count++; else /* all finished, force abort */ ! p += strlen(p); ! } else /* found another one, no drive letter */ p = ++etok, count++; if (count) { count++; /* x1;x2;x3 <- need to count x3 */ ! /* * Hazard a guess on how big the buffer needs to be. * We have to convert things like c:/foo to /c=/foo. */ *************** *** 154,163 **** * a time. Single file pathnames will fail this and fall * to the logic below loop. */ ! for (p = path, etok = strpbrk(p, ":;"); ! etok; etok = strpbrk(p, ":;")) { ! /* don't trip up on device specifiers or empty path slots */ if ((etok - p) == 1) if (*(etok - 1) == ';' || --- 153,162 ---- * a time. Single file pathnames will fail this and fall * to the logic below loop. */ ! for (p = path, etok = strpbrk(p, ":;"); ! etok; etok = strpbrk(p, ":;")) { ! /* don't trip up on device specifiers or empty path slots */ if ((etok - p) == 1) if (*(etok - 1) == ';' || *************** *** 165,178 **** p = ++etok; continue; } else if ((etok = strpbrk(etok+1, ":;")) == NULL) ! break; /* thing found was a WIN32 pathname */ /* save separator */ sep = *etok; /* terminate the current path element -- temporarily */ *etok = '\0'; ! #ifdef __NUTC__ /* convert to NutC format */ if (_NutPathToNutc(p, pathp, 0) == FALSE) { --- 164,177 ---- p = ++etok; continue; } else if ((etok = strpbrk(etok+1, ":;")) == NULL) ! break; /* thing found was a WINDOWS32 pathname */ /* save separator */ sep = *etok; /* terminate the current path element -- temporarily */ *etok = '\0'; ! #ifdef __NUTC__ /* convert to NutC format */ if (_NutPathToNutc(p, pathp, 0) == FALSE) { *************** *** 187,206 **** *pathp++ = '/'; strcpy(pathp, &p[2]); #endif ! pathp += strlen(pathp); *pathp++ = ':'; /* use Unix style path separtor for new path */ *pathp = '\0'; /* make sure we are null terminaed */ ! /* restore path separator */ *etok = sep; ! /* point p to first char of next path element */ p = ++etok; } } else { ! nutc_path_len = strlen(path) + 3; nutc_path = xmalloc(nutc_path_len); pathp = nutc_path; *pathp = '\0'; --- 186,205 ---- *pathp++ = '/'; strcpy(pathp, &p[2]); #endif ! pathp += strlen(pathp); *pathp++ = ':'; /* use Unix style path separtor for new path */ *pathp = '\0'; /* make sure we are null terminaed */ ! /* restore path separator */ *etok = sep; ! /* point p to first char of next path element */ p = ++etok; } } else { ! nutc_path_len = strlen(path) + 3; nutc_path = xmalloc(nutc_path_len); pathp = nutc_path; *pathp = '\0'; *************** *** 211,217 **** * OK, here we handle the last element in PATH (e.g. c of a;b;c) * or the path was a single filename and will be converted * here. Note, testing p here assures that we don't trip up ! * on paths like a;b; which have trailing delimiter followed by * nothing. */ if (*p != '\0') { --- 210,216 ---- * OK, here we handle the last element in PATH (e.g. c of a;b;c) * or the path was a single filename and will be converted * here. Note, testing p here assures that we don't trip up ! * on paths like a;b; which have trailing delimiter followed by * nothing. */ if (*p != '\0') { *************** *** 234,239 **** rval = savestring(nutc_path, strlen(nutc_path)); free(nutc_path); return rval; ! } #endif --- 233,238 ---- rval = savestring(nutc_path, strlen(nutc_path)); free(nutc_path); return rval; ! } #endif diff -crP ../make-3.75/w32/subproc/NMakefile ./w32/subproc/NMakefile *** ../make-3.75/w32/subproc/NMakefile Wed May 15 19:32:26 1996 --- ./w32/subproc/NMakefile Wed Aug 27 16:34:30 1997 *************** *** 1,7 **** # NOTE: If you have no `make' program at all to process this makefile, run # `build.bat' instead. # ! # Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc # This file is part of GNU Make. # # GNU Make is free software; you can redistribute it and/or modify --- 1,7 ---- # NOTE: If you have no `make' program at all to process this makefile, run # `build.bat' instead. # ! # Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc # This file is part of GNU Make. # # GNU Make is free software; you can redistribute it and/or modify *************** *** 27,33 **** OUTDIR=. MAKEFILE=NMakefile ! CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WIN32 /D _WINDOWS -I. -I../include CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug\ /Fp.\WinDebug\subproc.pch /Fo.\WinDebug/ CFLAGS_release = $(CFLAGS_any) /O2 /FR.\WinRel\ /Fp.\WinRel\subproc.pch /Fo.\WinRel/ --- 27,33 ---- OUTDIR=. MAKEFILE=NMakefile ! CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WIN32 /D WINDOWS32 /D _WINDOWS -I. -I../include CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug\ /Fp.\WinDebug\subproc.pch /Fo.\WinDebug/ CFLAGS_release = $(CFLAGS_any) /O2 /FR.\WinRel\ /Fp.\WinRel\subproc.pch /Fo.\WinRel/ diff -crP ../make-3.75/w32/subproc/build.bat ./w32/subproc/build.bat *** ../make-3.75/w32/subproc/build.bat Wed May 15 02:32:54 1996 --- ./w32/subproc/build.bat Wed Aug 27 16:34:30 1997 *************** *** 1,10 **** if not exist .\WinDebug\nul mkdir .\WinDebug ! cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c ! cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c sub_proc.c ! cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c w32err.c lib.exe /NOLOGO /OUT:.\WinDebug\subproc.lib .\WinDebug/misc.obj .\WinDebug/sub_proc.obj .\WinDebug/w32err.obj if not exist .\WinRel\nul mkdir .\WinRel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c misc.c ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c sub_proc.c ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c w32err.c lib.exe /NOLOGO /OUT:.\WinRel\subproc.lib .\WinRel/misc.obj .\WinRel/sub_proc.obj .\WinRel/w32err.obj --- 1,10 ---- if not exist .\WinDebug\nul mkdir .\WinDebug ! cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c ! cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c sub_proc.c ! cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c w32err.c lib.exe /NOLOGO /OUT:.\WinDebug\subproc.lib .\WinDebug/misc.obj .\WinDebug/sub_proc.obj .\WinDebug/w32err.obj if not exist .\WinRel\nul mkdir .\WinRel ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c misc.c ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c sub_proc.c ! cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c w32err.c lib.exe /NOLOGO /OUT:.\WinRel\subproc.lib .\WinRel/misc.obj .\WinRel/sub_proc.obj .\WinRel/w32err.obj diff -crP ../make-3.75/w32/subproc/misc.c ./w32/subproc/misc.c *** ../make-3.75/w32/subproc/misc.c Tue May 14 17:02:47 1996 --- ./w32/subproc/misc.c Mon Apr 7 03:25:01 1997 *************** *** 7,13 **** /* * Description: Convert a NULL string terminated UNIX environment block to ! * an environment block suitable for a win32 system call * * Returns: TRUE= success, FALSE=fail * --- 7,13 ---- /* * Description: Convert a NULL string terminated UNIX environment block to ! * an environment block suitable for a windows32 system call * * Returns: TRUE= success, FALSE=fail * diff -crP ../make-3.75/w32/subproc/sub_proc.c ./w32/subproc/sub_proc.c *** ../make-3.75/w32/subproc/sub_proc.c Wed May 15 02:30:32 1996 --- ./w32/subproc/sub_proc.c Wed Aug 27 16:34:31 1997 *************** *** 319,332 **** char *fname; char *ext; - if ((exec_handle = (HANDLE)OpenFile(exec_path, file_info, - OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { - return(exec_handle); - } - fname = malloc(strlen(exec_path) + 5); strcpy(fname, exec_path); ext = fname + strlen(fname); strcpy(ext, ".exe"); if ((exec_handle = (HANDLE)OpenFile(fname, file_info, OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { --- 319,328 ---- char *fname; char *ext; fname = malloc(strlen(exec_path) + 5); strcpy(fname, exec_path); ext = fname + strlen(fname); + strcpy(ext, ".exe"); if ((exec_handle = (HANDLE)OpenFile(fname, file_info, OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { *************** *** 334,339 **** --- 330,342 ---- return(exec_handle); } + strcpy(ext, ".cmd"); + if ((exec_handle = (HANDLE)OpenFile(fname, file_info, + OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { + free(fname); + return(exec_handle); + } + strcpy(ext, ".bat"); if ((exec_handle = (HANDLE)OpenFile(fname, file_info, OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { *************** *** 341,346 **** --- 344,356 ---- return(exec_handle); } + /* should .com come before this case? */ + if ((exec_handle = (HANDLE)OpenFile(exec_path, file_info, + OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { + free(fname); + return(exec_handle); + } + strcpy(ext, ".com"); if ((exec_handle = (HANDLE)OpenFile(fname, file_info, OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { *************** *** 395,401 **** exec_handle = find_file(exec_path, &file_info); /* ! * If we couldn't open the file, just assume that Win32 will be able * to find and execute it. */ if (exec_handle == (HANDLE)HFILE_ERROR) { --- 405,411 ---- exec_handle = find_file(exec_path, &file_info); /* ! * If we couldn't open the file, just assume that Windows32 will be able * to find and execute it. */ if (exec_handle == (HANDLE)HFILE_ERROR) { *************** *** 489,502 **** startInfo.hStdOutput = (HANDLE)pproc->sv_stdout[1]; startInfo.hStdError = (HANDLE)pproc->sv_stderr[1]; - /* - * See if we need to setuid to a different user. - */ - if (as_user) { - return -1; - } - if (as_user) { return -1; } else { if (CreateProcess( --- 499,506 ---- startInfo.hStdOutput = (HANDLE)pproc->sv_stdout[1]; startInfo.hStdError = (HANDLE)pproc->sv_stderr[1]; if (as_user) { + if (envblk) free(envblk); return -1; } else { if (CreateProcess( *************** *** 514,519 **** --- 518,524 ---- pproc->last_err = GetLastError(); pproc->lerrno = E_FORK; fprintf(stderr, "process_begin: CreateProcess(%s, %s, ...) failed.\n", exec_path, command_line); + if (envblk) free(envblk); free( command_line ); return(-1); } *************** *** 538,543 **** --- 543,549 ---- } free( command_line ); + if (envblk) free(envblk); pproc->lerrno=0; return 0; } *************** *** 578,584 **** for (;;) { if (ReadFile( (HANDLE)pproc->sv_stdout[0], &c, 1, &nread, NULL) == FALSE) { ! /* map_win32_error_to_string(GetLastError());*/ _endthreadex(0); } if (nread == 0) --- 584,590 ---- for (;;) { if (ReadFile( (HANDLE)pproc->sv_stdout[0], &c, 1, &nread, NULL) == FALSE) { ! /* map_windows32_error_to_string(GetLastError());*/ _endthreadex(0); } if (nread == 0) *************** *** 609,615 **** for (;;) { if (ReadFile( (HANDLE)pproc->sv_stderr[0], &c, 1, &nread, NULL) == FALSE) { ! map_win32_error_to_string(GetLastError()); _endthreadex(0); } if (nread == 0) --- 615,621 ---- for (;;) { if (ReadFile( (HANDLE)pproc->sv_stderr[0], &c, 1, &nread, NULL) == FALSE) { ! map_windows32_error_to_string(GetLastError()); _endthreadex(0); } if (nread == 0) *************** *** 718,724 **** one second to collect all remaining output */ if (wait_return == WAIT_FAILED) { ! /* map_win32_error_to_string(GetLastError());*/ pproc->last_err = GetLastError(); pproc->lerrno = E_SCALL; goto done; --- 724,730 ---- one second to collect all remaining output */ if (wait_return == WAIT_FAILED) { ! /* map_windows32_error_to_string(GetLastError());*/ pproc->last_err = GetLastError(); pproc->lerrno = E_SCALL; goto done; *************** *** 835,841 **** wait_return = WaitForSingleObject(childhand, INFINITE); if (wait_return != WAIT_OBJECT_0) { ! /* map_win32_error_to_string(GetLastError());*/ pproc->last_err = GetLastError(); pproc->lerrno = E_SCALL; goto done2; --- 841,847 ---- wait_return = WaitForSingleObject(childhand, INFINITE); if (wait_return != WAIT_OBJECT_0) { ! /* map_windows32_error_to_string(GetLastError());*/ pproc->last_err = GetLastError(); pproc->lerrno = E_SCALL; goto done2; *************** *** 883,889 **** /* ! * Try to protect against WIN32 argument munging. This function takes * an argv vector and outputs a 'protected' string as a return * value. The return code can be safely passed to CreateProcess(). * --- 889,895 ---- /* ! * Try to protect against WINDOWS32 argument munging. This function takes * an argv vector and outputs a 'protected' string as a return * value. The return code can be safely passed to CreateProcess(). * *************** *** 1003,1016 **** char** nargv; char* buf; int i; if (shell_name) { for (i = 0; argv[i]; i++); ! i += 2; nargv = (char **) malloc(i * sizeof (char *)); ! nargv[0] = shell_name; ! for (i = 1; argv[i-1]; i++) ! nargv[i] = argv[i-1]; nargv[i] = NULL; } else nargv = argv; --- 1009,1043 ---- char** nargv; char* buf; int i; + char** shargv = NULL; + char* p = NULL; + char* q = NULL; + int j = 0; if (shell_name) { + /* handle things like: #!/bin/sh -x */ + + /* count tokens */ + q = strdup(shell_name); + for (j = 0, p = q; (p = strtok(p, " \t")) != NULL; p = NULL, j++); + free(q); + + /* copy tokens */ + q = strdup(shell_name); + shargv = (char **) malloc((j+1) * sizeof (char *)); + for (j = 0, p = q; (p = strtok(p, " \t")) != NULL; p = NULL, j++) + shargv[j] = strdup(p); + shargv[j] = NULL; + free(q); + + /* create argv */ for (i = 0; argv[i]; i++); ! i += (j+1); nargv = (char **) malloc(i * sizeof (char *)); ! for (i = 0; shargv[i] != NULL; i++) ! nargv[i] = shargv[i]; ! for (j = 0; argv[j]; j++, i++) ! nargv[i] = argv[j]; nargv[i] = NULL; } else nargv = argv; *************** *** 1018,1025 **** /* create string suitable for CreateProcess() */ buf = fix_command_line(nargv); ! if (shell_name) free(nargv); return buf; } --- 1045,1056 ---- /* create string suitable for CreateProcess() */ buf = fix_command_line(nargv); ! if (shell_name) { ! for (j = 0; shargv[j]; j++) ! free(shargv[j]); ! free(shargv); free(nargv); + } return buf; } diff -crP ../make-3.75/w32/subproc/w32err.c ./w32/subproc/w32err.c *** ../make-3.75/w32/subproc/w32err.c Tue May 14 17:02:47 1996 --- ./w32/subproc/w32err.c Mon Apr 7 03:25:06 1997 *************** *** 2,8 **** #include "w32err.h" /* ! * Description: the win32 version of perror() * * Returns: a pointer to a static error * --- 2,8 ---- #include "w32err.h" /* ! * Description: the windows32 version of perror() * * Returns: a pointer to a static error * *************** *** 10,16 **** * comp.os.ms-windows.programmer.win32 */ char * ! map_win32_error_to_string (DWORD ercode) { /* __declspec (thread) necessary if you will use multiple threads */ __declspec (thread) static char szMessageBuffer[128]; --- 10,16 ---- * comp.os.ms-windows.programmer.win32 */ char * ! map_windows32_error_to_string (DWORD ercode) { /* __declspec (thread) necessary if you will use multiple threads */ __declspec (thread) static char szMessageBuffer[128];