1*69606e3fSchristos2006-04-01 Paul D. Smith <psmith@gnu.org> 2*69606e3fSchristos 3*69606e3fSchristos Version 3.81 released. 4*69606e3fSchristos 5*69606e3fSchristos * NEWS: Updated for 3.81. 6*69606e3fSchristos 7*69606e3fSchristos * README.cvs: Mention that vpath builds are not supported out of 8*69606e3fSchristos CVS. Fixes Savannah bug #16236. 9*69606e3fSchristos Remove update of make.texi from the list of things to do; we use 10*69606e3fSchristos version.texi now. 11*69606e3fSchristos 12*69606e3fSchristos2006-03-26 Paul D. Smith <psmith@gnu.org> 13*69606e3fSchristos 14*69606e3fSchristos * doc/make.texi: Clean up licensing. Use @copying and version.texi 15*69606e3fSchristos support from automake, as described in the Texinfo manual. 16*69606e3fSchristos 17*69606e3fSchristos2006-03-25 Eli Zaretskii <eliz@gnu.org> 18*69606e3fSchristos 19*69606e3fSchristos * implicit.c (pattern_search) [HAVE_DOS_PATHS]: Don't compare b 20*69606e3fSchristos with lastslash, since the latter points to filename, not to 21*69606e3fSchristos target. 22*69606e3fSchristos * job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]: 23*69606e3fSchristos Declare and define sh_chars_sh[]. 24*69606e3fSchristos 25*69606e3fSchristos2006-03-23 Paul D. Smith <psmith@gnu.org> 26*69606e3fSchristos 27*69606e3fSchristos * configure.in: Look for build.sh.in in $srcdir so it will be 28*69606e3fSchristos built for remote configurations as well. 29*69606e3fSchristos 30*69606e3fSchristos * Makefile.am: Make sure to clean up build.sh during distclean. 31*69606e3fSchristos Fixes Savannah bug #16166. 32*69606e3fSchristos 33*69606e3fSchristos * misc.c (log_access): Takes a const char *. 34*69606e3fSchristos * function.c (fold_newlines): Takes an unsigned int *. 35*69606e3fSchristos Both fixes for Savannah bug #16170. 36*69606e3fSchristos 37*69606e3fSchristos2006-03-22 Boris Kolpackov <boris@kolpackov.net> 38*69606e3fSchristos 39*69606e3fSchristos * implicit.c (pattern_search): Call set_file_variables only 40*69606e3fSchristos if we have prerequisites that need second expansion. Fixes 41*69606e3fSchristos Savannah bug #16140. 42*69606e3fSchristos 43*69606e3fSchristos2006-03-19 Paul D. Smith <psmith@gnu.org> 44*69606e3fSchristos 45*69606e3fSchristos * remake.c (update_file): Add alloca(0) to clean up alloca'd 46*69606e3fSchristos memory on hosts that don't support it directly. 47*69606e3fSchristos 48*69606e3fSchristos * README.cvs: Add information on steps for making a release (to 49*69606e3fSchristos make sure I don't forget any). 50*69606e3fSchristos 51*69606e3fSchristos * main.c (clean_jobserver): Move jobserver cleanup code into a new 52*69606e3fSchristos function. 53*69606e3fSchristos (die): Cleanup code was removed from here; call the new function. 54*69606e3fSchristos (main): If we are re-execing, clean up the jobserver first so we 55*69606e3fSchristos don't leak file descriptors. 56*69606e3fSchristos Fix bug reported by Craig Fithian <craig.fithian@citigroup.com>. 57*69606e3fSchristos 58*69606e3fSchristos2006-03-17 Paul D. Smith <psmith@gnu.org> 59*69606e3fSchristos 60*69606e3fSchristos * maintMakefile (do-po-update): Rewrite this rule to clean up and 61*69606e3fSchristos allow multiple concurrent runs. 62*69606e3fSchristos Patch from Joseph Myers <joseph@codesourcery.com> 63*69606e3fSchristos 64*69606e3fSchristos2006-03-17 Boris Kolpackov <boris@kolpackov.net> 65*69606e3fSchristos 66*69606e3fSchristos * dep.h (struct dep): Add the stem field. 67*69606e3fSchristos * misc.c (alloc_dep, free_dep): New functions. 68*69606e3fSchristos (copy_dep_chain): Copy stem. 69*69606e3fSchristos (free_dep_chain): Use free_dep. 70*69606e3fSchristos * read.c (record_files): Store stem in the dependency line. 71*69606e3fSchristos * file.c (expand_deps): Use stem stored in the dependency line. Use 72*69606e3fSchristos free_dep_chain instead of free_ns_chain. 73*69606e3fSchristos * implicit.c (pattern_search): Use alloc_dep and free_dep. 74*69606e3fSchristos * read.c (read_all_makefiles, eval_makefile, eval): Ditto. 75*69606e3fSchristos * main.c (main, handle_non_switch_argument): Ditto. 76*69606e3fSchristos * remake.c (check_dep): Ditto. 77*69606e3fSchristos * rule.c (convert_suffix_rule, freerule): Ditto. 78*69606e3fSchristos 79*69606e3fSchristos2006-03-14 Paul D. Smith <psmith@gnu.org> 80*69606e3fSchristos 81*69606e3fSchristos * expand.c (variable_append): Instead of appending everything then 82*69606e3fSchristos expanding the result, we expand (or not, if it's simple) each part 83*69606e3fSchristos as we add it. 84*69606e3fSchristos (allocated_variable_append): Don't expand the final result. 85*69606e3fSchristos Fixes Savannah bug #15913. 86*69606e3fSchristos 87*69606e3fSchristos2006-03-09 Paul Smith <psmith@gnu.org> 88*69606e3fSchristos 89*69606e3fSchristos * remake.c (update_file_1): Revert the change of 3 Jan 2006 which 90*69606e3fSchristos listed non-existent files as changed. Turns out there's a bug in 91*69606e3fSchristos the Linux kernel builds which means that this change causes 92*69606e3fSchristos everything to rebuild every time. We will re-introduce this fix 93*69606e3fSchristos in the next release, to give them time to fix their build system. 94*69606e3fSchristos Fixes Savannah bug #16002. 95*69606e3fSchristos Introduces Savannah bug #16051. 96*69606e3fSchristos 97*69606e3fSchristos * implicit.c (pattern_search) [DOS_PATHS]: Look for DOS paths if 98*69606e3fSchristos we *don't* find UNIX "/". 99*69606e3fSchristos Reported by David Ergo <david.ergo@alterface.com> 100*69606e3fSchristos 101*69606e3fSchristos2006-03-04 Eli Zaretskii <eliz@gnu.org> 102*69606e3fSchristos 103*69606e3fSchristos * variable.c (do_variable_definition) [WINDOWS32]: Call the shell 104*69606e3fSchristos locator function find_and_set_default_shell if SHELL came from the 105*69606e3fSchristos command line. 106*69606e3fSchristos 107*69606e3fSchristos2006-02-20 Paul D. Smith <psmith@gnu.org> 108*69606e3fSchristos 109*69606e3fSchristos * variable.c (merge_variable_set_lists): It's legal for *setlist0 110*69606e3fSchristos to be null; don't core in that case. 111*69606e3fSchristos 112*69606e3fSchristos2006-02-19 Paul D. Smith <psmith@gnu.org> 113*69606e3fSchristos 114*69606e3fSchristos * commands.c (set_file_variables): Realloc, not malloc, the static 115*69606e3fSchristos string values to avoid memory leaks. 116*69606e3fSchristos 117*69606e3fSchristos * expand.c (recursively_expand_for_file): Only set reading_file to 118*69606e3fSchristos an initialized value. 119*69606e3fSchristos 120*69606e3fSchristos * implicit.c (pattern_search): We need to make a copy of the stem 121*69606e3fSchristos if we get it from an intermediate dep, since those get freed. 122*69606e3fSchristos 123*69606e3fSchristos * file.c (lookup_file) [VMS]: Don't lowercase special targets that 124*69606e3fSchristos begin with ".". 125*69606e3fSchristos (enter_file) [VMS]: Ditto. 126*69606e3fSchristos Patch provided by Hartmut Becker <Hartmut.Becker@hp.com>. 127*69606e3fSchristos 128*69606e3fSchristos2006-02-24 Eli Zaretskii <eliz@gnu.org> 129*69606e3fSchristos 130*69606e3fSchristos * job.c (construct_command_argv_internal): Fix last change. 131*69606e3fSchristos 132*69606e3fSchristos * w32/subproc/sub_proc.c (process_pipe_io): Make dwStdin, 133*69606e3fSchristos dwStdout, and dwStderr unsigned int: avoids compiler warnings in 134*69606e3fSchristos the calls to _beginthreadex. 135*69606e3fSchristos 136*69606e3fSchristos * expand.c (recursively_expand_for_file): Initialize `save' to 137*69606e3fSchristos prevent compiler warnings. 138*69606e3fSchristos 139*69606e3fSchristos2006-02-18 Eli Zaretskii <eliz@gnu.org> 140*69606e3fSchristos 141*69606e3fSchristos * job.c (construct_command_argv_internal): Don't create a temporary 142*69606e3fSchristos script/batch file if we are under -n. Call _setmode to switch the 143*69606e3fSchristos script file stream to text mode. 144*69606e3fSchristos 145*69606e3fSchristos2006-02-17 Paul D. Smith <psmith@gnu.org> 146*69606e3fSchristos 147*69606e3fSchristos * variable.c (merge_variable_set_lists): Don't try to merge the 148*69606e3fSchristos global_setlist. Not only is this useless, but it can lead to 149*69606e3fSchristos circularities in the linked list, if global_setlist->next in one 150*69606e3fSchristos list gets set to point to another list which also ends in 151*69606e3fSchristos global_setlist. 152*69606e3fSchristos Fixes Savannah bug #15757. 153*69606e3fSchristos 154*69606e3fSchristos2006-02-15 Paul D. Smith <psmith@gnu.org> 155*69606e3fSchristos 156*69606e3fSchristos Fix for Savannah bug #106. 157*69606e3fSchristos 158*69606e3fSchristos * expand.c (expanding_var): Keep track of which variable we're 159*69606e3fSchristos expanding. If no variable is being expanded, it's the same as 160*69606e3fSchristos reading_file. 161*69606e3fSchristos * make.h (expanding_var): Declare it. 162*69606e3fSchristos * expand.c (recursively_expand_for_file): Set expanding_var to the 163*69606e3fSchristos current variable we're expanding, unless there's no file info in 164*69606e3fSchristos it (could happen if it comes from the command line or a default 165*69606e3fSchristos variable). Restore it before we exit. 166*69606e3fSchristos * expand.c (variable_expand_string): Use the expanding_var file 167*69606e3fSchristos info instead of the reading_file info. 168*69606e3fSchristos * function.c (check_numeric): Ditto. 169*69606e3fSchristos (func_word): Ditto. 170*69606e3fSchristos (func_wordlist): Ditto. 171*69606e3fSchristos (func_error): Ditto. 172*69606e3fSchristos (expand_builtin_function): Ditto. 173*69606e3fSchristos (handle_function): Ditto. 174*69606e3fSchristos 175*69606e3fSchristos2006-02-14 Paul D. Smith <psmith@gnu.org> 176*69606e3fSchristos 177*69606e3fSchristos * read.c (eval): Even if the included filenames expands to the 178*69606e3fSchristos empty string we still need to free the allocated buffer. 179*69606e3fSchristos 180*69606e3fSchristos * implicit.c (pattern_search): If we allocated a variable set for 181*69606e3fSchristos an impossible file, free it. 182*69606e3fSchristos * variable.c (free_variable_set): New function. 183*69606e3fSchristos * variable.h: Declare it. 184*69606e3fSchristos 185*69606e3fSchristos * read.c (read_all_makefiles): Makefile names are kept in the 186*69606e3fSchristos strcache, so there's never any need to alloc/free them. 187*69606e3fSchristos (eval): Ditto. 188*69606e3fSchristos 189*69606e3fSchristos * main.c (main): Add "archives" to the .FEATURES variable if 190*69606e3fSchristos archive support is enabled. 191*69606e3fSchristos * doc/make.texi (Special Variables): Document it. 192*69606e3fSchristos 193*69606e3fSchristos2006-02-13 Paul D. Smith <psmith@gnu.org> 194*69606e3fSchristos 195*69606e3fSchristos * implicit.c (pattern_search): Add checking for DOS pathnames to 196*69606e3fSchristos the pattern rule target LASTSLASH manipulation. 197*69606e3fSchristos Fixes Savannah bug #11183. 198*69606e3fSchristos 199*69606e3fSchristos2006-02-11 Paul D. Smith <psmith@gnu.org> 200*69606e3fSchristos 201*69606e3fSchristos * (ALL FILES): Updated copyright and license notices. 202*69606e3fSchristos 203*69606e3fSchristos2006-02-10 Paul D. Smith <psmith@gnu.org> 204*69606e3fSchristos 205*69606e3fSchristos A new internal capability: the string cache is a read-only cache 206*69606e3fSchristos of strings, with a hash table interface for fast lookup. Nothing 207*69606e3fSchristos in the cache will ever be freed, so there's no need for reference 208*69606e3fSchristos counting, etc. This is the beginning of a full solution for 209*69606e3fSchristos Savannah bug #15182, but for now we only store makefile names here. 210*69606e3fSchristos 211*69606e3fSchristos * strcache.c: New file. Implement a read-only string cache. 212*69606e3fSchristos * make.h: Add prototypes for new functions. 213*69606e3fSchristos * main.c (initialize_global_hash_tables): Initialize the string cache. 214*69606e3fSchristos (print_data_base): Print string cache stats. 215*69606e3fSchristos * read.c (eval_makefile): Use the string cache to store makefile 216*69606e3fSchristos names. Rewrite the string allocation to be sure we free everything. 217*69606e3fSchristos 218*69606e3fSchristos2006-02-10 Eli Zaretskii <eliz@gnu.org> 219*69606e3fSchristos 220*69606e3fSchristos * dir.c (dir_contents_file_exists_p): Don't opendir if the 221*69606e3fSchristos directory time stamp didn't change, except on FAT filesystems. 222*69606e3fSchristos Suggested by J. David Bryan <jdbryan@acm.org>. 223*69606e3fSchristos 224*69606e3fSchristos2006-02-09 Paul D. Smith <psmith@gnu.org> 225*69606e3fSchristos 226*69606e3fSchristos * function.c (func_or): Implement a short-circuiting OR function. 227*69606e3fSchristos (func_and): Implement a short-circuiting AND function. 228*69606e3fSchristos (function_table_init): Update the table with the new functions. 229*69606e3fSchristos * doc/make.texi (Conditional Functions): Changed the "if" section 230*69606e3fSchristos to one on general conditional functions. Added documentation for 231*69606e3fSchristos $(and ...) and $(or ...) functions. 232*69606e3fSchristos * NEWS: Note new $(and ...) and $(or ...) functions. 233*69606e3fSchristos 234*69606e3fSchristos2006-02-08 Boris Kolpackov <boris@kolpackov.net> 235*69606e3fSchristos 236*69606e3fSchristos * job.h (struct child): Add the dontcare bitfield. 237*69606e3fSchristos * job.c (new_job): Cache dontcare flag. 238*69606e3fSchristos * job.c (reap_children): Use cached dontcare flag instead of the 239*69606e3fSchristos one in struct file. Fixes Savannah bug #15641. 240*69606e3fSchristos 241*69606e3fSchristos2006-02-06 Paul D. Smith <psmith@gnu.org> 242*69606e3fSchristos 243*69606e3fSchristos * vpath.c (selective_vpath_search): If the file we find has a 244*69606e3fSchristos timestamp from -o or -W, use that instead of the real time. 245*69606e3fSchristos * remake.c (f_mtime): If the mtime is a special token from -o or 246*69606e3fSchristos -W, don't overwrite it with the real mtime. 247*69606e3fSchristos Fixes Savannah bug #15341. 248*69606e3fSchristos 249*69606e3fSchristos Updates from Markus Mauhart <qwe123@chello.at>: 250*69606e3fSchristos 251*69606e3fSchristos * w32/subproc/sub_proc.c (process_begin): Remove no-op tests. 252*69606e3fSchristos (process_signal, process_last_err, process_exit_code): Manage 253*69606e3fSchristos invalid handle values. 254*69606e3fSchristos (process_{outbuf,errbuf,outcnt,errcnt,pipes}): Unused and don't 255*69606e3fSchristos manage invalid handles; remove them. 256*69606e3fSchristos * job.c (start_job_command) [WINDOWS32]: Jump out on error. 257*69606e3fSchristos * config.h.W32.template [WINDOWS32]: Set flags for Windows builds. 258*69606e3fSchristos * README.cvs: Updates for building from CVS. 259*69606e3fSchristos 260*69606e3fSchristos2006-02-05 Paul D. Smith <psmith@gnu.org> 261*69606e3fSchristos 262*69606e3fSchristos * file.c (enter_file): Keep track of the last double_colon entry, 263*69606e3fSchristos to avoid walking the list every time we want to add a new one. 264*69606e3fSchristos Fixes Savannah bug #15533. 265*69606e3fSchristos * filedef.h (struct file): Add a new LAST pointer. 266*69606e3fSchristos 267*69606e3fSchristos * dir.c (directory_contents_hash_cmp): Don't use subtraction to do 268*69606e3fSchristos the comparison. For 64-bits systems the result of the subtraction 269*69606e3fSchristos might not fit into an int. Use comparison instead. 270*69606e3fSchristos Fixes Savannah bug #15534. 271*69606e3fSchristos 272*69606e3fSchristos * doc/make.texi: Update the chapter on writing commands to reflect 273*69606e3fSchristos the changes made in 3.81 for backslash/newline and SHELL handling. 274*69606e3fSchristos 275*69606e3fSchristos2006-02-01 Paul D. Smith <psmith@gnu.org> 276*69606e3fSchristos 277*69606e3fSchristos * dir.c (dir_contents_file_exists_p) [WINDOWS32]: Make sure 278*69606e3fSchristos variable st is not used when it's not initialized. 279*69606e3fSchristos Patch from Eli Zaretskii <eliz@gnu.org>. 280*69606e3fSchristos 281*69606e3fSchristos2006-01-31 Paul D. Smith <psmith@gnu.org> 282*69606e3fSchristos 283*69606e3fSchristos * README.W32.template: Applied patch #4785 from 284*69606e3fSchristos Markus Mauhart <qwe123@chello.at>. 285*69606e3fSchristos * README.cvs: Applied patch #4786 from 286*69606e3fSchristos Markus Mauhart <qwe123@chello.at>. 287*69606e3fSchristos * make_msvc_net2003.vcproj [WINDOWS32]: New version from 288*69606e3fSchristos J. Grant <jg@jguk.org>. 289*69606e3fSchristos 290*69606e3fSchristos * main.c: Update the copyright year in the version output. 291*69606e3fSchristos * prepare_w32.bat: Remove this file from the distribution. 292*69606e3fSchristos 293*69606e3fSchristos2006-01-21 Eli Zaretskii <eliz@gnu.org> 294*69606e3fSchristos 295*69606e3fSchristos * remake.c (update_goal_chain): Set g->changed instead of 296*69606e3fSchristos incrementing it, as it is only 8-bit wide, and could overflow if 297*69606e3fSchristos many commands got started in update_file. 298*69606e3fSchristos 299*69606e3fSchristos * w32/include/sub_proc.h: Add a prototype for process_used_slots. 300*69606e3fSchristos 301*69606e3fSchristos * w32/subproc/sub_proc.c: Change dimension of proc_array[] to 302*69606e3fSchristos MAXIMUM_WAIT_OBJECTS. 303*69606e3fSchristos (process_wait_for_any_private): Change dimension of handles[] 304*69606e3fSchristos array to MAXIMUM_WAIT_OBJECTS. 305*69606e3fSchristos (process_used_slots): New function. 306*69606e3fSchristos (process_register): Don't register more processes than the 307*69606e3fSchristos available number of slots. 308*69606e3fSchristos (process_easy): Don't start new processes if all slots are used up. 309*69606e3fSchristos 310*69606e3fSchristos * job.c (load_too_high, start_waiting_jobs) [WINDOWS32]: If there 311*69606e3fSchristos are already more children than sub_proc.c can handle, behave as if 312*69606e3fSchristos the load were too high. 313*69606e3fSchristos (start_job_command): Fix a typo in error message when process_easy 314*69606e3fSchristos fails. 315*69606e3fSchristos 316*69606e3fSchristos2006-01-14 Eli Zaretskii <eliz@gnu.org> 317*69606e3fSchristos 318*69606e3fSchristos * main.c (main) [WINDOWS32]: Don't refuse to run with -jN, even if 319*69606e3fSchristos the shell is not sh.exe. 320*69606e3fSchristos 321*69606e3fSchristos * job.c (create_batch_file): Renamed from create_batch_filename; 322*69606e3fSchristos all callers changed. Don't close the temporary file; return its 323*69606e3fSchristos file descriptor instead. New arg FD allows to return the file 324*69606e3fSchristos descriptor. 325*69606e3fSchristos (construct_command_argv_internal): Use _fdopen instead of fopen to 326*69606e3fSchristos open the batch file. 327*69606e3fSchristos 328*69606e3fSchristos2006-01-04 Paul D. Smith <psmith@gnu.org> 329*69606e3fSchristos 330*69606e3fSchristos * readme.vms: Updates for case-insensitive VMS file systems from 331*69606e3fSchristos Hartmut Becker <Hartmut.Becker@hp.com>. 332*69606e3fSchristos * dir.c (vms_hash): Ditto. 333*69606e3fSchristos * vmsify.c (copyto): Ditto. 334*69606e3fSchristos * vmsfunctions.c (readdir): Ditto. 335*69606e3fSchristos 336*69606e3fSchristos * make.1: Add a section on the exit codes for make. 337*69606e3fSchristos 338*69606e3fSchristos * doc/make.texi: A number of minor updates to the documentation. 339*69606e3fSchristos 340*69606e3fSchristos2006-01-03 Paul D. Smith <psmith@gnu.org> 341*69606e3fSchristos 342*69606e3fSchristos * remake.c (update_file_1): Mark a prerequisite changed if it 343*69606e3fSchristos doesn't exist. 344*69606e3fSchristos 345*69606e3fSchristos * read.c (eval): Be sure to strip off trailing whitespace from the 346*69606e3fSchristos prerequisites list properly. Also, initialize all fields in 347*69606e3fSchristos struct dep when creating a new one. 348*69606e3fSchristos 349*69606e3fSchristos2005-12-28 Paul D. Smith <psmith@gnu.org> 350*69606e3fSchristos 351*69606e3fSchristos * config.h.W32.template [WINDOWS32]: Add in some pragmas to 352*69606e3fSchristos disable warnings for MSC. 353*69606e3fSchristos Patch by Rob Tulloh <rtulloh@yahoo.com>. 354*69606e3fSchristos 355*69606e3fSchristos2005-12-17 Eli Zaretskii <eliz@gnu.org> 356*69606e3fSchristos 357*69606e3fSchristos * doc/make.texi (Execution): Add a footnote about changes in 358*69606e3fSchristos handling of backslash-newline sequences. Mention the differences 359*69606e3fSchristos on MS-DOS and MS-Windows. 360*69606e3fSchristos 361*69606e3fSchristos * NEWS: More details about building the MinGW port and a pointer 362*69606e3fSchristos to README.W32. Fix the section name that describes the new 363*69606e3fSchristos backward-incompatible processing of backslash-newline sequences. 364*69606e3fSchristos The special processing of SHELL set to "cmd" is only relevant to 365*69606e3fSchristos MS-Windows, not MS-DOS. 366*69606e3fSchristos 367*69606e3fSchristos2005-12-17 Eli Zaretskii <eliz@gnu.org> 368*69606e3fSchristos 369*69606e3fSchristos * main.c (handle_runtime_exceptions): Cast exrec->ExceptionAddress 370*69606e3fSchristos to DWORD, to avoid compiler warnings. 371*69606e3fSchristos * job.c (exec_command): Cast hWaitPID and hPID to DWORD, and 372*69606e3fSchristos use %ld in format, to avoid compiler warnings. 373*69606e3fSchristos 374*69606e3fSchristos * doc/make.texi (Special Targets): Fix a typo. 375*69606e3fSchristos (Appending): Fix cross-reference to Setting. 376*69606e3fSchristos (Special Variables, Secondary Expansion, File Name Functions) 377*69606e3fSchristos (Flavor Function, Pattern Match, Quick Reference): Ensure two 378*69606e3fSchristos periods after a sentence. 379*69606e3fSchristos (Execution): Add @: after "e.g.". 380*69606e3fSchristos (Environment): Fix punctuation. 381*69606e3fSchristos (Target-specific, Call Function, Quick Reference): Add @: after "etc." 382*69606e3fSchristos (Shell Function, Target-specific): Add @: after "vs." 383*69606e3fSchristos 384*69606e3fSchristos2005-12-14 Boris Kolpackov <boris@kolpackov.net> 385*69606e3fSchristos 386*69606e3fSchristos * read.c (record_target_var): Initialize variable's export field 387*69606e3fSchristos with v_default instead of leaving it "initialized" by whatever 388*69606e3fSchristos garbage happened to be on the heap. 389*69606e3fSchristos 390*69606e3fSchristos2005-12-12 Paul D. Smith <psmith@gnu.org> 391*69606e3fSchristos 392*69606e3fSchristos * make.1: Fix some display errors and document all existing options. 393*69606e3fSchristos Patch provided by Mike Frysinger <vapier@gentoo.org>. 394*69606e3fSchristos 395*69606e3fSchristos2005-12-11 Paul D. Smith <psmith@gnu.org> 396*69606e3fSchristos 397*69606e3fSchristos * implicit.c (pattern_search): If 2nd expansion is not set for 398*69606e3fSchristos this implicit rule, replace the pattern with the stem directly, 399*69606e3fSchristos and don't re-expand the variable list. Along with the other 400*69606e3fSchristos .SECONDEXPANSION changes below, fixes bug #13781. 401*69606e3fSchristos 402*69606e3fSchristos2005-12-09 Boris Kolpackov <boris@kolpackov.net> 403*69606e3fSchristos 404*69606e3fSchristos * implicit.c (pattern_search): Mark other files that this rule 405*69606e3fSchristos builds as targets so that they are not treated as intermediates 406*69606e3fSchristos by the pattern rule search algorithm. Fixes bug #13022. 407*69606e3fSchristos 408*69606e3fSchristos2005-12-07 Boris Kolpackov <boris@kolpackov.net> 409*69606e3fSchristos 410*69606e3fSchristos * remake.c (notice_finished_file): Propagate the change of 411*69606e3fSchristos modification time to all the double-colon entries only if 412*69606e3fSchristos it is the last one to be updated. Fixes bug #14334. 413*69606e3fSchristos 414*69606e3fSchristos2005-11-17 Boris Kolpackov <boris@kolpackov.net> 415*69606e3fSchristos 416*69606e3fSchristos * function.c (func_flavor): Implement the flavor function which 417*69606e3fSchristos returns the flavor of a variable. 418*69606e3fSchristos * doc/make.texi (Functions for Transforming Text): Document it. 419*69606e3fSchristos * NEWS: Add it to the list of new functions. 420*69606e3fSchristos 421*69606e3fSchristos2005-11-14 Boris Kolpackov <boris@kolpackov.net> 422*69606e3fSchristos 423*69606e3fSchristos * read.c (construct_include_path): Set the .INCLUDE_DIRS special 424*69606e3fSchristos variable. 425*69606e3fSchristos * doc/make.texi (Special Variables): Document .INCLUDE_DIRS. 426*69606e3fSchristos * NEWS: Add .INCLUDE_DIRS to the list of new special variables. 427*69606e3fSchristos 428*69606e3fSchristos2005-10-26 Paul Smith <psmith@gnu.org> 429*69606e3fSchristos 430*69606e3fSchristos * read.c (record_files): Don't set deps flags if there are no deps. 431*69606e3fSchristos * maintMakefile: We only need to build the templates when we are 432*69606e3fSchristos creating a distribution, so don't do it for "all". 433*69606e3fSchristos 434*69606e3fSchristos2005-10-24 Paul D. Smith <psmith@gnu.org> 435*69606e3fSchristos 436*69606e3fSchristos Make secondary expansion optional: its enabled by declaring the 437*69606e3fSchristos special target .SECONDEXPANSION. 438*69606e3fSchristos 439*69606e3fSchristos * NEWS: Update information on second expansion capabilities. 440*69606e3fSchristos * doc/make.texi (Secondary Expansion): Document the 441*69606e3fSchristos .SECONDEXPANSION special target and its behavior. 442*69606e3fSchristos * dep.h (struct dep): Add a flag STATICPATTERN, set to true if the 443*69606e3fSchristos prerequisite list was found in a static pattern rule. 444*69606e3fSchristos (free_dep_chain): Declare a prototype. 445*69606e3fSchristos * file.c (parse_prereqs): New function: break out some complexity 446*69606e3fSchristos from expand_deps(). 447*69606e3fSchristos (expand_deps): If we aren't doing second expansion, replace % with 448*69606e3fSchristos the stem for static pattern rules. Call the new function. 449*69606e3fSchristos * filedef.h (parse_prereqs): Declare a prototype. 450*69606e3fSchristos * implicit.c (pattern_search): Initialize the new staticpattern 451*69606e3fSchristos field. 452*69606e3fSchristos * main.c (second_expansion): Declare a global variable to remember 453*69606e3fSchristos if the special target has been seen. Initialize the new 454*69606e3fSchristos staticpattern field for prerequisites. 455*69606e3fSchristos * make.h: Extern for second_expansion. 456*69606e3fSchristos * misc.c (free_dep_chain): New function: frees a struct dep list. 457*69606e3fSchristos * read.c (read_all_makefiles): Initialize the staticpattern field. 458*69606e3fSchristos (eval_makefile): Ditto. 459*69606e3fSchristos (record_files): Check for the .SECONDEXPANSION target and set 460*69606e3fSchristos second_expansion global if it's found. 461*69606e3fSchristos Use the new free_dep_chain() instead of doing it by hand. 462*69606e3fSchristos Set the staticpattern field for prereqs of static pattern targets. 463*69606e3fSchristos 464*69606e3fSchristos2005-10-16 Paul D. Smith <psmith@gnu.org> 465*69606e3fSchristos 466*69606e3fSchristos * main.c (main): Set CURDIR to be a file variable instead of a 467*69606e3fSchristos default, so that values of CURDIR inherited from the environment 468*69606e3fSchristos won't override the make value. 469*69606e3fSchristos 470*69606e3fSchristos2005-09-26 Paul D. Smith <psmith@gnu.org> 471*69606e3fSchristos 472*69606e3fSchristos * job.c (construct_command_argv_internal): If the line is empty 473*69606e3fSchristos remember to free the temporary argv strings. 474*69606e3fSchristos Fixes bug # 14527. 475*69606e3fSchristos 476*69606e3fSchristos2005-09-16 Paul D. Smith <psmith@gnu.org> 477*69606e3fSchristos 478*69606e3fSchristos * job.c (start_job_command): The noerror flag is a boolean (single 479*69606e3fSchristos bit); set it appropriately. 480*69606e3fSchristos Reported by Mark Eichin <eichin@metacarta.com> 481*69606e3fSchristos 482*69606e3fSchristos2005-08-29 Paul D. Smith <psmith@gnu.org> 483*69606e3fSchristos 484*69606e3fSchristos * function.c (func_error): On Windows, output from $(info ...) 485*69606e3fSchristos seems to come in the wrong order. Try to force it with fflush(). 486*69606e3fSchristos 487*69606e3fSchristos2005-08-10 Boris Kolpackov <boris@kolpackov.net> 488*69606e3fSchristos 489*69606e3fSchristos * read.c (record_files): Move code that sets stem for static 490*69606e3fSchristos pattern rules out of the if (!two_colon) condition so it is 491*69606e3fSchristos also executed for two-colon rules. Fixes Savannah bug #13881. 492*69606e3fSchristos 493*69606e3fSchristos2005-08-08 Paul D. Smith <psmith@gnu.org> 494*69606e3fSchristos 495*69606e3fSchristos * make.h: Don't test that __STDC__ is non-0. Some compilers 496*69606e3fSchristos (Windows for example) set it to 0 to denote "ISO C + extensions". 497*69606e3fSchristos Fixes bug # 13594. 498*69606e3fSchristos 499*69606e3fSchristos2005-08-07 Paul D. Smith <psmith@gnu.org> 500*69606e3fSchristos 501*69606e3fSchristos * w32/pathstuff.c (getcwd_fs): Fix warning about assignment in a 502*69606e3fSchristos conditional (slightly different version of a fix from Eli). 503*69606e3fSchristos 504*69606e3fSchristos Fix a bug reported by Michael Matz <matz@suse.de>: patch included. 505*69606e3fSchristos If make is running in parallel without -k and two jobs die in a 506*69606e3fSchristos row, but not too close to each other, then make will quit without 507*69606e3fSchristos waiting for the rest of the jobs to die. 508*69606e3fSchristos 509*69606e3fSchristos * main.c (die): Don't reset err before calling reap_children() the 510*69606e3fSchristos second time: we still want it to be in the error condition. 511*69606e3fSchristos * job.c (reap_children): Use a static variable, rather than err, 512*69606e3fSchristos to control whether or not the error message should be printed. 513*69606e3fSchristos 514*69606e3fSchristos2005-08-06 Eli Zaretskii <eliz@gnu.org> 515*69606e3fSchristos 516*69606e3fSchristos * w32/subproc/sub_proc.c: Include signal.h. 517*69606e3fSchristos (process_pipe_io, process_file_io): Pass a pointer to a local 518*69606e3fSchristos DWORD variable to GetExitCodeProcess. If the exit code is 519*69606e3fSchristos CONTROL_C_EXIT, put SIGINT into pproc->signal. 520*69606e3fSchristos 521*69606e3fSchristos * job.c [WINDOWS32]: Include windows.h. 522*69606e3fSchristos (main_thread) [WINDOWS32]: New global variable. 523*69606e3fSchristos (reap_children) [WINDOWS32]: Get the handle for the main thread 524*69606e3fSchristos and store it in main_thread. 525*69606e3fSchristos 526*69606e3fSchristos * commands.c [WINDOWS32]: Include windows.h and w32err.h. 527*69606e3fSchristos (fatal_error_signal) [WINDOWS32]: Suspend the main thread before 528*69606e3fSchristos doing anything else. When we are done, close the main thread 529*69606e3fSchristos handle and exit with status 130. 530*69606e3fSchristos 531*69606e3fSchristos2005-07-30 Eli Zaretskii <eliz@gnu.org> 532*69606e3fSchristos 533*69606e3fSchristos * w32/subproc/sub_proc.c (process_begin): Don't pass a NULL 534*69606e3fSchristos pointer to fprintf. 535*69606e3fSchristos 536*69606e3fSchristos * main.c (find_and_set_default_shell): If found a DOSish shell, 537*69606e3fSchristos set sh_found and the value of default_shell, and report the 538*69606e3fSchristos findings in debug mode. 539*69606e3fSchristos 540*69606e3fSchristos * job.c (construct_command_argv_internal): Check unixy_shell, not 541*69606e3fSchristos no_default_sh_exe, to decide whether to use Unixy or DOSish 542*69606e3fSchristos builtin commands. 543*69606e3fSchristos 544*69606e3fSchristos * README.W32: Update with info about the MinGW build. 545*69606e3fSchristos 546*69606e3fSchristos * build_w32.bat: Support MinGW. 547*69606e3fSchristos 548*69606e3fSchristos * w32/subproc/build.bat: Likewise. 549*69606e3fSchristos 550*69606e3fSchristos * w32/subproc/sub_proc.c (process_easy): Fix format strings for 551*69606e3fSchristos printing DWORD args. 552*69606e3fSchristos 553*69606e3fSchristos * function.c (windows32_openpipe): Fix format strings for printing 554*69606e3fSchristos DWORD args. 555*69606e3fSchristos 556*69606e3fSchristos * job.c (reap_children) [WINDOWS32]: Don't declare 'status' and 557*69606e3fSchristos 'reap_mode'. 558*69606e3fSchristos (start_job_command): Fix format string for printing the result of 559*69606e3fSchristos process_easy. 560*69606e3fSchristos (start_job_command) [WINDOWS32]: Do not define. 561*69606e3fSchristos (exec_command): Fix format string for printing HANDLE args. 562*69606e3fSchristos 563*69606e3fSchristos * main.c (handle_runtime_exceptions): Fix sprintf format strings 564*69606e3fSchristos to avoid compiler warnings. 565*69606e3fSchristos (open_tmpfile): Declare fd only if HAVE_FDOPEN is defined. 566*69606e3fSchristos (Note: some of these fixes were submitted independently by J. Grant) 567*69606e3fSchristos 568*69606e3fSchristos2005-07-30 J. Grant <jg@jguk.org> 569*69606e3fSchristos 570*69606e3fSchristos * prepare_w32.bat: Copy config.h.w32 to config.h if not exist. 571*69606e3fSchristos * make_msvc_net2003.vcproj, make_msvc_net2003.sln: MSVC Project files. 572*69606e3fSchristos * Makefile.am (EXTRA_DIST): Add MSVC Project files. 573*69606e3fSchristos 574*69606e3fSchristos2005-07-15 Paul Smith <psmith@gnu.org> 575*69606e3fSchristos 576*69606e3fSchristos * job.c (construct_command_argv_internal) [DOS,WINDOWS32,OS/2]: If 577*69606e3fSchristos we don't have a POSIX shell, then revert to the old 578*69606e3fSchristos backslash-newline behavior (where they are stripped). 579*69606e3fSchristos Fixes bug #13665. 580*69606e3fSchristos 581*69606e3fSchristos2005-07-08 Paul D. Smith <psmith@gnu.org> 582*69606e3fSchristos 583*69606e3fSchristos * config.h.W32.template: Reorder to match the standard config.h, 584*69606e3fSchristos for easier comparisons. 585*69606e3fSchristos From J. Grant <jg@jguk.org> 586*69606e3fSchristos 587*69606e3fSchristos * maintMakefile: Remove .dep_segment before overwriting it, in 588*69606e3fSchristos case it's not writable or noclobber is set. 589*69606e3fSchristos * expand.c (variable_expand_string): Cast result of pointer 590*69606e3fSchristos arithmetic to avoid a warning. 591*69606e3fSchristos * main.c (switches): Add full-fledged final initializer. 592*69606e3fSchristos 593*69606e3fSchristos2005-07-06 Paul D. Smith <psmith@gnu.org> 594*69606e3fSchristos 595*69606e3fSchristos * configure.in: IRIX has _sys_siglist. Tru64 UNIX has __sys_siglist. 596*69606e3fSchristos * signame.c (strsignal): If we found _sys_siglist[] or 597*69606e3fSchristos __sys_siglist[] use those instead of sys_siglist[]. 598*69606e3fSchristos From Albert Chin <china@thewrittenword.com> 599*69606e3fSchristos 600*69606e3fSchristos2005-07-04 Paul D. Smith <psmith@gnu.org> 601*69606e3fSchristos 602*69606e3fSchristos * config.h-vms.template [VMS]: Latest VMS has its own glob() and 603*69606e3fSchristos globfree(); set up to use the GNU versions. 604*69606e3fSchristos From Martin Zinser <zinser@zinser.no-ip.info> 605*69606e3fSchristos 606*69606e3fSchristos2005-07-03 Paul D. Smith <psmith@gnu.org> 607*69606e3fSchristos 608*69606e3fSchristos From J. Grant <jg@jguk.org>: 609*69606e3fSchristos 610*69606e3fSchristos * README.W32.template: Update the Windows and tested MSVC versions. 611*69606e3fSchristos * NMakefile.template (CFLAGS_any): Change warning level from W3 to W4. 612*69606e3fSchristos * w32/subproc/NMakefile (CFLAGS_any): Ditto. 613*69606e3fSchristos * build_w32.bat: Ditto. 614*69606e3fSchristos * w32/subproc/build.bat: Ditto. 615*69606e3fSchristos 616*69606e3fSchristos2005-06-28 Paul D. Smith <psmith@gnu.org> 617*69606e3fSchristos 618*69606e3fSchristos * signame.c: HAVE_DECL_* macros are set to 0, not undef, if the 619*69606e3fSchristos declaration was checked but not present. 620*69606e3fSchristos 621*69606e3fSchristos2005-06-27 Paul D. Smith <psmith@gnu.org> 622*69606e3fSchristos 623*69606e3fSchristos * dir.c (find_directory): Change type of fs_serno/fs_flags/fs_len 624*69606e3fSchristos to unsigned long. Fixes Savannah bug #13550. 625*69606e3fSchristos 626*69606e3fSchristos * w32/subproc/sub_proc.c: Remove (HANDLE) casts on lvalues. 627*69606e3fSchristos (process_pipe_io): Initialize tStdin/tStdout/tStderr variables. 628*69606e3fSchristos Fixes Savannah bug #13551. 629*69606e3fSchristos 630*69606e3fSchristos2005-06-26 Paul D. Smith <psmith@gnu.org> 631*69606e3fSchristos 632*69606e3fSchristos * make.h: Fix bug in ANSI_STRING/strerror() handling; only define 633*69606e3fSchristos it if ANSI_STRING is not set. 634*69606e3fSchristos 635*69606e3fSchristos2005-06-25 Paul D. Smith <psmith@gnu.org> 636*69606e3fSchristos 637*69606e3fSchristos * read.c (eval): If no filenames are passed to any of the 638*69606e3fSchristos "include" variants, don't print an error. 639*69606e3fSchristos * doc/make.texi (Include): Document this. 640*69606e3fSchristos Fixes Savannah bug #1761. 641*69606e3fSchristos 642*69606e3fSchristos * job.c (construct_command_argv_internal): Sanitize handling of 643*69606e3fSchristos backslash/newline pairs according to POSIX: that is, keep the 644*69606e3fSchristos backslash-newline in the command script, but remove a following 645*69606e3fSchristos TAB character, if present. In the fast path, make sure that the 646*69606e3fSchristos behavior matches what the shell would do both inside and outside 647*69606e3fSchristos of quotes. In the slow path, quote the backslash and put a 648*69606e3fSchristos literal newline in the string. 649*69606e3fSchristos Fixes Savannah bug #1332. 650*69606e3fSchristos * doc/make.texi (Execution): Document the new behavior and give 651*69606e3fSchristos some examples. 652*69606e3fSchristos * NEWS: Make a note of the new behavior. 653*69606e3fSchristos 654*69606e3fSchristos * make.h [WINDOWS32]: #include <direct.h>. 655*69606e3fSchristos Fixes Savannah bug #13478. 656*69606e3fSchristos 657*69606e3fSchristos * remake.c (name_mtime): If the stat() of a file fails and the -L 658*69606e3fSchristos option was given and the file is a symlink, take the best mtime of 659*69606e3fSchristos the symlink we can get as the mtime of the file and don't fail. 660*69606e3fSchristos Fixes Savannah bug #13280. 661*69606e3fSchristos 662*69606e3fSchristos * read.c (find_char_unquote): Accept a new argument IGNOREVARS. 663*69606e3fSchristos If it's set, then don't stop on STOPCHARs or BLANKs if they're 664*69606e3fSchristos inside a variable reference. Make this function static as it's 665*69606e3fSchristos only used here. 666*69606e3fSchristos (eval): Call find_char_unquote() with IGNOREVARS set when we're 667*69606e3fSchristos parsing an unexpanded line looking for semicolons. 668*69606e3fSchristos Fixes Savannah bug #1454. 669*69606e3fSchristos * misc.c (remove_comments): Move this to read.c and make it static 670*69606e3fSchristos as it's only used there. Call find_char_unquote() with new arg. 671*69606e3fSchristos * make.h: Remove prototypes for find_char_unquote() and 672*69606e3fSchristos remove_comments() since they're static now. 673*69606e3fSchristos 674*69606e3fSchristos * main.c (main): If we see MAKE_RESTARTS in the environment, unset 675*69606e3fSchristos its export flag and obtain its value. When we need to re-exec, 676*69606e3fSchristos increment the value and add it into the environment. 677*69606e3fSchristos * doc/make.texi (Special Variables): Document MAKE_RESTARTS. 678*69606e3fSchristos * NEWS: Mention MAKE_RESTARTS. 679*69606e3fSchristos * main.c (always_make_set): New variable. Change the -B option to 680*69606e3fSchristos set this one instead. 681*69606e3fSchristos (main): When checking makefiles, only set always_make_flag if 682*69606e3fSchristos always_make_set is set AND the restarts flag is 0. When building 683*69606e3fSchristos normal targets, set it IFF always_make_set is set. 684*69606e3fSchristos (main): Avoid infinite recursion with -W, too: only set what-if 685*69606e3fSchristos files to NEW before we check makefiles if we've never restarted 686*69606e3fSchristos before. If we have restarted, set what-if files to NEW _after_ we 687*69606e3fSchristos check makefiles. 688*69606e3fSchristos Fixes Savannah bug #7566: 689*69606e3fSchristos 690*69606e3fSchristos2005-06-17 Paul D. Smith <psmith@gnu.org> 691*69606e3fSchristos 692*69606e3fSchristos * default.c: Change VMS implicit rules to use $$$$ instead of $$ 693*69606e3fSchristos in the prerequisites list. 694*69606e3fSchristos 695*69606e3fSchristos2005-06-12 Paul D. Smith <psmith@gnu.org> 696*69606e3fSchristos 697*69606e3fSchristos Fix Savannah bug # 1328. 698*69606e3fSchristos 699*69606e3fSchristos * configure.in: Check for atexit(). 700*69606e3fSchristos * misc.c (close_stdout): Test stdout to see if writes to it have 701*69606e3fSchristos failed. If so, be sure to exit with a non-0 error code. Based on 702*69606e3fSchristos code found in gnulib. 703*69606e3fSchristos * make.h: Prototype. 704*69606e3fSchristos * main.c (main): Install close_stdout() with atexit(). 705*69606e3fSchristos 706*69606e3fSchristos2005-06-10 Paul D. Smith <psmith@gnu.org> 707*69606e3fSchristos 708*69606e3fSchristos VMS build updates from Hartmut Becker <Hartmut.Becker@hp.com>: 709*69606e3fSchristos 710*69606e3fSchristos * vmsjobs.c [VMS]: Updates to compile on VMS: add some missing 711*69606e3fSchristos headers; make vmsWaitForChildren() static; extern vmsify(). 712*69606e3fSchristos * job.c [VMS]: Move vmsWaitForChildren() prototype to be global. 713*69606e3fSchristos Don't create child_execute_job() here (it's in vmsjobs.c). 714*69606e3fSchristos * makefile.vms (job.obj) [VMS]: Add vmsjobs.c as a prerequisite. 715*69606e3fSchristos 716*69606e3fSchristos2005-06-09 Paul D. Smith <psmith@gnu.org> 717*69606e3fSchristos 718*69606e3fSchristos * variable.c (push_new_variable_scope): File variables point 719*69606e3fSchristos directly to the global_setlist variable. So, inserting a new 720*69606e3fSchristos scope in front of that has no effect on those variables: they 721*69606e3fSchristos don't go through current_variable_set_list. If we're pushing a 722*69606e3fSchristos scope and the current scope is global, push it "the other way" so 723*69606e3fSchristos that the new setlist is in the global_setlist variable, and 724*69606e3fSchristos next points to a new setlist with the global variable set. 725*69606e3fSchristos (pop_variable_scope): Properly undo a push with the new 726*69606e3fSchristos semantics. 727*69606e3fSchristos Fixes Savannah bug #11913. 728*69606e3fSchristos 729*69606e3fSchristos2005-05-31 Boris Kolpackov <boris@kolpackov.net> 730*69606e3fSchristos 731*69606e3fSchristos * job.c (reap_children): Don't die of the command failed but 732*69606e3fSchristos the dontcare flag is set. Fixes Savannah bug #13216. 733*69606e3fSchristos 734*69606e3fSchristos * implicit.c (pattern_search): When creating a target from 735*69606e3fSchristos an implicit rule match, lookup pattern target and set precious 736*69606e3fSchristos flag in a newly created target. Fixes Savannah bug #13218. 737*69606e3fSchristos 738*69606e3fSchristos2005-05-13 Paul D. Smith <psmith@gnu.org> 739*69606e3fSchristos 740*69606e3fSchristos Implement "if... else if... endif" syntax. 741*69606e3fSchristos 742*69606e3fSchristos * read.c (eval): Push all checks for conditional words ("ifeq", 743*69606e3fSchristos "else", etc.) down into the conditional_line() function. 744*69606e3fSchristos (conditional_line): Rework to allow "else if..." clause. New 745*69606e3fSchristos return value -2 for lines which are not conditionals. The 746*69606e3fSchristos ignoring flag can now also be 2, which means "already parsed a 747*69606e3fSchristos true branch". If that value is seen no other branch of this 748*69606e3fSchristos conditional can be considered true. In the else parsing if there 749*69606e3fSchristos is extra text after the else, invoke conditional_line() 750*69606e3fSchristos recursively to see if it's another conditional. If not, it's an 751*69606e3fSchristos error. If so, raise the conditional value to this level instead 752*69606e3fSchristos of creating a new conditional nesting level. Special check for 753*69606e3fSchristos "else" and "endif", which aren't allowed on the "else" line. 754*69606e3fSchristos * doc/make.texi (Conditional Syntax): Document the new syntax. 755*69606e3fSchristos 756*69606e3fSchristos2005-05-09 Paul D. Smith <psmith@gnu.org> 757*69606e3fSchristos 758*69606e3fSchristos * Makefile.am (EXTRA_make_SOURCES): Add vmsjobs.c 759*69606e3fSchristos (MAYBE_W32): Rework how SUBDIRS are handled so that "make dist" 760*69606e3fSchristos recurses to the w32 directory, even on non-Windows systems. Use 761*69606e3fSchristos the method suggested in the automake manual. 762*69606e3fSchristos * configure.in: Add w32/Makefile to AC_CONFIG_FILES. 763*69606e3fSchristos * maintMakefile (gnulib-url): They moved the texinfo.tex files. 764*69606e3fSchristos 765*69606e3fSchristos2005-05-07 Paul D. Smith <psmith@gnu.org> 766*69606e3fSchristos 767*69606e3fSchristos * main.c (die): If we're dying with a fatal error (not that a 768*69606e3fSchristos command has failed), write back any leftover tokens before we go. 769*69606e3fSchristos 770*69606e3fSchristos * job.c (set_child_handler_action_flags): If there are jobs 771*69606e3fSchristos waiting for the load to go down, set an alarm to go off in 1 772*69606e3fSchristos second. This allows us to wake up from a potentially long-lasting 773*69606e3fSchristos read() and start a new job if the load has gone down. Turn it off 774*69606e3fSchristos after the read. 775*69606e3fSchristos (job_noop): Dummy signal handler function. 776*69606e3fSchristos (new_job): Invoke it with the new semantics. 777*69606e3fSchristos 778*69606e3fSchristos * docs/make.texi: Document secondary expansion. Various cleanups 779*69606e3fSchristos and random work. 780*69606e3fSchristos 781*69606e3fSchristos2005-05-03 Paul D. Smith <psmith@gnu.org> 782*69606e3fSchristos 783*69606e3fSchristos Rename .DEFAULT_TARGET to .DEFAULT_GOAL: in GNU make terminology 784*69606e3fSchristos the targets which are to ultimately be made are called "goals"; 785*69606e3fSchristos see the GNU make manual. Also, MAKECMDGOALS, etc. 786*69606e3fSchristos 787*69606e3fSchristos * filedef.h, read.c, main.c: Change .DEFAULT_TARGET to 788*69606e3fSchristos .DEFAULT_GOAL, and default_target_name to default_goal_name. 789*69606e3fSchristos * doc/make.texi (Special Variables): Document .DEFAULT_GOAL. 790*69606e3fSchristos 791*69606e3fSchristos2005-05-02 Paul D. Smith <psmith@gnu.org> 792*69606e3fSchristos 793*69606e3fSchristos * job.c, vmsjobs.c (vmsWaitForChildren, vms_redirect, 794*69606e3fSchristos vms_handle_apos, vmsHandleChildTerm, reEnableAst, astHandler, 795*69606e3fSchristos tryToSetupYAst, child_execute_job) [VMS]: Move VMS-specific 796*69606e3fSchristos functions to vmsjobs.c. #include it into jobs.c. 797*69606e3fSchristos 798*69606e3fSchristos Grant Taylor <gtaylor@picante.com> reports that -j# can lose 799*69606e3fSchristos jobserver tokens. I found that this happens when an exported 800*69606e3fSchristos recursive variable contains a $(shell ...) function reference: in 801*69606e3fSchristos this situation we could "forget" to write back a token. 802*69606e3fSchristos 803*69606e3fSchristos * job.c, job.h: Add variable jobserver_tokens: counts the tokens 804*69606e3fSchristos we have. It's not reliable to depend on the number of children in 805*69606e3fSchristos our linked list so keep a separate count. 806*69606e3fSchristos (new_job): Check jobserver_tokens rather than children && 807*69606e3fSchristos waiting_jobs. Increment jobserver_tokens when we get one. 808*69606e3fSchristos (free_child): If jobserver_tokens is 0, internal error. If it's 809*69606e3fSchristos >1, write a token back to the jobserver pipe (we don't write a 810*69606e3fSchristos token for the "free" job). Decrement jobserver_tokens. 811*69606e3fSchristos 812*69606e3fSchristos * main.c: Add variable master_job_slots. 813*69606e3fSchristos (main): Set it to hold the number of jobs requested if we're the 814*69606e3fSchristos master process, when using the jobserver. 815*69606e3fSchristos (die): Sanity checks: first test jobserver_tokens to make sure 816*69606e3fSchristos this process isn't holding any tokens we didn't write back. 817*69606e3fSchristos Second, if master_job_slots is set count the tokens left in the 818*69606e3fSchristos jobserver pipe and ensure it's the same as master_job_slots (- 1). 819*69606e3fSchristos 820*69606e3fSchristos2005-04-24 Paul D. Smith <psmith@gnu.org> 821*69606e3fSchristos 822*69606e3fSchristos Grant Taylor <gtaylor@picante.com> reports that -j# in conjunction 823*69606e3fSchristos with -l# can lose jobserver tokens, because waiting jobs are not 824*69606e3fSchristos consulted properly when checking for the "free" token. 825*69606e3fSchristos 826*69606e3fSchristos * job.c (free_child): Count waiting_jobs as having tokens. 827*69606e3fSchristos * job.c (new_job): Ditto. Plus, call start_waiting_jobs() here to 828*69606e3fSchristos handle jobs waiting for the load to drop. 829*69606e3fSchristos 830*69606e3fSchristos2005-04-23 Paul D. Smith <psmith@gnu.org> 831*69606e3fSchristos 832*69606e3fSchristos * main.c (main): Be careful to not core if a variable setting in 833*69606e3fSchristos the environment doesn't contain an '='. This is illegal but can 834*69606e3fSchristos happen in broken setups. 835*69606e3fSchristos Reported by Joerg Schilling <schilling@fokus.fraunhofer.de>. 836*69606e3fSchristos 837*69606e3fSchristos2005-04-12 Paul D. Smith <psmith@gnu.org> 838*69606e3fSchristos 839*69606e3fSchristos The second expansion feature causes significant slowdown. Timing 840*69606e3fSchristos a complex makefile (GCC 4.1) shows a slowdown from .25s to just 841*69606e3fSchristos read the makefile before the feature, to 11+s to do the same 842*69606e3fSchristos operations after the feature. Additionally, memory usage 843*69606e3fSchristos increased drastically. To fix this I added some intelligence that 844*69606e3fSchristos avoids the overhead of the second expansion unless it's required. 845*69606e3fSchristos 846*69606e3fSchristos * dep.h: Add a new boolean field, need_2nd_expansion. 847*69606e3fSchristos 848*69606e3fSchristos * read.c (eval): When creating the struct dep for the target, 849*69606e3fSchristos check if the name contains a "$"; if so set need_2nd_expansion to 1. 850*69606e3fSchristos (record_files): If there's a "%" in a static pattern rule, it gets 851*69606e3fSchristos converted to "$*" so set need_2nd_expansion to 1. 852*69606e3fSchristos 853*69606e3fSchristos * file.c (expand_deps): Rework to be more efficient. Only perform 854*69606e3fSchristos initialize_file_variables(), set_file_variables(), and 855*69606e3fSchristos variable_expand_for_file() if the need_2nd_expansion is set. 856*69606e3fSchristos 857*69606e3fSchristos * implicit.c (pattern_search): Default need_2nd_expansion to 0. 858*69606e3fSchristos (pattern_search): Ditto. 859*69606e3fSchristos * main.c (handle_non_switch_argument): Ditto. 860*69606e3fSchristos (main): Ditto. 861*69606e3fSchristos * read.c (read_all_makefiles): Ditto. 862*69606e3fSchristos (eval_makefile): Ditto. 863*69606e3fSchristos 864*69606e3fSchristos2005-04-07 Paul D. Smith <psmith@gnu.org> 865*69606e3fSchristos 866*69606e3fSchristos * main.c (main) [WINDOWS32]: Export PATH to sub-shells, not Path. 867*69606e3fSchristos * variable.c (sync_Path_environment): Ditto. 868*69606e3fSchristos Patch by Alessandro Vesely. Fixes Savannah bug #12209. 869*69606e3fSchristos 870*69606e3fSchristos * main.c (main): Define the .FEATURES variable. 871*69606e3fSchristos * NEWS: Announce .FEATURES. 872*69606e3fSchristos * doc/make.texi (Special Variables): Document .FEATURES. 873*69606e3fSchristos 874*69606e3fSchristos * remake.c (check_dep): If a file is .PHONY, update it even if 875*69606e3fSchristos it's marked intermediate. Fixes Savannah bug #12331. 876*69606e3fSchristos 877*69606e3fSchristos2005-03-15 Boris Kolpackov <boris@kolpackov.net> 878*69606e3fSchristos 879*69606e3fSchristos * file.c (expand_deps): Factor out the second expansion and 880*69606e3fSchristos prerequisite line parsing logic from snap_deps(). 881*69606e3fSchristos 882*69606e3fSchristos * file.c (snap_deps): Use expand_deps(). Expand and parse 883*69606e3fSchristos prerequisites of the .SUFFIXES special target first. Fixes 884*69606e3fSchristos Savannah bug #12320. 885*69606e3fSchristos 886*69606e3fSchristos2005-03-13 Paul D. Smith <psmith@gnu.org> 887*69606e3fSchristos 888*69606e3fSchristos * main.c (main) [MSDOS]: Export SHELL in MSDOS. Requested by Eli 889*69606e3fSchristos Zaretskii. 890*69606e3fSchristos 891*69606e3fSchristos2005-03-11 Paul D. Smith <psmith@gnu.org> 892*69606e3fSchristos 893*69606e3fSchristos * signame.c (strsignal): HAVE_DECL_SYS_SIGLIST is 0 when not 894*69606e3fSchristos available, not undefined (from Earnie Boyd). 895*69606e3fSchristos 896*69606e3fSchristos2005-03-10 Boris Kolpackov <boris@kolpackov.net> 897*69606e3fSchristos 898*69606e3fSchristos * implicit.c (pattern_search): Mark an intermediate target as 899*69606e3fSchristos precious if it happened to be a prerequisite of some (other) 900*69606e3fSchristos target. Fixes Savannah bug #12267. 901*69606e3fSchristos 902*69606e3fSchristos2005-03-09 Paul D. Smith <psmith@gnu.org> 903*69606e3fSchristos 904*69606e3fSchristos * read.c (eval_makefile): Add alloca(0). 905*69606e3fSchristos (eval_buffer): Ditto. 906*69606e3fSchristos 907*69606e3fSchristos2005-03-09 Boris Kolpackov <boris@kolpackov.net> 908*69606e3fSchristos 909*69606e3fSchristos * main.c (main): Use o_file instead of o_default when defining 910*69606e3fSchristos the .DEFAULT_TARGET special variable. 911*69606e3fSchristos * read.c (eval): Use define_variable_global() instead of 912*69606e3fSchristos define_variable() when setting new value for the .DEFAULT_TARGET 913*69606e3fSchristos special variable. Fixes Savannah bug #12266. 914*69606e3fSchristos 915*69606e3fSchristos2005-03-04 Boris Kolpackov <boris@kolpackov.net> 916*69606e3fSchristos 917*69606e3fSchristos * imlicit.c (pattern_search): Mark files for which an implicit 918*69606e3fSchristos rule has been found as targets. Fixes Savannah bug #12202. 919*69606e3fSchristos 920*69606e3fSchristos2005-03-04 Paul D. Smith <psmith@gnu.org> 921*69606e3fSchristos 922*69606e3fSchristos * AUTHORS: Update. 923*69606e3fSchristos * doc/make.texi (Automatic Variables): Document $|. 924*69606e3fSchristos 925*69606e3fSchristos2005-03-03 Boris Kolpackov <boris@kolpackov.net> 926*69606e3fSchristos 927*69606e3fSchristos * read.c (record_files): Instead of substituting % with 928*69606e3fSchristos actual stem value in dependency list replace it with $*. 929*69606e3fSchristos This fixes stem triple expansion bug. 930*69606e3fSchristos 931*69606e3fSchristos * implicit.c (pattern_search): Copy stem to a separate 932*69606e3fSchristos buffer and make it a properly terminated string. Assign 933*69606e3fSchristos this buffer instead of STEM (which is not terminated) to 934*69606e3fSchristos f->stem. Instead of substituting % with actual stem value 935*69606e3fSchristos in dependency list replace it with $*. This fixes stem 936*69606e3fSchristos triple expansion bug. 937*69606e3fSchristos 938*69606e3fSchristos2005-03-01 Paul D. Smith <psmith@gnu.org> 939*69606e3fSchristos 940*69606e3fSchristos * commands.c (fatal_error_signal) [WINDOWS32]: Don't call kill() 941*69606e3fSchristos on Windows, as it takes a handle not a pid. Just exit. 942*69606e3fSchristos Fix from patch #3679, provided by Alessandro Vesely. 943*69606e3fSchristos 944*69606e3fSchristos * configure.in: Update check for sys_siglist[] from autoconf manual. 945*69606e3fSchristos * signame.c (strsignal): Update to use the new autoconf macro. 946*69606e3fSchristos 947*69606e3fSchristos2005-03-01 Boris Kolpackov <boris@kolpackov.net> 948*69606e3fSchristos 949*69606e3fSchristos * read.c (record_files): Add a check for the list of prerequisites 950*69606e3fSchristos of a static pattern rule being empty. Fixes Savannah bug #12180. 951*69606e3fSchristos 952*69606e3fSchristos2005-02-28 Paul D. Smith <psmith@gnu.org> 953*69606e3fSchristos 954*69606e3fSchristos * doc/make.texi (Text Functions): Update docs to allow the end 955*69606e3fSchristos ordinal for $(wordlist ...) to be 0. 956*69606e3fSchristos * function.c (func_wordlist): Fail if the start ordinal for 957*69606e3fSchristos $(wordlist ...) is <1. Matches documentation. 958*69606e3fSchristos Resolves Savannah support request #103195. 959*69606e3fSchristos 960*69606e3fSchristos * remake.c (update_goal_chain): Fix logic for stopping in -q: 961*69606e3fSchristos previously we were stopping when !-q, exactly the opposite. This 962*69606e3fSchristos has been wrong since version 1.34, in 1994! 963*69606e3fSchristos (update_file): If we got an error don't break out to run more 964*69606e3fSchristos double-colon rules: just return immediately. 965*69606e3fSchristos Fixes Savannah bug #7144. 966*69606e3fSchristos 967*69606e3fSchristos2005-02-27 Paul D. Smith <psmith@gnu.org> 968*69606e3fSchristos 969*69606e3fSchristos * misc.c (end_of_token): Make argument const. 970*69606e3fSchristos * make.h: Update prototype. 971*69606e3fSchristos 972*69606e3fSchristos * function.c (abspath, func_realpath, func_abspath): Use 973*69606e3fSchristos PATH_VAR() and GET_PATH_MAX instead of PATH_MAX. 974*69606e3fSchristos * dir.c (downcase): Use PATH_VAR() instead of PATH_MAX. 975*69606e3fSchristos * read.c (record_files): Ditto. 976*69606e3fSchristos * variable.c (do_variable_definition): Ditto. 977*69606e3fSchristos 978*69606e3fSchristos * function.c (func_error): Create a new function $(info ...) that 979*69606e3fSchristos simply prints the message to stdout with no extras. 980*69606e3fSchristos (function_table_init): Add new function to the table. 981*69606e3fSchristos * NEWS: Add $(info ...) reference. 982*69606e3fSchristos * doc/make.texi (Make Control Functions): Document it. 983*69606e3fSchristos 984*69606e3fSchristos New feature: if the system supports symbolic links, and the user 985*69606e3fSchristos provides the -L/--check-symlink-time flag, then use the latest 986*69606e3fSchristos mtime between the symlink(s) and the target file. 987*69606e3fSchristos 988*69606e3fSchristos * configure.in (MAKE_SYMLINKS): Check for lstat() and 989*69606e3fSchristos readlink(). If both are available, define MAKE_SYMLINKS. 990*69606e3fSchristos * main.c: New variable: check_symlink_flag. 991*69606e3fSchristos (usage): Add a line for -L/--check-symlink-times to the help string. 992*69606e3fSchristos (switches): Add -L/--check-symlink-times command line argument. 993*69606e3fSchristos (main): If MAKE_SYMLINKS is not defined but the user specified -L, 994*69606e3fSchristos print a warning and disable it again. 995*69606e3fSchristos * make.h: Declare check_symlink_flag. 996*69606e3fSchristos * remake.c (name_mtime): If MAKE_SYMLINKS and check_symlink_flag, 997*69606e3fSchristos if the file is a symlink then check each link in the chain and 998*69606e3fSchristos choose the NEWEST mtime we find as the mtime for the file. The 999*69606e3fSchristos newest mtime might be the file itself! 1000*69606e3fSchristos * NEWS: Add information about this new feature. 1001*69606e3fSchristos * doc/make.texi (Options Summary): Add -L/--check-symlink-times docs. 1002*69606e3fSchristos 1003*69606e3fSchristos Avoid core dumps described in Savannah bug # 12124: 1004*69606e3fSchristos 1005*69606e3fSchristos * file.c: New variable snapped_deps remember whether we've run 1006*69606e3fSchristos snap_deps(). 1007*69606e3fSchristos (snap_deps): Set it. 1008*69606e3fSchristos * filedef.h: Extern it. 1009*69606e3fSchristos * read.c (record_files): Check snapped_deps; if it's set then 1010*69606e3fSchristos we're trying to eval a new target/prerequisite relationship from 1011*69606e3fSchristos within a command script, which we don't support. Fatal. 1012*69606e3fSchristos 1013*69606e3fSchristos2005-02-28 Boris Kolpackov <boris@kolpackov.net> 1014*69606e3fSchristos 1015*69606e3fSchristos Implementation of the .DEFAULT_TARGET special variable. 1016*69606e3fSchristos 1017*69606e3fSchristos * read.c (eval): If necessary, update default_target_name when 1018*69606e3fSchristos reading rules. 1019*69606e3fSchristos * read.c (record_files): Update default_target_file if 1020*69606e3fSchristos default_target_name has changed. 1021*69606e3fSchristos * main.c (default_target_name): Define. 1022*69606e3fSchristos * main.c (main): Enter .DEFAULT_TARGET as make variable. If 1023*69606e3fSchristos default_target_name is set use default_target_file as a root 1024*69606e3fSchristos target to make. 1025*69606e3fSchristos * filedef.h (default_target_name): Declare. 1026*69606e3fSchristos * dep.h (free_dep_chain): 1027*69606e3fSchristos * misc.c (free_dep_chain): Change to operate on struct nameseq 1028*69606e3fSchristos and change name to free_ns_chain. 1029*69606e3fSchristos * file.c (snap_deps): Update to use free_ns_chain. 1030*69606e3fSchristos 1031*69606e3fSchristos2005-02-27 Boris Kolpackov <boris@kolpackov.net> 1032*69606e3fSchristos 1033*69606e3fSchristos Implementation of the second expansion in explicit rules, 1034*69606e3fSchristos static pattern rules and implicit rules. 1035*69606e3fSchristos 1036*69606e3fSchristos * read.c (eval): Refrain from chopping up rule's dependencies. 1037*69606e3fSchristos Store them in a struct dep as a single dependency line. Remove 1038*69606e3fSchristos the code that implements SySV-style automatic variables. 1039*69606e3fSchristos 1040*69606e3fSchristos * read.c (record_files): Adjust the code that handles static 1041*69606e3fSchristos pattern rules to expand all percents instead of only the first 1042*69606e3fSchristos one. Reverse the order in which dependencies are stored so that 1043*69606e3fSchristos when the second expansion reverses them again they appear in 1044*69606e3fSchristos the makefile order (with some exceptions, see comments in 1045*69606e3fSchristos the code). Remove the code that implements SySV-style automatic 1046*69606e3fSchristos variables. 1047*69606e3fSchristos 1048*69606e3fSchristos * file.c (snap_deps): Implement the second expansion and chopping 1049*69606e3fSchristos of dependency lines for explicit rules. 1050*69606e3fSchristos 1051*69606e3fSchristos * implicit.c (struct idep): Define an auxiliary data type to hold 1052*69606e3fSchristos implicit rule's dependencies after stem substitution and 1053*69606e3fSchristos expansion. 1054*69606e3fSchristos 1055*69606e3fSchristos * implicit.c (free_idep_chain): Implement. 1056*69606e3fSchristos 1057*69606e3fSchristos * implicit.c (get_next_word): Implement helper function for 1058*69606e3fSchristos parsing implicit rule's dependency lines into words taking 1059*69606e3fSchristos into account variable expansion requests. Used in the stem 1060*69606e3fSchristos splitting code. 1061*69606e3fSchristos 1062*69606e3fSchristos * implicit.c (pattern_search): Implement the second expansion 1063*69606e3fSchristos for implicit rules. Also fixes bug #12091. 1064*69606e3fSchristos 1065*69606e3fSchristos * commands.h (set_file_variables): Declare. 1066*69606e3fSchristos * commands.c (set_file_variables): Remove static specifier. 1067*69606e3fSchristos 1068*69606e3fSchristos * dep.h (free_dep_chain): Declare. 1069*69606e3fSchristos * misc.c (free_dep_chain): Implement. 1070*69606e3fSchristos 1071*69606e3fSchristos * variable.h (variable_expand_for_file): Declare. 1072*69606e3fSchristos * expand.c (variable_expand_for_file): Remove static specifier. 1073*69606e3fSchristos 1074*69606e3fSchristos * make.h (strip_whitespace): Declare. 1075*69606e3fSchristos * function.c (strip_whitespace): Remove static specifier. 1076*69606e3fSchristos 1077*69606e3fSchristos2005-02-26 Paul D. Smith <psmith@gnu.org> 1078*69606e3fSchristos 1079*69606e3fSchristos * main.c (main): Check for ferror() when reading makefiles from stdin. 1080*69606e3fSchristos Apparently some shells in Windows don't close pipes properly and 1081*69606e3fSchristos require this check. 1082*69606e3fSchristos 1083*69606e3fSchristos2005-02-24 Jonathan Grant <jg@jguk.org> 1084*69606e3fSchristos 1085*69606e3fSchristos * configure.in: Add MinGW configuration options, and extra w32 code 1086*69606e3fSchristos directory. 1087*69606e3fSchristos * Makefile.am: Add MinGW configuration options, and extra w32 code 1088*69606e3fSchristos directory. 1089*69606e3fSchristos * main.c: Determine correct program string (after last \ without .exe). 1090*69606e3fSchristos * subproc/sub_proc.c: `GetExitCodeProcess' from incompatible pointer 1091*69606e3fSchristos type fix x2 1092*69606e3fSchristos * w32/Makefile.am: Import to build win32 lib of sub_proc etc. 1093*69606e3fSchristos * subproc/w32err.c: MSVC thread directive not applied to MinGW builds. 1094*69606e3fSchristos * tests/run_make_tests.pl, tests/test_driver.pl: MSYS testing 1095*69606e3fSchristos environment support. 1096*69606e3fSchristos 1097*69606e3fSchristos2004-04-16 Dmitry V. Levin <ldv@altlinux.org> 1098*69606e3fSchristos 1099*69606e3fSchristos * function.c (func_shell): When initializing error_prefix, check 1100*69606e3fSchristos that reading file name is not null. This fixes long-standing 1101*69606e3fSchristos segfault in cases like "make 'a1=$(shell :)' 'a2:=$(a1)'". 1102*69606e3fSchristos 1103*69606e3fSchristos2005-02-09 Paul D. Smith <psmith@gnu.org> 1104*69606e3fSchristos 1105*69606e3fSchristos * maintMakefile: Update the CVS download URL to simplify them. 1106*69606e3fSchristos Also, the ftp://ftp.gnu.org/GNUinfo site was removed so I'm 1107*69606e3fSchristos downloading the .texi files from Savannah now. 1108*69606e3fSchristos 1109*69606e3fSchristos Fixed these issues reported by Markus Mauhart <qwe123@chello.at>: 1110*69606e3fSchristos 1111*69606e3fSchristos * main.c (handle_non_switch_argument): Only add variables to 1112*69606e3fSchristos command_variables if they're not already there: duplicate settings 1113*69606e3fSchristos waste space and can be confusing to read. 1114*69606e3fSchristos 1115*69606e3fSchristos * w32/include/sub_proc.h: Remove WINDOWS32. It's not needed since 1116*69606e3fSchristos this header is never included by non-WINDOWS32 code, and it 1117*69606e3fSchristos requires <config.h> to define which isn't always included first. 1118*69606e3fSchristos 1119*69606e3fSchristos * dir.c (read_dirstream) [MINGW]: Use proper macro names when 1120*69606e3fSchristos testing MINGW32 versions. 1121*69606e3fSchristos 1122*69606e3fSchristos * main.c (log_working_directory): flush stdout to be sure the WD 1123*69606e3fSchristos change is printed before any stderr messages show up. 1124*69606e3fSchristos 1125*69606e3fSchristos2005-02-01 Paul D. Smith <psmith@gnu.org> 1126*69606e3fSchristos 1127*69606e3fSchristos * maintMakefile (po_repo): Update the GNU translation site URL. 1128*69606e3fSchristos 1129*69606e3fSchristos2004-12-01 Paul D. Smith <psmith@gnu.org> 1130*69606e3fSchristos 1131*69606e3fSchristos * main.c (main): Change char* env_shell to struct variable shell_var. 1132*69606e3fSchristos * variable.c (target_environment): Use new shell_var. 1133*69606e3fSchristos 1134*69606e3fSchristos2004-11-30 Paul D. Smith <psmith@gnu.org> 1135*69606e3fSchristos 1136*69606e3fSchristos * configure.in: The old way we avoided creating build.sh from 1137*69606e3fSchristos build.sh.in before build.sh.in exists doesn't work anymore; we 1138*69606e3fSchristos have to use raw M4 (thanks to Andreas Schwab <schwab@suse.de> for 1139*69606e3fSchristos the help!). This also keeps automake from complaining. 1140*69606e3fSchristos * Makefile.am (README): Add a dummy target so automake won't 1141*69606e3fSchristos complain that this file doesn't exist when we checkout from CVS. 1142*69606e3fSchristos * maintMakefile (.dep_segment): Rewrite this rule since newer 1143*69606e3fSchristos versions of automake don't provide DEP_FILES. 1144*69606e3fSchristos 1145*69606e3fSchristos2004-11-30 Boris Kolpackov <boris@kolpackov.net> 1146*69606e3fSchristos 1147*69606e3fSchristos Implementation of `realpath' and `abspath' built-in functions. 1148*69606e3fSchristos 1149*69606e3fSchristos * configure.in: Check for realpath. 1150*69606e3fSchristos * function.c (abspath): Return an absolute file name that does 1151*69606e3fSchristos not contain any `.' or `..' components, nor repeated `/'. 1152*69606e3fSchristos * function.c (func_abspath): For each name call abspath. 1153*69606e3fSchristos * function.c (func_realpath): For each name call realpath 1154*69606e3fSchristos from libc or delegate to abspath if realpath is not available. 1155*69606e3fSchristos * doc/make.texi (Functions for File Names): Document new functions. 1156*69606e3fSchristos * doc/make.texi (Quick Reference): Ditto. 1157*69606e3fSchristos 1158*69606e3fSchristos2004-11-28 Paul D. Smith <psmith@gnu.org> 1159*69606e3fSchristos 1160*69606e3fSchristos * main.c (main) [WINDOWS32]: Remove any trailing slashes from -C 1161*69606e3fSchristos arguments. Fixes bug #10252. 1162*69606e3fSchristos 1163*69606e3fSchristos Fix for bug #1276: Handle SHELL according to POSIX requirements. 1164*69606e3fSchristos 1165*69606e3fSchristos * main.c (main): Set SHELL to v_noexport by default. Remember the 1166*69606e3fSchristos original environment setting of SHELL in the env_shell variable. 1167*69606e3fSchristos * main.h: Export new env_shell variable. 1168*69606e3fSchristos * variable.c (target_environment): If we find a v_noexport 1169*69606e3fSchristos variable for SHELL, add a SHELL variable with the env_shell value. 1170*69606e3fSchristos * doc/make.texi (Quick Reference): Document the POSIX behavior. 1171*69606e3fSchristos * doc/make.texi (Variables/Recursion): Ditto. 1172*69606e3fSchristos 1173*69606e3fSchristos2004-11-28 Paul D. Smith <psmith@gnu.org> 1174*69606e3fSchristos 1175*69606e3fSchristos * main.c (find_and_set_default_shell) [WINDOWS32]: check for 1176*69606e3fSchristos equality of "cmd"/"cmd.exe", not inequality. Fixes bug #11155. 1177*69606e3fSchristos Patch by Alessandro Vesely. 1178*69606e3fSchristos 1179*69606e3fSchristos2004-11-12 Paul D. Smith <psmith@gnu.org> 1180*69606e3fSchristos 1181*69606e3fSchristos * job.c (child_execute_job) [VMS]: Don't treat "#" as a comment on 1182*69606e3fSchristos the command line if it's inside a string. 1183*69606e3fSchristos Patch by: Hartmut Becker <Hartmut.Becker@hp.com> 1184*69606e3fSchristos 1185*69606e3fSchristos2004-10-21 Boris Kolpackov <boris@kolpackov.net> 1186*69606e3fSchristos 1187*69606e3fSchristos * function.c (func_lastword): New function: return last word 1188*69606e3fSchristos from the list of words. 1189*69606e3fSchristos * doc/make.texi: Document $(lastword ). Fix broken links in 1190*69606e3fSchristos Quick Reference section. 1191*69606e3fSchristos 1192*69606e3fSchristos2004-10-06 Paul D. Smith <psmith@gnu.org> 1193*69606e3fSchristos 1194*69606e3fSchristos Apply patch from Alessandro Vesely, provided with bug # 9748. 1195*69606e3fSchristos Fix use of tmpnam() to work with Borland C. 1196*69606e3fSchristos 1197*69606e3fSchristos * job.c (construct_command_argv_internal) [WINDOWS32]: Remove 1198*69606e3fSchristos construction of a temporary filename, and call new function 1199*69606e3fSchristos create_batch_filename(). 1200*69606e3fSchristos (create_batch_filename) [WINDOWS32]: New function to create a 1201*69606e3fSchristos temporary filename. 1202*69606e3fSchristos 1203*69606e3fSchristos2004-10-05 Boris Kolpackov <boris@kolpackov.net> 1204*69606e3fSchristos 1205*69606e3fSchristos * read.c (record_target_var): Expand simple pattern-specific 1206*69606e3fSchristos variable. 1207*69606e3fSchristos * variable.c (initialize_file_variables): Do not expand simple 1208*69606e3fSchristos pattern-specific variable. 1209*69606e3fSchristos 1210*69606e3fSchristos2004-09-28 Boris Kolpackov <boris@kolpackov.net> 1211*69606e3fSchristos 1212*69606e3fSchristos * remake.c (update_file_1): When rebuilding makefiles inherit 1213*69606e3fSchristos dontcare flag from a target that triggered update. 1214*69606e3fSchristos 1215*69606e3fSchristos2004-09-27 Boris Kolpackov <boris@kolpackov.net> 1216*69606e3fSchristos 1217*69606e3fSchristos * variable.c (initialize_file_variables): Mark pattern-specific 1218*69606e3fSchristos variable as a per-target and copy export status. 1219*69606e3fSchristos 1220*69606e3fSchristos2004-09-21 Boris Kolpackov <boris@kolpackov.net> 1221*69606e3fSchristos 1222*69606e3fSchristos * file.c (snap_deps): Mark .PHONY prerequisites as targets. 1223*69606e3fSchristos 1224*69606e3fSchristos * implicit.c (pattern_search): When considering an implicit rule's 1225*69606e3fSchristos prerequisite check that it is actually a target rather then 1226*69606e3fSchristos just an entry in the file hashtable. 1227*69606e3fSchristos 1228*69606e3fSchristos2004-09-21 Paul D. Smith <psmith@gnu.org> 1229*69606e3fSchristos 1230*69606e3fSchristos * read.c (readstring): Fix some logic errors in backslash handling. 1231*69606e3fSchristos (eval): Remove some unnecessary processing in buffer handling. 1232*69606e3fSchristos (record_target_var): Assert that parse_variable_definition() succeeded. 1233*69606e3fSchristos Reported by: Markus Mauhart <qwe123@chello.at>. 1234*69606e3fSchristos 1235*69606e3fSchristos * misc.c: Removed the sindex() function. All instances of this 1236*69606e3fSchristos function were trivially replaceable by the standard strstr() 1237*69606e3fSchristos function, and that function will always have better (or certainly 1238*69606e3fSchristos no worse) performance than the very simple-minded algorithm 1239*69606e3fSchristos sindex() used. This can matter with complex makefiles. 1240*69606e3fSchristos * make.h: Remove the prototype for sindex(). 1241*69606e3fSchristos * function.c (subst_expand): Convert sindex() call to strstr(). 1242*69606e3fSchristos This means we no longer need to track the TLEN value so remove that. 1243*69606e3fSchristos (func_findstring): Convert sindex() to strstr(). 1244*69606e3fSchristos * commands.c (chop_commands): Convert sindex() calls to strstr(). 1245*69606e3fSchristos Suggested by: Markus Mauhart <qwe123@chello.at>. 1246*69606e3fSchristos 1247*69606e3fSchristos * main.c (find_and_set_default_shell) [WINDOWS32]: Implement the 1248*69606e3fSchristos idea behind Savannah Patch #3144 from david.baird@homemail.com. 1249*69606e3fSchristos If SHELL is set to CMD.EXE then assume it's batch-mode and 1250*69606e3fSchristos non-unixy. I wrote the code differently from the patch, though, 1251*69606e3fSchristos to make it safer. This also resolves bug #9174. 1252*69606e3fSchristos 1253*69606e3fSchristos2004-09-20 Paul D. Smith <psmith@gnu.org> 1254*69606e3fSchristos 1255*69606e3fSchristos * expand.c (variable_expand_string): Modify to invoke 1256*69606e3fSchristos patsubst_expand() instead of subst_expand(); the latter didn't 1257*69606e3fSchristos handle suffix patterns correctly. 1258*69606e3fSchristos * function.c (subst_expand): Remove the SUFFIX_ONLY parameter; it 1259*69606e3fSchristos was used only from variable_expand_string() and is no longer used 1260*69606e3fSchristos there. 1261*69606e3fSchristos (func_subst): Ditto, on call to subst_expand(). 1262*69606e3fSchristos (patsubst_expand): Require the percent pointers to point to the 1263*69606e3fSchristos character after the %, not to the % itself. 1264*69606e3fSchristos * read.c (record_files): New call criteria for patsubst_expand(). 1265*69606e3fSchristos * variable.h: Remove SUFFIX_ONLY from subst_expand() prototype. 1266*69606e3fSchristos This is to fix a bug reported by Markus Mauhart <qwe123@chello.at>. 1267*69606e3fSchristos 1268*69606e3fSchristos2004-09-19 Paul D. Smith <psmith@gnu.org> 1269*69606e3fSchristos 1270*69606e3fSchristos * function.c (subst_expand): Fix a check in by_word: look for a 1271*69606e3fSchristos previous blank if we're beyond the beginning of the string, not 1272*69606e3fSchristos the beginning of the word. 1273*69606e3fSchristos Bugs reported by Markus Mauhart <qwe123@chello.at>. 1274*69606e3fSchristos 1275*69606e3fSchristos2004-05-16 Paul D. Smith <psmith@gnu.org> 1276*69606e3fSchristos 1277*69606e3fSchristos * remake.c (update_goal_chain): Change the argument specifying 1278*69606e3fSchristos whether we're rebuilding makefiles to be a global variable, 1279*69606e3fSchristos REBUILDING_MAKEFILES. 1280*69606e3fSchristos (complain): Extract the code that complains about no rules to make 1281*69606e3fSchristos a target into a separate function. 1282*69606e3fSchristos (update_file_1): If we tried to rebuild a file during the makefile 1283*69606e3fSchristos rebuild phase and it was dontcare, then no message was printed. 1284*69606e3fSchristos If we then try to build the same file during the normal build, 1285*69606e3fSchristos print a message this time. 1286*69606e3fSchristos (remake_file): Don't complain about un-remake-able files when 1287*69606e3fSchristos we're rebuilding makefiles. 1288*69606e3fSchristos 1289*69606e3fSchristos2004-05-11 Paul D. Smith <psmith@gnu.org> 1290*69606e3fSchristos 1291*69606e3fSchristos * job.c (construct_command_argv_internal): OS/2 patches from 1292*69606e3fSchristos Andreas Buening <andreas.buening@nexgo.de>. 1293*69606e3fSchristos 1294*69606e3fSchristos2004-05-10 Paul D. Smith <psmith@gnu.org> 1295*69606e3fSchristos 1296*69606e3fSchristos * remake.c (update_file): Don't walk the double-colon chain unless 1297*69606e3fSchristos this is a double-colon rule. Fix suggested by Boris Kolpackov 1298*69606e3fSchristos <boris@kolpackov.net>. 1299*69606e3fSchristos 1300*69606e3fSchristos * makefile.vms (CFLAGS): Remove glob/globfree (see readme.vms docs) 1301*69606e3fSchristos * readme.vms: New section describing OpenVMS support and issues. 1302*69606e3fSchristos * default.c (default_variables): Add support for IA64. 1303*69606e3fSchristos * job.c (tryToSetupYAst) [VMS]: On VMS running make in batch mode 1304*69606e3fSchristos without some privilege aborts make with the error 1305*69606e3fSchristos %SYSTEM-F-NOPRIV. It happens when setting up a handler for 1306*69606e3fSchristos pressing Ctrl+Y and the input device is no terminal. The change 1307*69606e3fSchristos catches this error and just continues. 1308*69606e3fSchristos 1309*69606e3fSchristos Patches by Hartmut Becker <Hartmut.Becker@hp.com> 1310*69606e3fSchristos 1311*69606e3fSchristos2004-04-25 Paul D. Smith <psmith@gnu.org> 1312*69606e3fSchristos 1313*69606e3fSchristos * commands.c (set_file_variables): Set $< properly in the face of 1314*69606e3fSchristos order-only prerequisites. 1315*69606e3fSchristos Patch from Boris Kolpackov <boris@kolpackov.net> 1316*69606e3fSchristos 1317*69606e3fSchristos2004-04-21 Bob Byrnes <byrnes@curl.com> 1318*69606e3fSchristos 1319*69606e3fSchristos * main.c (main): Notice failures to remake makefiles. 1320*69606e3fSchristos 1321*69606e3fSchristos2004-03-28 Paul D. Smith <psmith@gnu.org> 1322*69606e3fSchristos 1323*69606e3fSchristos Patches for Acorn RISC OS by Peter Naulls <peter@chocky.org> 1324*69606e3fSchristos 1325*69606e3fSchristos * job.c: No default shell for RISC OS. 1326*69606e3fSchristos (load_too_high): Hard-code the return to 1. 1327*69606e3fSchristos (construct_command_argv_internal): No sh_chars or sh_cmds. 1328*69606e3fSchristos * getloadavg.c: Don't set LOAD_AVE_TYPE on RISC OS. 1329*69606e3fSchristos 1330*69606e3fSchristos2004-03-20 Paul D. Smith <psmith@gnu.org> 1331*69606e3fSchristos 1332*69606e3fSchristos * variable.c (do_variable_definition): Don't append from the 1333*69606e3fSchristos global set if a previous non-appending target-specific variable 1334*69606e3fSchristos definition exists. Reported by Oliver Schmidt <oschmidt@gmx.net> 1335*69606e3fSchristos (with fix). 1336*69606e3fSchristos 1337*69606e3fSchristos * expand.c (reference_variable): Don't give up on variables with 1338*69606e3fSchristos no value that have the target-specific append flag set: they might 1339*69606e3fSchristos have a value after all. Reported by Oliver Schmidt 1340*69606e3fSchristos <oschmidt@gmx.net> (with fix) and also by Maksim A. Nikulin 1341*69606e3fSchristos <nikulin@dx1cmd.inp.nsk.su>. 1342*69606e3fSchristos 1343*69606e3fSchristos * rule.c (count_implicit_rule_limits): Don't delete patterns which 1344*69606e3fSchristos refer to absolute pathnames in directories that don't exist: some 1345*69606e3fSchristos portion of the makefile could create those directories before we 1346*69606e3fSchristos match the pattern. Fixes bugs #775 and #108. 1347*69606e3fSchristos 1348*69606e3fSchristos Fixes from Jonathan R. Grant <jg-make@jguk.org>: 1349*69606e3fSchristos 1350*69606e3fSchristos * main.c (main): Free makefile_mtimes if we have any. 1351*69606e3fSchristos * README.W32.template: Update documentation for the current status 1352*69606e3fSchristos of the MS-Windows port. 1353*69606e3fSchristos * NMakefile.template (MAKE): Add "MAKE = nmake". A conflicting 1354*69606e3fSchristos environment variable is sometimes already defined which causes the 1355*69606e3fSchristos build to fail. 1356*69606e3fSchristos * main.c (debug_signal_handler): Only define this function if 1357*69606e3fSchristos SIGUSR1 is available. 1358*69606e3fSchristos 1359*69606e3fSchristos Fixes for OS/2 from Andreas Beuning <andreas.buening@nexgo.de>: 1360*69606e3fSchristos 1361*69606e3fSchristos * configure.in [OS/2]: Relocate setting of HAVE_SA_RESTART for OS/2. 1362*69606e3fSchristos * README.OS2.template: Documentation updates. 1363*69606e3fSchristos * build.template: Add LIBINTL into LOADLIBES. Add $CFLAGS to the 1364*69606e3fSchristos link line for safety. 1365*69606e3fSchristos * maintMakefile (build.sh.in): Remove an extraneous ")". 1366*69606e3fSchristos * job.c (child_execute_job): Close saved FDs. 1367*69606e3fSchristos * job.c (exec_command) [OS/2]: exec_command(): If the command 1368*69606e3fSchristos can't be exec'ed and if the shell is not Unix-sh, then try again 1369*69606e3fSchristos with argv = { "cmd", "/c", ... }. Normally, this code is never 1370*69606e3fSchristos reached for the cmd shell unless the command really doesn't exist. 1371*69606e3fSchristos (construct_command_argv_internal) [OS/2]: The code for cmd 1372*69606e3fSchristos handling now uses new_argv = { "cmd", "/c", "original line", NULL}. 1373*69606e3fSchristos The CMD builtin commands are case insensitive so use strcasecmp(). 1374*69606e3fSchristos 1375*69606e3fSchristos2004-03-19 Paul D. Smith <psmith@gnu.org> 1376*69606e3fSchristos 1377*69606e3fSchristos * read.c (do_define): Re-order line counter increment so the count 1378*69606e3fSchristos is accurate (we were losing one line per define). Reported by 1379*69606e3fSchristos Dave Yost <Dave@Yost.com>. 1380*69606e3fSchristos 1381*69606e3fSchristos2004-03-06 Paul D. Smith <psmith@gnu.org> 1382*69606e3fSchristos 1383*69606e3fSchristos * configure.in (HAVE_ANSI_COMPILER): Define if we have an ANSI/ISO 1384*69606e3fSchristos compiler. 1385*69606e3fSchristos * make.h: Convert uses of __STDC__ to HAVE_ANSI_COMPILER. 1386*69606e3fSchristos * misc.c (message,error,fatal): Ditto. 1387*69606e3fSchristos * configh.dos.template: Define HAVE_ANSI_COMPILER. 1388*69606e3fSchristos * config.h.W32.template: Ditto. 1389*69606e3fSchristos * config.h-vms.template: Ditto. 1390*69606e3fSchristos * config.ami.template: Ditto. 1391*69606e3fSchristos 1392*69606e3fSchristos2004-03-04 Paul D. Smith <psmith@gnu.org> 1393*69606e3fSchristos 1394*69606e3fSchristos * README.template: Add a note about broken /bin/sh on SunOS 1395*69606e3fSchristos 4.1.3_U1 & 4.1.4. Fix up Savannah links. 1396*69606e3fSchristos 1397*69606e3fSchristos * misc.c (message, error, fatal): Don't use "..." if we're using 1398*69606e3fSchristos varargs. ansi2knr should handle this but it doesn't work: it 1399*69606e3fSchristos translates "..." to va_dcl etc. but _AFTER_ the preprocessor is 1400*69606e3fSchristos done. On many systems (SunOS for example) va_dcl is a #define. 1401*69606e3fSchristos So, force the use of the non-"..." version on pre-ANSI compilers. 1402*69606e3fSchristos 1403*69606e3fSchristos * maintMakefile (sign-dist): Create some rules to help automate 1404*69606e3fSchristos the new GNU ftp upload method. 1405*69606e3fSchristos 1406*69606e3fSchristos2004-02-24 Paul D. Smith <psmith@gnu.org> 1407*69606e3fSchristos 1408*69606e3fSchristos * config.h.W32.template: Add HAVE_STDARG_H 1409*69606e3fSchristos * config.h-vms.template: Ditto. 1410*69606e3fSchristos * config.ami.template: Ditto. 1411*69606e3fSchristos 1412*69606e3fSchristos2004-02-23 Jonathan Grant <jg-make@jguk.org> 1413*69606e3fSchristos 1414*69606e3fSchristos * README.W32.template: Add a notation about -j with BATCH_MODE_ONLY. 1415*69606e3fSchristos * build_w32.bat: Remove extra "+". 1416*69606e3fSchristos 1417*69606e3fSchristos2004-02-23 Paul D. Smith <psmith@gnu.org> 1418*69606e3fSchristos 1419*69606e3fSchristos * make.h: Create an UNUSED macro to mark unused parameters. 1420*69606e3fSchristos * (many): Clean up warnings by applying UNUSED, fixing 1421*69606e3fSchristos signed/unsigned incompatibilities, etc. 1422*69606e3fSchristos 1423*69606e3fSchristos * acinclude.m4 (AC_STRUCT_ST_MTIM_NSEC): Add quoting to silence 1424*69606e3fSchristos autoconf warnings. 1425*69606e3fSchristos * filedef.h: Name the command_state enumeration. 1426*69606e3fSchristos * file.c (set_command_state): Use the enumeration in the function 1427*69606e3fSchristos argument. 1428*69606e3fSchristos 1429*69606e3fSchristos * configure.in: Explicitly set SET_MAKE to empty, to disable 1430*69606e3fSchristos MAKE=make even when no make already exists. Fix bug #3823. 1431*69606e3fSchristos 1432*69606e3fSchristos2004-02-22 Paul D. Smith <psmith@gnu.org> 1433*69606e3fSchristos 1434*69606e3fSchristos * maintMakefile: Perl script to clean up all non-CVS files. Use 1435*69606e3fSchristos it on all the subdirectories for the cvs-clean target. 1436*69606e3fSchristos 1437*69606e3fSchristos * main.c (decode_switches): Require non-empty strings for all our 1438*69606e3fSchristos string command-line options. Fixes Debian bug # 164165. 1439*69606e3fSchristos 1440*69606e3fSchristos * configure.in: Check for stdarg.h and varargs.h. 1441*69606e3fSchristos * make.h (USE_VARIADIC): Set this if we can use variadic functions 1442*69606e3fSchristos for printing messages. 1443*69606e3fSchristos * misc.c: Check USE_VARIADIC instead of (obsolete) HAVE_STDVARARGS. 1444*69606e3fSchristos (message): Ditto. 1445*69606e3fSchristos (error): Ditto. 1446*69606e3fSchristos (fatal): Ditto. 1447*69606e3fSchristos 1448*69606e3fSchristos A number of patches for OS/2 support from Andreas Buening 1449*69606e3fSchristos <andreas.buening@nexgo.de>: 1450*69606e3fSchristos 1451*69606e3fSchristos * job.c (child_handler) [OS/2]: Allow this on OS/2 but we have to 1452*69606e3fSchristos disable the SIGCHLD handler. 1453*69606e3fSchristos (reap_children) [OS/2]: Remove special handling of job_rfd. 1454*69606e3fSchristos (set_child_handler_action_flags) [OS/2]: Use this function in OS/2. 1455*69606e3fSchristos (new_job) [OS/2]: Disable the SIGCHLD handler on OS/2. 1456*69606e3fSchristos * main.c (main) [OS/2]: Special handling for paths in OS/2. 1457*69606e3fSchristos * configure.in [OS/2]: Force SA_RESTART for OS/2. 1458*69606e3fSchristos * Makefile.am (check-regression): Use $(EXEEXT) for Windows-type 1459*69606e3fSchristos systems. 1460*69606e3fSchristos 1461*69606e3fSchristos2004-02-21 Paul D. Smith <psmith@gnu.org> 1462*69606e3fSchristos 1463*69606e3fSchristos * w32/subproc/sub_proc.c (process_easy) [W32]: Christoph Schulz 1464*69606e3fSchristos <mail@kristov.de> reports that if process_begin() fails we don't 1465*69606e3fSchristos handle the error condition correctly in all cases. 1466*69606e3fSchristos * w32/subproc/w32err.c (map_windows32_error_to_string): Make sure 1467*69606e3fSchristos to have a newline on the message. 1468*69606e3fSchristos 1469*69606e3fSchristos * job.c (construct_command_argv_internal): Add "test" to UNIX 1470*69606e3fSchristos sh_cmds[]. Fixes Savannah bug # 7606. 1471*69606e3fSchristos 1472*69606e3fSchristos2004-02-04 Paul D. Smith <psmith@gnu.org> 1473*69606e3fSchristos 1474*69606e3fSchristos * job.c (vms_handle_apos) [VMS]: Fix various string handling 1475*69606e3fSchristos situations in VMS DCL. Fixes Savannah bug #5533. Fix provided by 1476*69606e3fSchristos Hartmut Becker <Hartmut.Becker@hp.com>. 1477*69606e3fSchristos 1478*69606e3fSchristos2004-01-21 Paul D. Smith <psmith@gnu.org> 1479*69606e3fSchristos 1480*69606e3fSchristos * job.c (load_too_high): Implement an algorithm to control the 1481*69606e3fSchristos "thundering herd" problem when using -l to control job creation 1482*69606e3fSchristos via the load average. The system only recomputes the load once a 1483*69606e3fSchristos second but we can start many jobs in a second. To solve this we 1484*69606e3fSchristos keep track of the number of jobs started in the last second and 1485*69606e3fSchristos apply a weight to try to guess what a correct load would be. 1486*69606e3fSchristos The algorithm was provided by Thomas Riedl <thomas.riedl@siemens.com>. 1487*69606e3fSchristos Also fixes bug #4693. 1488*69606e3fSchristos (reap_children): Decrease the job count for this second. 1489*69606e3fSchristos (start_job_command): Increase the job count for this second. 1490*69606e3fSchristos 1491*69606e3fSchristos * read.c (conditional_line): Expand the text after ifn?def before 1492*69606e3fSchristos checking to see if it's a single word. Fixes bug #7257. 1493*69606e3fSchristos 1494*69606e3fSchristos2004-01-09 Paul D. Smith <psmith@gnu.org> 1495*69606e3fSchristos 1496*69606e3fSchristos * file.c (print_file): Recurse to print all targets in 1497*69606e3fSchristos double-colon rules. Fixes bug #4518, reported (with patch) by 1498*69606e3fSchristos Andrew Chatham <chatham@google.com>. 1499*69606e3fSchristos 1500*69606e3fSchristos2004-01-07 Paul D. Smith <psmith@gnu.org> 1501*69606e3fSchristos 1502*69606e3fSchristos * acinclude.m4: Remove make_FUNC_SETVBUF_REVERSED. 1503*69606e3fSchristos * configure.in: Change make_FUNC_SETVBUF_REVERSED to 1504*69606e3fSchristos AC_FUNC_SETVBUF_REVERSED. 1505*69606e3fSchristos 1506*69606e3fSchristos * doc/make.texi (Target-specific): Fix Savannah bug #1772. 1507*69606e3fSchristos (MAKE Variable): Fix Savannah bug #4898. 1508*69606e3fSchristos 1509*69606e3fSchristos * job.c (construct_command_argv_internal): Add "!" to the list of 1510*69606e3fSchristos shell escape chars. POSIX sh allows it to appear before a 1511*69606e3fSchristos command, to negate the exit code. Fixes bug #6404. 1512*69606e3fSchristos 1513*69606e3fSchristos * implicit.c (pattern_search): When matching an implicit rule, 1514*69606e3fSchristos remember which dependencies have the ignore_mtime flag set. 1515*69606e3fSchristos Original fix provided in Savannah patch #2349, by Benoit 1516*69606e3fSchristos Poulot-Cazajous <Benoit.Poulot-Cazajous@jaluna.com>. 1517*69606e3fSchristos 1518*69606e3fSchristos2003-11-22 Paul D. Smith <psmith@gnu.org> 1519*69606e3fSchristos 1520*69606e3fSchristos * README.W32.template (Outputs): Clarification on -j with 1521*69606e3fSchristos BATCH_MODE_ONLY_SEHLL suggested by Jonathan R. Grant 1522*69606e3fSchristos <jg-make@jguk.org>. 1523*69606e3fSchristos 1524*69606e3fSchristos2003-11-02 Paul D. Smith <psmith@gnu.org> 1525*69606e3fSchristos 1526*69606e3fSchristos * function.c (func_if): Strip all the trailing whitespace from the 1527*69606e3fSchristos condition, then don't expand it. Fixed bug # 5798. 1528*69606e3fSchristos 1529*69606e3fSchristos * expand.c (recursively_expand_for_file): If we're expanding a 1530*69606e3fSchristos variable with no file context, then use the variable's context. 1531*69606e3fSchristos Fixes bug # 6195. 1532*69606e3fSchristos 1533*69606e3fSchristos2003-10-21 Paul D. Smith <psmith@gnu.org> 1534*69606e3fSchristos 1535*69606e3fSchristos * main.c (log_working_directory): Add newlines to printf()s. 1536*69606e3fSchristos 1537*69606e3fSchristos * README.cvs: Add a note to ignore warnings during autoreconf. 1538*69606e3fSchristos 1539*69606e3fSchristos * maintMakefile (po_repo): Set a new URL for PO file updates. 1540*69606e3fSchristos (get-config/config.guess get-config/config.sub): Get these files 1541*69606e3fSchristos from the Savannah config project instead of ftp.gnu.org. 1542*69606e3fSchristos 1543*69606e3fSchristos2003-10-05 Paul Eggert <eggert@twinsun.com> 1544*69606e3fSchristos 1545*69606e3fSchristos * main.c (main): Avoid potential subscript error if environ has 1546*69606e3fSchristos short strings. 1547*69606e3fSchristos 1548*69606e3fSchristos2003-08-22 Paul D. Smith <psmith@gnu.org> 1549*69606e3fSchristos 1550*69606e3fSchristos * misc.c (xmalloc, xrealloc): Add one to 0 sizes, to cater to 1551*69606e3fSchristos systems which don't yet implement the C89 standard :-/. 1552*69606e3fSchristos 1553*69606e3fSchristos2003-07-18 Paul D. Smith <psmith@gnu.org> 1554*69606e3fSchristos 1555*69606e3fSchristos * dir.c (directory_contents_hash_1, directory_contents_hash_1) 1556*69606e3fSchristos [WINDOWS32]: Initialize hash. 1557*69606e3fSchristos 1558*69606e3fSchristos2003-06-19 Earnie Boyd <earnie@uses.sf.net> 1559*69606e3fSchristos 1560*69606e3fSchristos * dir.c (read_dirstream): Provide a workaround for broken versions of 1561*69606e3fSchristos the MinGW dirent structure. 1562*69606e3fSchristos 1563*69606e3fSchristos2003-05-30 Earnie Boyd <earnie@users.sf.net> 1564*69606e3fSchristos 1565*69606e3fSchristos * w32/include/dirent.h: Add __MINGW32__ filter. 1566*69606e3fSchristos 1567*69606e3fSchristos2003-05-30 Earnie Boyd <earnie@users.sf.net> 1568*69606e3fSchristos 1569*69606e3fSchristos * make.h: Add global declaration of *make_host. 1570*69606e3fSchristos * main.c (print_usage): Remove local declaration of *make_host. 1571*69606e3fSchristos (print_version): Display "This program built for ..." after Copyright 1572*69606e3fSchristos notice. 1573*69606e3fSchristos 1574*69606e3fSchristos2003-05-30 Earnie Boyd <earnie@users.sf.net> 1575*69606e3fSchristos 1576*69606e3fSchristos * doc/make.texi: Change "ifinfo" to "ifnottex" as suggested by the 1577*69606e3fSchristos execution of "makeinfo --html make.texi". 1578*69606e3fSchristos 1579*69606e3fSchristos2003-04-30 Paul D. Smith <psmith@gnu.org> 1580*69606e3fSchristos 1581*69606e3fSchristos * build.template: Make some changes to maybe allow this script to 1582*69606e3fSchristos work on DOS/Windows/OS2 systems. Suggested by Andreas Buening. 1583*69606e3fSchristos 1584*69606e3fSchristos * README.OS2.template: New file for OS/2 support. Original 1585*69606e3fSchristos contributed by Andreas Buening. 1586*69606e3fSchristos * configure.in: Invoke new pds_AC_DOS_PATHS macro to test for 1587*69606e3fSchristos DOS-style paths. 1588*69606e3fSchristos 1589*69606e3fSchristos2003-04-19 Paul D. Smith <psmith@gnu.org> 1590*69606e3fSchristos 1591*69606e3fSchristos Fix bug #1405: allow a target to match multiple pattern-specific 1592*69606e3fSchristos variables. 1593*69606e3fSchristos 1594*69606e3fSchristos * rule.c (create_pattern_var, lookup_pattern_var): Move these to 1595*69606e3fSchristos variable.c, where they've always belonged. 1596*69606e3fSchristos * rule.h: Move the prototypes and struct pattern_var as well. 1597*69606e3fSchristos * variable.c (initialize_file_variables): Invoke 1598*69606e3fSchristos lookup_pattern_var() in a loop, until no more matches are found. 1599*69606e3fSchristos If a match is found, create a new variable set for the target's 1600*69606e3fSchristos pattern variables. Then merge the contents of each matching 1601*69606e3fSchristos pattern variable set into the target's pattern variable set. 1602*69606e3fSchristos (lookup_pattern_var): Change this function to be usable 1603*69606e3fSchristos in a loop. It takes a starting position: if NULL, start at the 1604*69606e3fSchristos beginning; if non-NULL, start with the pattern variable after that 1605*69606e3fSchristos position, and return the next matching pattern. 1606*69606e3fSchristos (create_pattern_var): Create a unique instance of 1607*69606e3fSchristos pattern-specific variables for every definition in the makefile. 1608*69606e3fSchristos Don't combine the same pattern together. This allows us to 1609*69606e3fSchristos process the variable handling properly even when the same pattern 1610*69606e3fSchristos is used multiple times. 1611*69606e3fSchristos (parse_variable_definition): New function: break out the parsing 1612*69606e3fSchristos of a variable definition line from try_variable_definition. 1613*69606e3fSchristos (try_variable_definition): Call parse_variable_definition to 1614*69606e3fSchristos parse. 1615*69606e3fSchristos (print_variable_data_base): Print out pattern-specific variables. 1616*69606e3fSchristos * variable.h (struct variable): Remember when a variable is 1617*69606e3fSchristos conditional. Also remember its flavor. 1618*69606e3fSchristos (struct pattern_var): Instead of keeping a variable set, we just 1619*69606e3fSchristos keep a single variable for each pattern. 1620*69606e3fSchristos * read.c (record_target_var): Each pattern variable contains only a 1621*69606e3fSchristos single variable, not a set, so create it properly. 1622*69606e3fSchristos * doc/make.texi (Pattern-specific): Document the new behavior. 1623*69606e3fSchristos 1624*69606e3fSchristos2003-04-17 Paul D. Smith <psmith@gnu.org> 1625*69606e3fSchristos 1626*69606e3fSchristos * dir.c (file_exists_p) [VMS]: Patch provided with Bug #3018 by 1627*69606e3fSchristos Jean-Pierre Portier <portierjp2@free.fr>. I don't understand the 1628*69606e3fSchristos file/directory naming rules for VMS so I can't tell whether this 1629*69606e3fSchristos is correct or not. 1630*69606e3fSchristos 1631*69606e3fSchristos2003-04-09 Paul D. Smith <psmith@gnu.org> 1632*69606e3fSchristos 1633*69606e3fSchristos * configure.in (HAVE_DOS_PATHS): Define this on systems that need 1634*69606e3fSchristos DOS-style pathnames: backslash separators and drive specifiers. 1635*69606e3fSchristos 1636*69606e3fSchristos2003-03-28 Paul D. Smith <psmith@gnu.org> 1637*69606e3fSchristos 1638*69606e3fSchristos * file.c (snap_deps): If .SECONDARY with no targets is given, set 1639*69606e3fSchristos the intermediate flag on all targets. Fixes bug #2515. 1640*69606e3fSchristos 1641*69606e3fSchristos2003-03-24 Paul D. Smith <psmith@gnu.org> 1642*69606e3fSchristos 1643*69606e3fSchristos * configure.in, Makefile.am, glob/Makefile.am, doc/Makefile.am: 1644*69606e3fSchristos Upgrade to autoconf 2.57 and automake 1.7.3. 1645*69606e3fSchristos 1646*69606e3fSchristos * job.c: More OS/2 changes from Andreas Buening. 1647*69606e3fSchristos 1648*69606e3fSchristos * file.c (print_file): Fix variable initialization. 1649*69606e3fSchristos Fixes bug #2892. 1650*69606e3fSchristos 1651*69606e3fSchristos * remake.c (notice_finished_file): 1652*69606e3fSchristos 1653*69606e3fSchristos * make.h (ENULLLOOP): Set errno = 0 before invoking the command; 1654*69606e3fSchristos some calls (like readdir()) return NULL in valid situations 1655*69606e3fSchristos without resetting errno. Fixes bug #2846. 1656*69606e3fSchristos 1657*69606e3fSchristos2003-02-25 Paul D. Smith <psmith@gnu.org> 1658*69606e3fSchristos 1659*69606e3fSchristos Port to OS/2 (__EMX__) by Andreas Buening <andreas.buening@nexgo.de>. 1660*69606e3fSchristos 1661*69606e3fSchristos * job.c (_is_unixy_shell) [OS/2]: New function. 1662*69606e3fSchristos Set default shell to /bin/sh. 1663*69606e3fSchristos (reap_children): Close the job_rfd pipe here since we don't use a 1664*69606e3fSchristos SIGCHLD handler. 1665*69606e3fSchristos (set_child_handler_action_flags): define this to empty on OS/2. 1666*69606e3fSchristos (start_job_command): Close the jobserver pipe and use 1667*69606e3fSchristos child_execute_job() instead of fork/exec. 1668*69606e3fSchristos (child_execute_job): Rewrite to handle stdin/stdout FDs and spawn 1669*69606e3fSchristos rather than exec'ing, then reconfigure stdin/stdout. 1670*69606e3fSchristos (exec_command): Rewrite to use spawn instead of exec. Return the 1671*69606e3fSchristos PID of the child. 1672*69606e3fSchristos 1673*69606e3fSchristos * main.c (main) [OS/2]: Call initialize_main(). Handle argv[0] as 1674*69606e3fSchristos in DOS. Handle the TEMP environment variable as in DOS. Don't 1675*69606e3fSchristos use a SIGCHLD handler on OS/2. Choose a shell as in DOS. Don't 1676*69606e3fSchristos use -j in DOS mode. Use child_execute_job() instead of 1677*69606e3fSchristos exec_command(). 1678*69606e3fSchristos 1679*69606e3fSchristos * function.c (func_shell) [OS/2]: Can't use fork/exec on OS/2: use 1680*69606e3fSchristos spawn() instead. 1681*69606e3fSchristos 1682*69606e3fSchristos * job.h [OS/2]: Move CLOSE_ON_EXEC here from job.c. Add 1683*69606e3fSchristos prototypes that return values. 1684*69606e3fSchristos 1685*69606e3fSchristos * remake.c (f_mtime) [OS/2]: Handle FAT timestamp offsets for OS/2. 1686*69606e3fSchristos 1687*69606e3fSchristos * read.c (readline) [OS/2]: Don't handle CRLF specially on OS/2. 1688*69606e3fSchristos * default.c (default_suffixes) [OS/2]: Set proper default suffixes 1689*69606e3fSchristos for OS/2. 1690*69606e3fSchristos * vpath.c (construct_vpath_list) [OS/2]: Handle OS/2 paths like 1691*69606e3fSchristos DOS paths. 1692*69606e3fSchristos 1693*69606e3fSchristos2003-02-24 Paul D. Smith <psmith@gnu.org> 1694*69606e3fSchristos 1695*69606e3fSchristos * default.c [VMS]: New default rules for .cxx -> .obj compiles. 1696*69606e3fSchristos * job.c (child_execute_job) [VMS]: New code for handling spawn(). 1697*69606e3fSchristos (child_execute_job) [VMS]: Handle error status properly. 1698*69606e3fSchristos Patches provided by Hartmut Becker <Hartmut.Becker@compaq.com>. 1699*69606e3fSchristos 1700*69606e3fSchristos * function.c (func_shell): Use EINTRLOOP() while reading from the 1701*69606e3fSchristos subshell pipe (Fixes bug #2502). 1702*69606e3fSchristos * job.c (free_child): Use EINTRLOOP() while writing tokens to the 1703*69606e3fSchristos jobserver pipe. 1704*69606e3fSchristos * main.c (main): Ditto. 1705*69606e3fSchristos 1706*69606e3fSchristos2003-01-30 Paul D. Smith <psmith@gnu.org> 1707*69606e3fSchristos 1708*69606e3fSchristos * read.c (eval): eval() was not fully reentrant, because the 1709*69606e3fSchristos collapsed buffer was static. Change it to be an automatic 1710*69606e3fSchristos variable so that eval() can be invoked recursively. 1711*69606e3fSchristos Fixes bug # 2238. 1712*69606e3fSchristos (eval): Apply patch # 1022: fix memory reference error on long 1713*69606e3fSchristos target-specific variable lines. 1714*69606e3fSchristos Patch provided by Steve Brown <Steve.Brown@macquarie.com>. 1715*69606e3fSchristos 1716*69606e3fSchristos * function.c (check_numeric): Combine the is_numeric() function 1717*69606e3fSchristos into this function, since it's only called from one place. 1718*69606e3fSchristos Constify this function. Have it print the incorrect string in the 1719*69606e3fSchristos error message. Fixes bug #2407. 1720*69606e3fSchristos (strip_whitespace): Constify. 1721*69606e3fSchristos (func_if): Constify. 1722*69606e3fSchristos * expand.c (expand_argument): Constify. 1723*69606e3fSchristos 1724*69606e3fSchristos2003-01-29 Paul D. Smith <psmith@gnu.org> 1725*69606e3fSchristos 1726*69606e3fSchristos Fix bug # 2169, also reported by other people on various systems. 1727*69606e3fSchristos 1728*69606e3fSchristos * make.h: Some systems, such as Solaris and PTX, do not fully 1729*69606e3fSchristos implement POSIX-compliant SA_RESTART functionality; important 1730*69606e3fSchristos system calls like stat() and readdir() can still fail with EINTR 1731*69606e3fSchristos even if SA_RESTART has been set on the signal handler. So, 1732*69606e3fSchristos introduce macros EINTRLOOP() and ENULLLOOP() which can loop on 1733*69606e3fSchristos EINTR for system calls which return -1 or 0 (NULL), respectively, 1734*69606e3fSchristos on error. 1735*69606e3fSchristos Also, remove the old atomic_stat()/atomic_readdir() and 1736*69606e3fSchristos HAVE_BROKEN_RESTART handling. 1737*69606e3fSchristos 1738*69606e3fSchristos * configure.in: Remove setting of HAVE_BROKEN_RESTART. 1739*69606e3fSchristos 1740*69606e3fSchristos * arscan.c (ar_member_touch): Use EINTRLOOP() to wrap fstat(). 1741*69606e3fSchristos * remake.c (touch_file): Ditto. 1742*69606e3fSchristos 1743*69606e3fSchristos * commands.c (delete_target): Use EINTRLOOP() to wrap stat(). 1744*69606e3fSchristos * read.c (construct_include_path): Ditto. 1745*69606e3fSchristos * remake.c (name_mtime): Ditto. 1746*69606e3fSchristos * vpath.c (selective_vpath_search): Ditto. 1747*69606e3fSchristos * dir.c (find_directory): Ditto. 1748*69606e3fSchristos (local_stat): Ditto. 1749*69606e3fSchristos (find_directory): Use ENULLLOOP() to wrap opendir(). 1750*69606e3fSchristos (dir_contents_file_exists_p): Use ENULLLOOP() to wrap readdir(). 1751*69606e3fSchristos 1752*69606e3fSchristos * misc.c: Remove HAVE_BROKEN_RESTART, atomic_stat(), and 1753*69606e3fSchristos atomic_readdir() handling. 1754*69606e3fSchristos 1755*69606e3fSchristos2003-01-22 Paul D. Smith <psmith@gnu.org> 1756*69606e3fSchristos 1757*69606e3fSchristos * function.c (func_call): Fix Bug #1744. If we're inside a 1758*69606e3fSchristos recursive invocation of $(call ...), mask any of the outer 1759*69606e3fSchristos invocation's arguments that aren't used by this one, so that this 1760*69606e3fSchristos invocation doesn't "inherit" them accidentally. 1761*69606e3fSchristos 1762*69606e3fSchristos2002-12-05 Paul D. Smith <psmith@gnu.org> 1763*69606e3fSchristos 1764*69606e3fSchristos * function.c (subst_expand): Valery Khamenia reported a 1765*69606e3fSchristos pathological performance hit when doing substitutions on very 1766*69606e3fSchristos large values with lots of words: turns out we were invoking 1767*69606e3fSchristos strlen() a ridiculous number of times. Instead of having each 1768*69606e3fSchristos call to sindex() call strlen() again, keep track of how much of 1769*69606e3fSchristos the text we've seen and pass the length to sindex(). 1770*69606e3fSchristos 1771*69606e3fSchristos2002-11-19 Paul D. Smith <psmith@gnu.org> 1772*69606e3fSchristos 1773*69606e3fSchristos * README.cvs, configure.in: Upgrade to require autoconf 2.56. 1774*69606e3fSchristos 1775*69606e3fSchristos 1776*69606e3fSchristos2002-11-16 Paul D. Smith <psmith@gnu.org> 1777*69606e3fSchristos 1778*69606e3fSchristos * NMakefile.template (OBJS): Add hash.c object file. 1779*69606e3fSchristos * SMakefile.template (srcs): Ditto. 1780*69606e3fSchristos * Makefile.ami (objs): Ditto. 1781*69606e3fSchristos * build_w32.bat: Ditto. 1782*69606e3fSchristos 1783*69606e3fSchristos * Makefile.DOS.template: Remove extra dependencies. 1784*69606e3fSchristos 1785*69606e3fSchristos2002-10-25 Paul D. Smith <psmith@gnu.org> 1786*69606e3fSchristos 1787*69606e3fSchristos * expand.c (install_variable_buffer): New function. Install a new 1788*69606e3fSchristos variable_buffer context and return the previous one. 1789*69606e3fSchristos (restore_variable_buffer): New function. Free the current 1790*69606e3fSchristos variable_buffer context and put a previously saved one back. 1791*69606e3fSchristos * variable.h: Prototypes for {install,restore}_variable_buffer. 1792*69606e3fSchristos * function.c (func_eval): Push a new variable_buffer context 1793*69606e3fSchristos before we eval, then restore the old one when we're done. 1794*69606e3fSchristos Fixes Bug #1517. 1795*69606e3fSchristos 1796*69606e3fSchristos * read.c (install_conditionals): New function. Install a new 1797*69606e3fSchristos conditional context and return the previous one. 1798*69606e3fSchristos (restore_conditionals): New function. Free the current 1799*69606e3fSchristos conditional context and put a previously saved one back. 1800*69606e3fSchristos (eval): Use the {install,restore}_conditionals for "include" 1801*69606e3fSchristos handling. 1802*69606e3fSchristos (eval_buffer): Use {install,restore}_conditionals to preserve the 1803*69606e3fSchristos present conditional state before we evaluate the buffer. 1804*69606e3fSchristos Fixes Bug #1516. 1805*69606e3fSchristos 1806*69606e3fSchristos * doc/make.texi (Quick Reference): Add references to $(eval ...) 1807*69606e3fSchristos and $(value ...). 1808*69606e3fSchristos (Recursion): Add a variable index entry for CURDIR. 1809*69606e3fSchristos 1810*69606e3fSchristos * README.cvs: Update to appropriate versions. 1811*69606e3fSchristos * Makefile.am (nodist_loadavg_SOURCES): automake gurus point out I 1812*69606e3fSchristos don't need to copy loadavg.c: automake is smart enough to create 1813*69606e3fSchristos it for me. Still have a bug in automake related to ansi2knr tho. 1814*69606e3fSchristos 1815*69606e3fSchristos2002-10-14 Paul D. Smith <psmith@gnu.org> 1816*69606e3fSchristos 1817*69606e3fSchristos * remake.c (notice_finished_file): Only touch targets if they have 1818*69606e3fSchristos at least one command (as per POSIX). Resolve Bug #1418. 1819*69606e3fSchristos 1820*69606e3fSchristos * *.c: Convert to using ANSI C-style function definitions. 1821*69606e3fSchristos * Makefile.am: Enable the ansi2knr feature of automake. 1822*69606e3fSchristos * configure.in: ditto. 1823*69606e3fSchristos 1824*69606e3fSchristos2002-10-13 Paul D. Smith <psmith@gnu.org> 1825*69606e3fSchristos 1826*69606e3fSchristos * commands.c (set_file_variables): Bug #1379: Don't use alloca() 1827*69606e3fSchristos for automatic variable values like $^, etc. In the case of very 1828*69606e3fSchristos large lists of prerequisites this causes problems. Instead reuse 1829*69606e3fSchristos a static buffer (resizeable) for each variable. 1830*69606e3fSchristos 1831*69606e3fSchristos * read.c (eval): Fix Bug #1391: allow "export" keyword in 1832*69606e3fSchristos target-specific variable definitions. Check for it and set an 1833*69606e3fSchristos "exported" flag. 1834*69606e3fSchristos (record_target_var): Set the export field to v_export if the 1835*69606e3fSchristos "exported" flag is set. 1836*69606e3fSchristos * doc/make.texi (Target-specific): Document the ability to use 1837*69606e3fSchristos "export". 1838*69606e3fSchristos 1839*69606e3fSchristos * doc/make.texi: Change the name of the section on automatic 1840*69606e3fSchristos variables from "Automatic" to "Automatic Variables". Added text 1841*69606e3fSchristos clarifying the scope of automatic variables. 1842*69606e3fSchristos 1843*69606e3fSchristos2002-10-04 Paul D. Smith <psmith@gnu.org> 1844*69606e3fSchristos 1845*69606e3fSchristos * read.c (eval): Allow SysV $$@ variables to use {} braces as well 1846*69606e3fSchristos as () braces. 1847*69606e3fSchristos (record_files): Ditto. 1848*69606e3fSchristos 1849*69606e3fSchristos * expand.c (variable_expand_string): In $(A:x=y) expansion limit 1850*69606e3fSchristos the search for the '=' to only within the enclosing parens. 1851*69606e3fSchristos 1852*69606e3fSchristos2002-10-03 Paul D. Smith <psmith@gnu.org> 1853*69606e3fSchristos 1854*69606e3fSchristos Version 3.80 released. 1855*69606e3fSchristos 1856*69606e3fSchristos * dir.c: Change hash functions to use K&R function definition style. 1857*69606e3fSchristos * function.c: Ditto. 1858*69606e3fSchristos * read.c: Ditto. 1859*69606e3fSchristos * variable.c: Ditto. 1860*69606e3fSchristos 1861*69606e3fSchristos Update to automake 1.7. 1862*69606e3fSchristos 1863*69606e3fSchristos * Makefile.am (AUTOMAKE_OPTIONS): Update to require 1.7. 1864*69606e3fSchristos (pdf): Remove this target as automake now provides one. 1865*69606e3fSchristos 1866*69606e3fSchristos * configure.in: Change AM_CONFIG_HEADER to AC_CONFIG_HEADERS. 1867*69606e3fSchristos 1868*69606e3fSchristos2002-09-30 Martin P.J. Zinser <zinser@decus.de> 1869*69606e3fSchristos 1870*69606e3fSchristos * makefile.com: Updates for GNU make 3.80. 1871*69606e3fSchristos * makefile.vms: Ditto. 1872*69606e3fSchristos 1873*69606e3fSchristos2002-09-23 Paul D. Smith <psmith@gnu.org> 1874*69606e3fSchristos 1875*69606e3fSchristos * read.c (enum make_word_type): Remove w_comment. 1876*69606e3fSchristos (get_next_mword): Don't treat comment characters as special; where 1877*69606e3fSchristos this function is used we will never see a comment (it's stripped 1878*69606e3fSchristos before we get here) and treating comments specially means that 1879*69606e3fSchristos targets like "foo\#bar" aren't handled properly. 1880*69606e3fSchristos 1881*69606e3fSchristos2002-09-18 Paul D. Smith <psmith@gnu.org> 1882*69606e3fSchristos 1883*69606e3fSchristos * doc/make.texi (Bugs): Update with some info on Savannah, etc. 1884*69606e3fSchristos 1885*69606e3fSchristos * read.c (eval): Expansion of arguments to export/unexport was 1886*69606e3fSchristos ignoring all arguments after the first one. Change the algorithm 1887*69606e3fSchristos to expand the whole line once, then parse the results. 1888*69606e3fSchristos 1889*69606e3fSchristos2002-09-17 Paul D. Smith <psmith@gnu.org> 1890*69606e3fSchristos 1891*69606e3fSchristos Fix Bug #940 (plus another bug I found while looking at this): 1892*69606e3fSchristos 1893*69606e3fSchristos * read.c (record_target_var): enter_file() will add a new entry if 1894*69606e3fSchristos it's a double-colon target: we don't want to do that in this 1895*69606e3fSchristos situation. Invoke lookup_file() and only enter_file() if it does 1896*69606e3fSchristos not already exist. If the file we get back is a double-colon then 1897*69606e3fSchristos add this variable to the "root" double-colon target. 1898*69606e3fSchristos 1899*69606e3fSchristos * variable.c (initialize_file_variables): If this file is a 1900*69606e3fSchristos double-colon target but is not the "root" target, then initialize 1901*69606e3fSchristos the root and make the root's variable list the parent of our 1902*69606e3fSchristos variable list. 1903*69606e3fSchristos 1904*69606e3fSchristos2002-09-13 Paul D. Smith <psmith@gnu.org> 1905*69606e3fSchristos 1906*69606e3fSchristos * doc/make.texi (MAKE Variable): Add some indexing for "+". 1907*69606e3fSchristos 1908*69606e3fSchristos * hash.c (round_up_2): Get rid of a warning. 1909*69606e3fSchristos 1910*69606e3fSchristos2002-09-12 Paul D. Smith <psmith@gnu.org> 1911*69606e3fSchristos 1912*69606e3fSchristos * Makefile.am (loadavg_SOURCES, loadavg.c): Tiptoe around automake 1913*69606e3fSchristos so it doesn't complain about getloadavg.c. 1914*69606e3fSchristos 1915*69606e3fSchristos * commands.c (set_file_variables): Make sure we always alloca() at 1916*69606e3fSchristos least 1 character for the value of $? (for '\0'). 1917*69606e3fSchristos 1918*69606e3fSchristos2002-09-11 Paul D. Smith <psmith@gnu.org> 1919*69606e3fSchristos 1920*69606e3fSchristos * hash.h (STRING_COMPARE, ISTRING_COMPARE, STRING_N_COMPARE): Fix 1921*69606e3fSchristos macro to use RESULT instead of the incorrect _RESULT_. 1922*69606e3fSchristos 1923*69606e3fSchristos * make.h (HAVE_BROKEN_RESTART): Add prototypes for atomic_stat() 1924*69606e3fSchristos and atomic_readdir(). We need to #include dirent.h to get this to 1925*69606e3fSchristos work. 1926*69606e3fSchristos * misc.c (atomic_readdir): Fix typos. 1927*69606e3fSchristos 1928*69606e3fSchristos2002-09-10 Paul D. Smith <psmith@gnu.org> 1929*69606e3fSchristos 1930*69606e3fSchristos * read.c (eval): Expand variable lists given to export and 1931*69606e3fSchristos unexport, so that "export $(LIST_OF_VARIABLES)" (etc.) works. 1932*69606e3fSchristos (conditional_line): Ditto for "ifdef". Fixes bug #103. 1933*69606e3fSchristos 1934*69606e3fSchristos * doc/make.texi (Variables/Recursion): Document this. 1935*69606e3fSchristos (Conditional Syntax): And here. 1936*69606e3fSchristos 1937*69606e3fSchristos2002-09-09 Paul D. Smith <psmith@gnu.org> 1938*69606e3fSchristos 1939*69606e3fSchristos * configure.in: Check for memmove(). 1940*69606e3fSchristos 1941*69606e3fSchristos2002-09-07 Paul D. Smith <psmith@gnu.org> 1942*69606e3fSchristos 1943*69606e3fSchristos * configure.in (HAVE_BROKEN_RESTART): Define this on PTX systems; 1944*69606e3fSchristos Michael Sterrett <msterret@coat.com> reports that while it has 1945*69606e3fSchristos SA_RESTART, it does not work properly. 1946*69606e3fSchristos 1947*69606e3fSchristos * misc.c (atomic_stat): If HAVE_BROKEN_RESTART, create a function 1948*69606e3fSchristos that invokes stat() and loops to do it again if it returns EINTR. 1949*69606e3fSchristos (atomic_readdir): Ditto, with readdir(). 1950*69606e3fSchristos 1951*69606e3fSchristos * make.h (stat, readdir): If HAVE_BROKEN_RESTART, alias stat() 1952*69606e3fSchristos and readdir() to atomic_stat() and atomic_readdir(). 1953*69606e3fSchristos 1954*69606e3fSchristos2002-09-04 Paul D. Smith <psmith@gnu.org> 1955*69606e3fSchristos 1956*69606e3fSchristos * implicit.c (pattern_search): Daniel <barkalow@reputation.com> 1957*69606e3fSchristos reports that GNU make sometimes doesn't recognize that targets can 1958*69606e3fSchristos be made, when directories can be created as prerequisites. He 1959*69606e3fSchristos reports that changing the order of predicates in the DEP->changed 1960*69606e3fSchristos flag test so that lookup_file() is always performed, solves this 1961*69606e3fSchristos problem. 1962*69606e3fSchristos 1963*69606e3fSchristos2002-08-08 Paul D. Smith <psmith@gnu.org> 1964*69606e3fSchristos 1965*69606e3fSchristos * configure.in: Require a newer version of gettext. 1966*69606e3fSchristos 1967*69606e3fSchristos * misc.c (perror_with_name): Translate the format string (for 1968*69606e3fSchristos right-to-left language support). 1969*69606e3fSchristos (pfatal_with_name): Ditto. 1970*69606e3fSchristos 1971*69606e3fSchristos * main.c: Create a static array of strings to store the usage 1972*69606e3fSchristos text. This is done to facilitate translations. 1973*69606e3fSchristos (struct command_switch): Remove argdesc and description fields. 1974*69606e3fSchristos (switches): Remove values for obsolete fields. 1975*69606e3fSchristos (print_usage): Print each element of the usage array. 1976*69606e3fSchristos 1977*69606e3fSchristos * hash.c: Change function definitions to be K&R style. 1978*69606e3fSchristos 1979*69606e3fSchristos2002-08-02 Paul D. Smith <psmith@gnu.org> 1980*69606e3fSchristos 1981*69606e3fSchristos * NEWS: Remove the mention of .TARGETS; we aren't going to publish 1982*69606e3fSchristos this one because it's too hard to get right. We'll look at it for 1983*69606e3fSchristos a future release. 1984*69606e3fSchristos * main.c (main): Don't create the .TARGETS variable. 1985*69606e3fSchristos * variable.c (handle_special_var): Don't handle .TARGETS. 1986*69606e3fSchristos 1987*69606e3fSchristos2002-08-01 Paul D. Smith <psmith@gnu.org> 1988*69606e3fSchristos 1989*69606e3fSchristos * main.c (switches): Add a new option, -B (--always-make). If 1990*69606e3fSchristos specified, make will rebuild all targets that it encounters even 1991*69606e3fSchristos if they don't appear to be out of date. 1992*69606e3fSchristos (always_make_flag): New flag. 1993*69606e3fSchristos * make.h: Extern always_make_flag. 1994*69606e3fSchristos * remake.c (update_file_1): Check always_make_flag; if it's set we 1995*69606e3fSchristos will always rebuild any target we can, even if none of its 1996*69606e3fSchristos prerequisites are newer. 1997*69606e3fSchristos * NEWS: Mention it. 1998*69606e3fSchristos 1999*69606e3fSchristos * doc/make.texi (Shell Function): Make it clear that make 2000*69606e3fSchristos variables marked as "export" are not passed to instances of the 2001*69606e3fSchristos shell function. 2002*69606e3fSchristos 2003*69606e3fSchristos Add new introspection variable .VARIABLES and .TARGETS. 2004*69606e3fSchristos 2005*69606e3fSchristos * variable.c (handle_special_var): New function. If the variable 2006*69606e3fSchristos reference passed in is "special" (.VARIABLES or .TARGETS), 2007*69606e3fSchristos calculate the new value if necessary. .VARIABLES is handled here: 2008*69606e3fSchristos walk through the hash of defined variables and construct a value 2009*69606e3fSchristos which is a list of the names. .TARGETS is handled by 2010*69606e3fSchristos build_target_list(). 2011*69606e3fSchristos (lookup_variable): Invoke handle_special_var(). 2012*69606e3fSchristos * file.c (build_target_list): Walk through the hask of known files 2013*69606e3fSchristos and construct a list of the names of all the ones marked as 2014*69606e3fSchristos targets. 2015*69606e3fSchristos * main.c (main): Initialize them to empty (and as simple variables). 2016*69606e3fSchristos * doc/make.texi (Special Variables): Document them. 2017*69606e3fSchristos * NEWS: Mention them. 2018*69606e3fSchristos 2019*69606e3fSchristos * variable.h (struct variable): Add a new flag "exportable" which 2020*69606e3fSchristos is true if the variable name is valid for export. 2021*69606e3fSchristos * variable.c (define_variable_in_set): Set "exportable" when a new 2022*69606e3fSchristos variable is defined. 2023*69606e3fSchristos (target_environment): Use the "exportable" flag instead of 2024*69606e3fSchristos re-checking the name here... an efficiency improvement. 2025*69606e3fSchristos 2026*69606e3fSchristos2002-07-31 Paul D. Smith <psmith@gnu.org> 2027*69606e3fSchristos 2028*69606e3fSchristos * config.h-vms.template: Updates to build on VMS. Thanks to 2029*69606e3fSchristos Brian_Benning@aksteel.com for helping verify the build. 2030*69606e3fSchristos * makefile.com: Build the new hash.c file. 2031*69606e3fSchristos * hash.h: Use strcpmi(), not stricmp(), in the 2032*69606e3fSchristos HAVE_CASE_INSENSITIVE_FS case. 2033*69606e3fSchristos 2034*69606e3fSchristos2002-07-30 Paul D. Smith <psmith@gnu.org> 2035*69606e3fSchristos 2036*69606e3fSchristos * hash.h (ISTRING_COMPARE, return_ISTRING_COMPARE): Add missing 2037*69606e3fSchristos backslashes to the HAVE_CASE_INSENSITIVE_FS case. 2038*69606e3fSchristos Reported by <Brian_Benning@aksteel.com>. 2039*69606e3fSchristos 2040*69606e3fSchristos2002-07-10 Paul D. Smith <psmith@gnu.org> 2041*69606e3fSchristos 2042*69606e3fSchristos * variable.c (pop_variable_scope): Remove variable made unused by 2043*69606e3fSchristos new hash infrastructure. 2044*69606e3fSchristos * read.c (dep_hash_cmp): Rewrite this to handle ignore_mtime 2045*69606e3fSchristos comparisons as well as name comparisons. 2046*69606e3fSchristos * variable.h: Add a prototype for new hash_init_function_table(). 2047*69606e3fSchristos * file.c (lookup_file): Remove variables made unused by new hash 2048*69606e3fSchristos infrastructure. 2049*69606e3fSchristos * dir.c (directory_contents_hash_2): Missing return of hash value. 2050*69606e3fSchristos (dir_contents_file_exists_p): Remove variables made unused by new 2051*69606e3fSchristos hash infrastructure. 2052*69606e3fSchristos 2053*69606e3fSchristos 2054*69606e3fSchristos Installed Greg McGary's integration of the hash functions from the 2055*69606e3fSchristos GNU id-utils package: 2056*69606e3fSchristos 2057*69606e3fSchristos2002-07-10 Greg McGary <greg@mcgary.org> 2058*69606e3fSchristos 2059*69606e3fSchristos * scripts/functions/filter-out: Add literals to to the 2060*69606e3fSchristos pattern space in order to add complexity, and trigger 2061*69606e3fSchristos use of an internal hash table. Fix documentation strings. 2062*69606e3fSchristos * scripts/targets/INTERMEDIATE: Reverse order of files 2063*69606e3fSchristos passed to expected `rm' command. 2064*69606e3fSchristos 2065*69606e3fSchristos2002-07-10 Greg McGary <greg@mcgary.org> 2066*69606e3fSchristos 2067*69606e3fSchristos * Makefile.am (SRCS): Add hash.c (noinst_HEADERS): Add hash.h 2068*69606e3fSchristos * hash.c: New file, taken from id-utils. 2069*69606e3fSchristos * hash.h: New file, taken from id-utils. 2070*69606e3fSchristos 2071*69606e3fSchristos * make.h (HASH, HASHI): Remove macros. 2072*69606e3fSchristos (find_char_unquote): Change arglist in decl. 2073*69606e3fSchristos (hash_init_directories): New function decl. 2074*69606e3fSchristos * variable.h (hash.h): New #include. 2075*69606e3fSchristos (MAKELEVEL_NAME, MAKELEVEL_LENGTH): New constants. 2076*69606e3fSchristos * filedef.h (hash.h): New #include. 2077*69606e3fSchristos (struct file) [next]: Remove member. 2078*69606e3fSchristos (file_hash_enter): Remove function decl. 2079*69606e3fSchristos (init_hash_files): New function decl. 2080*69606e3fSchristos 2081*69606e3fSchristos * ar.c (ar_name): Delay call to strlen until needed. 2082*69606e3fSchristos * main.c (initialize_global_hash_tables): New function. 2083*69606e3fSchristos (main): Call it. Use MAKELEVEL_NAME & MAKELEVEL_LENGTH. 2084*69606e3fSchristos * misc.c (remove_comments): Pass char constants to find_char_unquote. 2085*69606e3fSchristos * remake.c (notice_finished_file): Update last_mtime on `prev' chain. 2086*69606e3fSchristos 2087*69606e3fSchristos * dir.c (hash.h): New #include. 2088*69606e3fSchristos (struct directory_contents) [next, files]: Remove members. 2089*69606e3fSchristos [ctime]: Add member for VMS. [dirfiles]: Add hash-table member. 2090*69606e3fSchristos (directory_contents_hash_1, directory_contents_hash_2, 2091*69606e3fSchristos directory_contents_hash_cmp): New functions. 2092*69606e3fSchristos (directories_contents): Change type to `struct hash_table'. 2093*69606e3fSchristos (struct directory) [next]: Remove member. 2094*69606e3fSchristos (directory_hash_1, directory_hash_2, directory_hash_cmp): New funcs. 2095*69606e3fSchristos (directory): Change type to `struct hash_table'. 2096*69606e3fSchristos (struct dirfile) [next]: Remove member. 2097*69606e3fSchristos [length]: Add member. [impossible]: widen type to fill alignment gap. 2098*69606e3fSchristos (dirfile_hash_1, dirfile_hash_2, dirfile_hash_cmp): New functions. 2099*69606e3fSchristos (find_directory): Use new hash table package. 2100*69606e3fSchristos (dir_contents_file_exists_p): Likewise. 2101*69606e3fSchristos (file_impossible): Likewise. 2102*69606e3fSchristos (file_impossible_p): Likewise. 2103*69606e3fSchristos (print_dir_data_base): Likewise. 2104*69606e3fSchristos (open_dirstream): Likewise. 2105*69606e3fSchristos (read_dirstream): Likewise. 2106*69606e3fSchristos (hash_init_directories): New function. 2107*69606e3fSchristos 2108*69606e3fSchristos * file.c (hash.h): New #include. 2109*69606e3fSchristos (file_hash_1, file_hash_2, file_hash_cmp): New functions. 2110*69606e3fSchristos (files): Change type to `struct hash_table'. 2111*69606e3fSchristos (lookup_file): Use new hash table package. 2112*69606e3fSchristos (enter_file): Likewise. 2113*69606e3fSchristos (remove_intermediates): Likewise. 2114*69606e3fSchristos (snap_deps): Likewise. 2115*69606e3fSchristos (print_file_data_base): Likewise. 2116*69606e3fSchristos 2117*69606e3fSchristos * function.c 2118*69606e3fSchristos (function_table_entry_hash_1, function_table_entry_hash_2, 2119*69606e3fSchristos function_table_entry_hash_cmp): New functions. 2120*69606e3fSchristos (lookup_function): Remove `table' argument. 2121*69606e3fSchristos Use new hash table package. 2122*69606e3fSchristos (struct a_word) [chain, length]: New members. 2123*69606e3fSchristos (a_word_hash_1, a_word_hash_2, a_word_hash_cmp): New functions. 2124*69606e3fSchristos (struct a_pattern): New struct. 2125*69606e3fSchristos (func_filter_filterout): Pass through patterns noting boundaries 2126*69606e3fSchristos and '%', if present. Note a_word length. Use a hash table if 2127*69606e3fSchristos arglists are large enough to justify cost. 2128*69606e3fSchristos (function_table_init): Renamed from function_table. 2129*69606e3fSchristos (function_table): Declare as `struct hash_table'. 2130*69606e3fSchristos (FUNCTION_TABLE_ENTRIES): New constant. 2131*69606e3fSchristos (hash_init_function_table): New function. 2132*69606e3fSchristos 2133*69606e3fSchristos * read.c (hash.h): New #include. 2134*69606e3fSchristos (read_makefile): Pass char constants to find_char_unquote. 2135*69606e3fSchristos (dep_hash_1, dep_hash_2, dep_hash_cmp): New functions. 2136*69606e3fSchristos (uniquize_deps): Use hash table to efficiently identify duplicates. 2137*69606e3fSchristos (find_char_unquote): Accept two char-constant stop chars, rather 2138*69606e3fSchristos than a string constant, avoiding zillions of calls to strchr. 2139*69606e3fSchristos Tighten inner search loops to test only for desired delimiters. 2140*69606e3fSchristos 2141*69606e3fSchristos * variable.c (variable_hash_1, variable_hash_2, 2142*69606e3fSchristos variable_hash_cmp): New functions. 2143*69606e3fSchristos (variable_table): Declare as `struct hash_table'. 2144*69606e3fSchristos (global_variable_set): Remove initialization. 2145*69606e3fSchristos (init_hash_global_variable_set): New function. 2146*69606e3fSchristos (define_variable_in_set): Use new hash table package. 2147*69606e3fSchristos (lookup_variable): Likewise. 2148*69606e3fSchristos (lookup_variable_in_set): Likewise. 2149*69606e3fSchristos (initialize_file_variables): Likewise. 2150*69606e3fSchristos (pop_variable_scope): Likewise. 2151*69606e3fSchristos (create_new_variable_set): Likewise. 2152*69606e3fSchristos (merge_variable_sets): Likewise. 2153*69606e3fSchristos (define_automatic_variables): Likewise. 2154*69606e3fSchristos (target_environment): Likewise. 2155*69606e3fSchristos (print_variable_set): Likewise. 2156*69606e3fSchristos 2157*69606e3fSchristos2002-07-10 Paul D. Smith <psmith@gnu.org> 2158*69606e3fSchristos 2159*69606e3fSchristos Implement the SysV make syntax $$@, $$(@D), and $$(@F) in the 2160*69606e3fSchristos prerequisite list. A real SysV make will expand the entire 2161*69606e3fSchristos prerequisites list _twice_: we don't do that as it's a big 2162*69606e3fSchristos backward-compatibility problem. We only replace those specific 2163*69606e3fSchristos variables. 2164*69606e3fSchristos 2165*69606e3fSchristos * read.c (record_files): Replace any $@, $(@D), and $(@F) variable 2166*69606e3fSchristos references left in the list of prerequisites. Check for .POSIX as 2167*69606e3fSchristos we record targets, so we can disable non-POSIX behavior while 2168*69606e3fSchristos reading makefiles as well as running them. 2169*69606e3fSchristos (eval): Check the prerequisite list to see if we have anything 2170*69606e3fSchristos that looks like a SysV prerequisite variable reference. 2171*69606e3fSchristos 2172*69606e3fSchristos2002-07-09 Paul D. Smith <psmith@gnu.org> 2173*69606e3fSchristos 2174*69606e3fSchristos * doc/make.texi (Prerequisite Types): Add a new section describing 2175*69606e3fSchristos order-only prerequisites. 2176*69606e3fSchristos 2177*69606e3fSchristos * read.c (uniquize_deps): If we have the same file as both a 2178*69606e3fSchristos normal and order-only prereq, get rid of the order-only prereq, 2179*69606e3fSchristos since the normal one supersedes it. 2180*69606e3fSchristos 2181*69606e3fSchristos2002-07-08 Paul D. Smith <psmith@gnu.org> 2182*69606e3fSchristos 2183*69606e3fSchristos * AUTHORS: Added Greg McGary to the AUTHORS file. 2184*69606e3fSchristos * NEWS: Blurbed order-only prerequisites. 2185*69606e3fSchristos * file.c (print_file): Show order-only deps properly when printing 2186*69606e3fSchristos the database. 2187*69606e3fSchristos 2188*69606e3fSchristos * maintMakefile: Add "update" targets for wget'ing the latest 2189*69606e3fSchristos versions of various external files. Taken from Makefile.maint in 2190*69606e3fSchristos autoconf, etc. 2191*69606e3fSchristos 2192*69606e3fSchristos * dosbuild.bat: Somehow we got _double_ ^M's. Remove them. 2193*69606e3fSchristos Reported by Eli Zaretskii <eliz@is.elta.co.il>. 2194*69606e3fSchristos 2195*69606e3fSchristos2002-07-07 Paul D. Smith <psmith@gnu.org> 2196*69606e3fSchristos 2197*69606e3fSchristos * po/*.po: Remove. We'll use wget to retrieve them at release 2198*69606e3fSchristos time. 2199*69606e3fSchristos 2200*69606e3fSchristos * variable.c (do_variable_definition) [W32]: On W32 using cmd 2201*69606e3fSchristos rather than a shell you get an exception. Make sure we look up 2202*69606e3fSchristos the variable. Patch provided by Eli Zaretskii <eliz@is.elta.co.il>. 2203*69606e3fSchristos 2204*69606e3fSchristos * remake.c (notice_finished_file): Fix handling of -t flag. 2205*69606e3fSchristos Patch provided by Henning Makholm <henning@makholm.net>. 2206*69606e3fSchristos 2207*69606e3fSchristos * implicit.c (pattern_search): Some systems apparently run short 2208*69606e3fSchristos of stack space, and using alloca() in this function caused an 2209*69606e3fSchristos overrun. I modified it to use xmalloc() on the two variables 2210*69606e3fSchristos which seemed like they might get large. Fixes Bug #476. 2211*69606e3fSchristos 2212*69606e3fSchristos * main.c (print_version): Update copyright notice to conform with 2213*69606e3fSchristos GNU standards. 2214*69606e3fSchristos (print_usage): Update help output. 2215*69606e3fSchristos 2216*69606e3fSchristos * function.c (func_eval): Create a new make function, $(eval 2217*69606e3fSchristos ...). Expand the arguments, put them into a buffer, then invoke 2218*69606e3fSchristos eval_buffer() on the resulting string. 2219*69606e3fSchristos (func_quote): Create a new function, $(quote VARNAME). Inserts 2220*69606e3fSchristos the value of the variable VARNAME without expanding it any 2221*69606e3fSchristos further. 2222*69606e3fSchristos 2223*69606e3fSchristos * read.c (struct ebuffer): Change the linebuffer structure to an 2224*69606e3fSchristos "eval buffer", which can be either a file or a buffer. 2225*69606e3fSchristos (eval_makefile): Move the code in the old read_makefile() which 2226*69606e3fSchristos located a makefile into here: create a struct ebuffer with that 2227*69606e3fSchristos information. Have it invoke the new function eval() with that 2228*69606e3fSchristos ebuffer. 2229*69606e3fSchristos (eval_buffer): Create a new function that creates a struct ebuffer 2230*69606e3fSchristos that holds a string buffer instead of a file. Have it invoke 2231*69606e3fSchristos eval() with that ebuffer. 2232*69606e3fSchristos (eval): New function that contains the guts of the old 2233*69606e3fSchristos read_makefile() function: this function parses makefiles. Obtains 2234*69606e3fSchristos data to parse from the provided ebuffer. Some modifications to 2235*69606e3fSchristos make the flow of the function cleaner and clearer. Still could 2236*69606e3fSchristos use some work here... 2237*69606e3fSchristos (do_define): Takes a struct ebuffer instead of a FILE*. Read the 2238*69606e3fSchristos contents of the define/endef variable from the ebuffer. 2239*69606e3fSchristos (readstring): Read the next line from a string-style ebuffer. 2240*69606e3fSchristos (readline): Read the next line from an ebuffer. If it's a string 2241*69606e3fSchristos ebuffer, invoke readstring(). If it's a FILE* ebuffer, read it 2242*69606e3fSchristos from the file. 2243*69606e3fSchristos 2244*69606e3fSchristos * dep.h (eval_buffer): Prototype eval_buffer(); 2245*69606e3fSchristos 2246*69606e3fSchristos * variable.c (do_variable_definition): Make sure that all 2247*69606e3fSchristos non-target-specific variables are registered in the global set. 2248*69606e3fSchristos If we're invoked from an $(eval ...) we might be inside a $(call 2249*69606e3fSchristos ...) or other function which has pushed a variable scope; we still 2250*69606e3fSchristos want to define our variables from evaluated makefile code in the 2251*69606e3fSchristos global scope. 2252*69606e3fSchristos 2253*69606e3fSchristos2002-07-03 Greg McGary <greg@mcgary.org> 2254*69606e3fSchristos 2255*69606e3fSchristos * dep.h (struct dep) [ignore_mtime]: New member. 2256*69606e3fSchristos [changed]: convert to a bitfield. 2257*69606e3fSchristos * implicit.c (pattern_search): Zero ignore_mtime. 2258*69606e3fSchristos * main.c (main, handle_non_switch_argument): Likewise. 2259*69606e3fSchristos * rule.c (convert_suffix_rule): Likewise. 2260*69606e3fSchristos * read.c (read_all_makefiles, read_makefile, multi_glob): Likewise. 2261*69606e3fSchristos (read_makefile): Parse '|' in prerequisite list. 2262*69606e3fSchristos (uniquize_deps): Consider ignore_mtime when comparing deps. 2263*69606e3fSchristos * remake.c (update_file_1, check_dep): Don't force remake for 2264*69606e3fSchristos dependencies that have d->ignore_mtime. 2265*69606e3fSchristos * commands.c (FILE_LIST_SEPARATOR): New constant. 2266*69606e3fSchristos (set_file_variables): Don't include a 2267*69606e3fSchristos prerequisite in $+, $^ or $? if d->ignore_mtime. 2268*69606e3fSchristos Define $|. 2269*69606e3fSchristos 2270*69606e3fSchristos2002-06-18 Paul D. Smith <psmith@gnu.org> 2271*69606e3fSchristos 2272*69606e3fSchristos * make.texinfo: Updates for next revision. New date/rev/etc. 2273*69606e3fSchristos Recreate all Info menus. Change license on the manual to the GNU 2274*69606e3fSchristos Free Documentation License. A number of typos. 2275*69606e3fSchristos (Variables Simplify): Don't use "-" before it's defined. 2276*69606e3fSchristos (Automatic Prerequisites): Rewrite the target example to work 2277*69606e3fSchristos properly if the compile fails. Remove incorrect comments about 2278*69606e3fSchristos how "set -e" behaves. 2279*69606e3fSchristos (Text Functions): Move the "word", "wordlist", "words", and 2280*69606e3fSchristos "firstword" functions here, from "File Name Functions". 2281*69606e3fSchristos * make-stds.texi: Update from latest GNU version. 2282*69606e3fSchristos * fdl.texi: (created) Import the latest GNU version. 2283*69606e3fSchristos 2284*69606e3fSchristos2002-06-06 Paul D. Smith <psmith@gnu.org> 2285*69606e3fSchristos 2286*69606e3fSchristos * variable.c (do_variable_definition): New function: extract the 2287*69606e3fSchristos part of try_variable_definition() that actually sets the value 2288*69606e3fSchristos into a separate function. 2289*69606e3fSchristos (try_variable_definition): Call do_variable_definition() after 2290*69606e3fSchristos parsing the variable definition string. 2291*69606e3fSchristos (define_variable_in_set): Make the name argument const. 2292*69606e3fSchristos 2293*69606e3fSchristos * variable.h (enum variable_flavor): Make public. 2294*69606e3fSchristos (do_variable_definition): Create prototype. 2295*69606e3fSchristos 2296*69606e3fSchristos * read.c (read_all_makefiles): Create a new built-in variable, 2297*69606e3fSchristos MAKEFILE_LIST. 2298*69606e3fSchristos (read_makefile): Add each makefile read in to this variable value. 2299*69606e3fSchristos 2300*69606e3fSchristos2002-05-18 Eli Zaretskii <eliz@is.elta.co.il> 2301*69606e3fSchristos 2302*69606e3fSchristos * Makefile.DOS.template: Tweak according to changes in the 2303*69606e3fSchristos distribution. Add back the dependencies of *.o files. 2304*69606e3fSchristos 2305*69606e3fSchristos * configh.dos.template: Synchronize with config.h.in. 2306*69606e3fSchristos 2307*69606e3fSchristos2002-05-09 Paul D. Smith <psmith@gnu.org> 2308*69606e3fSchristos 2309*69606e3fSchristos * file.c (file_timestamp_now): Use K&R function declaration. 2310*69606e3fSchristos 2311*69606e3fSchristos * getloadavg.c (getloadavg): Merge setlocale() fix from sh-utils 2312*69606e3fSchristos getloadavg.c. Autoconf thinks QNX is SVR4-like, but it isn't, so 2313*69606e3fSchristos #undef it. Remove predefined setup of NLIST_STRUCT. Decide 2314*69606e3fSchristos whether to include nlist.h based on HAVE_NLIST_H. Change obsolete 2315*69606e3fSchristos NLIST_NAME_UNION to new HAVE_STRUCT_NLIST_N_UN_N_NAME. 2316*69606e3fSchristos * configure.in (NLIST_STRUCT): Define this if we have nlist.h and 2317*69606e3fSchristos nlist.n_name is a pointer rather than an array. 2318*69606e3fSchristos 2319*69606e3fSchristos * acinclude.m4 (make_FUNC_SETVBUF_REVERSED): Grab the latest 2320*69606e3fSchristos version of AC_FUNC_SETVBUF_REVERSED from autoconf CVS. 2321*69606e3fSchristos * configure.in: Use it instead of the old version. 2322*69606e3fSchristos 2323*69606e3fSchristos * main.c (main): Prefer setvbuf() to setlinebuf(). 2324*69606e3fSchristos 2325*69606e3fSchristos2002-05-08 Paul D. Smith <psmith@gnu.org> 2326*69606e3fSchristos 2327*69606e3fSchristos * Makefile.am (make_LDADD): Add GETLOADAVG_LIBS. 2328*69606e3fSchristos (loadavg_LDADD): Ditto. 2329*69606e3fSchristos 2330*69606e3fSchristos2002-04-29 Paul D. Smith <psmith@gnu.org> 2331*69606e3fSchristos 2332*69606e3fSchristos * expand.c (recursively_expand_for_file): Rename 2333*69606e3fSchristos recursively_expand() to recursively_expand_for_file() and provide 2334*69606e3fSchristos an extra argument, struct file. If the argument is provided, set 2335*69606e3fSchristos the variable scope to that of the file before expanding. 2336*69606e3fSchristos * variable.h (recursively_expand): Make this a macro that invokes 2337*69606e3fSchristos recursively_expand_for_file() with a NULL file pointer. 2338*69606e3fSchristos * variable.c (target_environment): Call the renamed function and 2339*69606e3fSchristos provide the current file context. 2340*69606e3fSchristos Fixes Debian bug #144306. 2341*69606e3fSchristos 2342*69606e3fSchristos2002-04-28 Paul D. Smith <psmith@gnu.org> 2343*69606e3fSchristos 2344*69606e3fSchristos Allow $(call ...) user-defined variables to be self-referencing 2345*69606e3fSchristos without throwing an error. Allows implementation of transitive 2346*69606e3fSchristos closures, among other possibly useful things. 2347*69606e3fSchristos Requested by: Philip Guenther <guenther@sendmail.com> 2348*69606e3fSchristos 2349*69606e3fSchristos * variable.h (struct variable): Add a new field: exp_count, and 2350*69606e3fSchristos new macros to hold its size and maximum value. 2351*69606e3fSchristos (warn_undefined): Make this a macro. 2352*69606e3fSchristos * variable.c (define_variable_in_set): Initialize it. 2353*69606e3fSchristos * expand.c (recursively_expand): If we detect recursive expansion 2354*69606e3fSchristos of a variable, check the exp_count field. If it's greater than 0 2355*69606e3fSchristos allow the recursion and decrement the count. 2356*69606e3fSchristos (warn_undefined): Remove this (now a macro in variable.h). 2357*69606e3fSchristos * function.c (func_call): Before we expand the user-defined 2358*69606e3fSchristos function, modify its exp_count field to contain the maximum 2359*69606e3fSchristos number of recursive calls we'll allow. After the call, reset it 2360*69606e3fSchristos to 0. 2361*69606e3fSchristos 2362*69606e3fSchristos2002-04-21 Paul D. Smith <psmith@gnu.org> 2363*69606e3fSchristos 2364*69606e3fSchristos Modified to use latest autoconf (2.53), automake (1.6.1), and 2365*69606e3fSchristos gettext (0.11.1). We're using gettext's new "external" support, 2366*69606e3fSchristos to avoid including libintl source with GNU make. 2367*69606e3fSchristos 2368*69606e3fSchristos * README.cvs: New file. Explain how to build GNU make from CVS. 2369*69606e3fSchristos 2370*69606e3fSchristos * configure.in: Modify checking for the system glob library. 2371*69606e3fSchristos Use AC_EGREP_CPP instead of AC_TRY_CPP. Remove the setting of 2372*69606e3fSchristos GLOBDIR (we will always put "glob" in SUBDIRS, so automake 2373*69606e3fSchristos etc. will manage it correctly). Set an automake conditional 2374*69606e3fSchristos USE_LOCAL_GLOB to decide whether to compile the glob library. 2375*69606e3fSchristos 2376*69606e3fSchristos * getloadavg.c (main): Include make.h in the "TEST" program to 2377*69606e3fSchristos avoid warnings. 2378*69606e3fSchristos 2379*69606e3fSchristos * Makefile.am: Remove special rules for loadavg. Replace them 2380*69606e3fSchristos with Automake capabilities for building extra programs. 2381*69606e3fSchristos 2382*69606e3fSchristos * signame.c: This file does nothing if the system provide 2383*69606e3fSchristos strsignal(). If not, it implements strsignal(). If the system 2384*69606e3fSchristos doesn't define sys_siglist, then we make our own; otherwise we use 2385*69606e3fSchristos the system version. 2386*69606e3fSchristos * signame.h: Removed. 2387*69606e3fSchristos 2388*69606e3fSchristos * main.c (main): No need to invoke signame_init(). Update copyright. 2389*69606e3fSchristos 2390*69606e3fSchristos * ABOUT-NLS: Removed. 2391*69606e3fSchristos * gettext.c: Removed. 2392*69606e3fSchristos * gettext.h: Get a simplified copy from the gettext package. 2393*69606e3fSchristos * po/*: Created. 2394*69606e3fSchristos * i18n/*.po: Moved to po/. 2395*69606e3fSchristos * i18n/: Removed. 2396*69606e3fSchristos 2397*69606e3fSchristos * config/*: Created. Contains package configuration helper files. 2398*69606e3fSchristos * config.guess, config.sub: Moved to config directory. 2399*69606e3fSchristos 2400*69606e3fSchristos * configure.in (AC_CONFIG_FILES): Add po/Makefile.in, config/Makefile. 2401*69606e3fSchristos Rework to use new-style autoconf features. Use the "external" 2402*69606e3fSchristos mode for gettext. Make the build.sh config file conditional on 2403*69606e3fSchristos whether build.sh.in exists, to avoid autoconf errors. 2404*69606e3fSchristos * acinclude.m4: Removed almost all macros as being obsolete. 2405*69606e3fSchristos Rewrote remaining macros to use AC_DEFINE. 2406*69606e3fSchristos * acconfig.h: Removed. 2407*69606e3fSchristos 2408*69606e3fSchristos * Makefile.am (EXTRA_DIST): Add config/config.rpath. Use a 2409*69606e3fSchristos conditional to handle customs support. Remove special handling 2410*69606e3fSchristos for i18n features. 2411*69606e3fSchristos 2412*69606e3fSchristos2002-04-20 Paul D. Smith <psmith@gnu.org> 2413*69606e3fSchristos 2414*69606e3fSchristos * function.c (func_call): Don't mark the argument variables $1, 2415*69606e3fSchristos etc. as recursive. They've already been fully expanded so 2416*69606e3fSchristos there's no need to do it again, and doing so strips escaped $'s. 2417*69606e3fSchristos Reported by Sebastian Glita <glseba@yahoo.com>. 2418*69606e3fSchristos 2419*69606e3fSchristos * remake.c (notice_finished_file): Walk through double-colon 2420*69606e3fSchristos entries via the prev field, not the next field! 2421*69606e3fSchristos Reported by Greg McGary <greg@mcgary.org>. 2422*69606e3fSchristos 2423*69606e3fSchristos * main.c (main): If the user specifies -q and asks for a specific 2424*69606e3fSchristos target which is a makefile, we got an assert. In that case it 2425*69606e3fSchristos turns out we should continue normally instead. 2426*69606e3fSchristos 2427*69606e3fSchristos * i18n/de.po, i18n/fr.po: Installed an updated translation. 2428*69606e3fSchristos 2429*69606e3fSchristos * i18n/he.po: Installed a new translation. 2430*69606e3fSchristos 2431*69606e3fSchristos2002-01-07 Paul D. Smith <psmith@gnu.org> 2432*69606e3fSchristos 2433*69606e3fSchristos * i18n/es.po, i18n/ru.po: Installed an updated translation. 2434*69606e3fSchristos 2435*69606e3fSchristos2001-12-04 Paul D. Smith <psmith@gnu.org> 2436*69606e3fSchristos 2437*69606e3fSchristos * i18n/ja.po: Installed an updated translation. 2438*69606e3fSchristos 2439*69606e3fSchristos2001-09-06 Paul Eggert <eggert@twinsun.com> 2440*69606e3fSchristos 2441*69606e3fSchristos * configure.in (AC_CHECK_HEADERS): Add sys/resource.h. 2442*69606e3fSchristos (AC_CHECK_FUNCS): Add getrlimit, setrlimit. 2443*69606e3fSchristos 2444*69606e3fSchristos * main.c: Include <sys/resource.h> if it, getrlimit, and setrlimit 2445*69606e3fSchristos are available. 2446*69606e3fSchristos (main): Get rid of any avoidable limit on stack size. 2447*69606e3fSchristos 2448*69606e3fSchristos2001-09-04 Paul D. Smith <psmith@gnu.org> 2449*69606e3fSchristos 2450*69606e3fSchristos * i18n/da.po: Installed an updated translation. 2451*69606e3fSchristos 2452*69606e3fSchristos2001-08-03 Paul D. Smith <psmith@gnu.org> 2453*69606e3fSchristos 2454*69606e3fSchristos * i18n/fr.po: Installed an updated translation. 2455*69606e3fSchristos Resolves Debian bug #106720. 2456*69606e3fSchristos 2457*69606e3fSchristos2001-06-13 Paul D. Smith <psmith@gnu.org> 2458*69606e3fSchristos 2459*69606e3fSchristos * i18n/da.po, configure.in (ALL_LINGUAS): Installed a new 2460*69606e3fSchristos translation. 2461*69606e3fSchristos 2462*69606e3fSchristos2001-06-11 Paul D. Smith <psmith@gnu.org> 2463*69606e3fSchristos 2464*69606e3fSchristos * i18n/ko.po: Installed a new translation. 2465*69606e3fSchristos 2466*69606e3fSchristos2001-05-06 Paul D. Smith <psmith@gnu.org> 2467*69606e3fSchristos 2468*69606e3fSchristos Modify the EINTR handling. 2469*69606e3fSchristos 2470*69606e3fSchristos * job.c (new_job): Reorganize the jobserver algorithm. Reorder 2471*69606e3fSchristos the way in which we manage the file descriptor/signal handler race 2472*69606e3fSchristos trap to be more efficient. 2473*69606e3fSchristos 2474*69606e3fSchristos2001-05-06 Paul Eggert <eggert@twinsun.com> 2475*69606e3fSchristos 2476*69606e3fSchristos Restart almost all system calls that are interrupted, instead 2477*69606e3fSchristos of worrying about EINTR. The lone exception is the read() for 2478*69606e3fSchristos job tokens. 2479*69606e3fSchristos 2480*69606e3fSchristos * configure.in (HAVE_SA_RESTART): New macro. 2481*69606e3fSchristos (MAKE_JOBSERVER): Define to 1 only if HAVE_SA_RESTART. 2482*69606e3fSchristos * main.c (main): Use SA_RESTART instead of the old, 2483*69606e3fSchristos nonstandard SA_INTERRUPT. 2484*69606e3fSchristos 2485*69606e3fSchristos * configure.in (AC_CHECK_FUNCS): Add bsd_signal. 2486*69606e3fSchristos * main.c (bsd_signal): New function or macro, 2487*69606e3fSchristos if the implementation doesn't supply it. 2488*69606e3fSchristos (The bsd_signal function will be in POSIX 1003.1-200x.) 2489*69606e3fSchristos (HANDLESIG): Remove. 2490*69606e3fSchristos (main, FATAL_SIG): Use bsd_signal instead of signal or HANDLESIG. 2491*69606e3fSchristos 2492*69606e3fSchristos * make.h (EINTR_SET): Remove. 2493*69606e3fSchristos (SA_RESTART): New macro. 2494*69606e3fSchristos 2495*69606e3fSchristos * arscan.c (ar_member_touch): Don't worry about EINTR. 2496*69606e3fSchristos * function.c (func_shell): Likewise. 2497*69606e3fSchristos * job.c (reap_children, free_child, new_job): Likewise. 2498*69606e3fSchristos * main.c (main): Likewise. 2499*69606e3fSchristos * remake.c (touch_file, name_mtime): Likewise. 2500*69606e3fSchristos 2501*69606e3fSchristos * arscan.c (ar_member_touch): Fix bug uncovered by EINTR removal; 2502*69606e3fSchristos if fstat failed with errno!=EINTR, the error was ignored. 2503*69606e3fSchristos 2504*69606e3fSchristos * job.c (set_child_handler_action_flags): New function. 2505*69606e3fSchristos (new_job): Use it to temporarily clear the SIGCHLD action flags 2506*69606e3fSchristos while reading the token. 2507*69606e3fSchristos 2508*69606e3fSchristos2001-05-02 Paul D. Smith <psmith@gnu.org> 2509*69606e3fSchristos 2510*69606e3fSchristos * job.c (start_job_command): Don't add define/endef per-line flags 2511*69606e3fSchristos to the top-level flags setting. 2512*69606e3fSchristos 2513*69606e3fSchristos2001-04-03 Paul D. Smith <psmith@gnu.org> 2514*69606e3fSchristos 2515*69606e3fSchristos * arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low 2516*69606e3fSchristos bit on error, so check for odd return values, not non-0 return 2517*69606e3fSchristos values. 2518*69606e3fSchristos (VMS_get_member_info): Calculate the timezone differences correctly. 2519*69606e3fSchristos Reported by John Fowler <jfowler@nyx.net>. 2520*69606e3fSchristos 2521*69606e3fSchristos 2522*69606e3fSchristos2001-03-14 Paul D. Smith <psmith@gnu.org> 2523*69606e3fSchristos 2524*69606e3fSchristos * variable.c (lookup_variable) [VMS]: Null-terminate the variable 2525*69606e3fSchristos value before invoking define_variable(). 2526*69606e3fSchristos Reported by John Fowler <jfowler@nyx.net>. 2527*69606e3fSchristos 2528*69606e3fSchristos2001-02-07 Paul D. Smith <psmith@gnu.org> 2529*69606e3fSchristos 2530*69606e3fSchristos * read.c (record_target_var): If we reset the variable due to a 2531*69606e3fSchristos command-line variable setting overriding it, turn off the "append" 2532*69606e3fSchristos flag. 2533*69606e3fSchristos 2534*69606e3fSchristos2001-01-17 Paul D. Smith <psmith@gnu.org> 2535*69606e3fSchristos 2536*69606e3fSchristos * variable.c (lookup_variable) [VMS]: When getting values from the 2537*69606e3fSchristos environment, allocate enough space for the _value_ plus escapes, 2538*69606e3fSchristos not enough space for the name plus escapes :-/. 2539*69606e3fSchristos Reported by John Fowler <jfowler@nyx.net>. 2540*69606e3fSchristos 2541*69606e3fSchristos * remake.c (f_mtime): Removed the "***" prefix from the mod time 2542*69606e3fSchristos warnings that make generates, so it doesn't look like an error. 2543*69606e3fSchristos Reported by Karl Berry <karl@gnu.org>. 2544*69606e3fSchristos 2545*69606e3fSchristos 2546*69606e3fSchristos Fix for PR/2020: Rework appended target-specific variables. I'm 2547*69606e3fSchristos fairly confident this algorithm is finally correct. 2548*69606e3fSchristos 2549*69606e3fSchristos * expand.c (allocated_variable_append): Rewrite. Instead of 2550*69606e3fSchristos expanding each appended variable then adding all the expanded 2551*69606e3fSchristos strings together, we append all the unexpanded values going up 2552*69606e3fSchristos through the variable set contexts, then expand the final result. 2553*69606e3fSchristos This behaves just like non-target-specific appended variable 2554*69606e3fSchristos values, while the old way didn't in various corner cases. 2555*69606e3fSchristos (variable_append): New function: recursively append the unexpanded 2556*69606e3fSchristos value of a variable, walking from the outermost variable scope to 2557*69606e3fSchristos the innermost. 2558*69606e3fSchristos * variable.c (lookup_variable): Remove the code that looked up the 2559*69606e3fSchristos variable set list if the found variable was "append". We don't 2560*69606e3fSchristos need this anymore. 2561*69606e3fSchristos (lookup_variable_in_set): Make this non-static so we can use it 2562*69606e3fSchristos elsewhere. 2563*69606e3fSchristos (try_variable_definition): Use lookup_variable_in_set() rather 2564*69606e3fSchristos than faking out current_variable_set_list by hand (cleanup). 2565*69606e3fSchristos * variable.h: Add a prototype for the now non-static 2566*69606e3fSchristos lookup_variable_in_set(). 2567*69606e3fSchristos 2568*69606e3fSchristos2000-11-17 Paul D. Smith <psmith@gnu.org> 2569*69606e3fSchristos 2570*69606e3fSchristos * remake.c (f_mtime) [WINDOWS32]: On various advice, I changed the 2571*69606e3fSchristos WINDOWS32 port to assume timestamps can be up to 3 seconds away 2572*69606e3fSchristos before throwing a fit. 2573*69606e3fSchristos 2574*69606e3fSchristos2000-11-17 Paul D. Smith <psmith@gnu.org> 2575*69606e3fSchristos 2576*69606e3fSchristos * read.c (readline): CRLF calculations had a hole, if you hit the 2577*69606e3fSchristos buffer grow scenario just right. Reworked the algorithm to avoid 2578*69606e3fSchristos the need for len or lastlen at all. Problem description with 2579*69606e3fSchristos sample code chages provided by Chris Faylor <cgf@redhat.com>. 2580*69606e3fSchristos 2581*69606e3fSchristos2000-10-24 Paul D. Smith <psmith@gnu.org> 2582*69606e3fSchristos 2583*69606e3fSchristos * gettext.c (SWAP): Declare this with the prototype, otherwise 2584*69606e3fSchristos some systems don't work (non-32-bit? Reported for Cray T3E). 2585*69606e3fSchristos Reported by Thorstein Thorsteinsson <thor@signe.teokem.lu.se>. 2586*69606e3fSchristos 2587*69606e3fSchristos2000-10-05 Paul D. Smith <psmith@gnu.org> 2588*69606e3fSchristos 2589*69606e3fSchristos * acinclude.m4 (AM_LC_MESSAGES): Remove undefined macro 2590*69606e3fSchristos AM_LC_MESSAGES; it doesn't seem to do anything anyway?? 2591*69606e3fSchristos 2592*69606e3fSchristos * i18n/gl.po, configure.in (ALL_LINGUAS): New Galician translation. 2593*69606e3fSchristos 2594*69606e3fSchristos2000-09-22 Paul D. Smith <psmith@gnu.org> 2595*69606e3fSchristos 2596*69606e3fSchristos * gettext.c: Don't #define _GETTEXT_H here; we only include some 2597*69606e3fSchristos parts of the real gettext.h here, and we expect to really include 2598*69606e3fSchristos the real gettext.h later. If we keep this #define, it's ignored. 2599*69606e3fSchristos 2600*69606e3fSchristos2000-09-21 Paul D. Smith <psmith@gnu.org> 2601*69606e3fSchristos 2602*69606e3fSchristos * main.c (log_working_directory): Rework the text to use complete 2603*69606e3fSchristos sentences, to make life simpler for the translators. 2604*69606e3fSchristos 2605*69606e3fSchristos2000-08-29 Paul D. Smith <psmith@gnu.org> 2606*69606e3fSchristos 2607*69606e3fSchristos * file.c (remove_intermediates): Print a debug message before we 2608*69606e3fSchristos remove intermediate files, so the user (if she uses -d) knows 2609*69606e3fSchristos what's going on. 2610*69606e3fSchristos 2611*69606e3fSchristos2000-08-21 Paul D. Smith <psmith@gnu.org> 2612*69606e3fSchristos 2613*69606e3fSchristos * variable.c (try_variable_definition): Change how we handle 2614*69606e3fSchristos target-specific append variable defns: instead of just setting the 2615*69606e3fSchristos value, expand it as an append _but_ only within the current 2616*69606e3fSchristos target's context. Otherwise we lose all but the last value if the 2617*69606e3fSchristos variable is appended more than once within the current target 2618*69606e3fSchristos context. Fixes PR/1831. 2619*69606e3fSchristos 2620*69606e3fSchristos2000-08-16 Paul D. Smith <psmith@gnu.org> 2621*69606e3fSchristos 2622*69606e3fSchristos * function.c (func_shell): Nul-terminate the buffer before 2623*69606e3fSchristos printing an exec error message (just in case it's not!). 2624*69606e3fSchristos Fixes PR/1860, reported by Joey Hess <joey@valinux.com>. 2625*69606e3fSchristos 2626*69606e3fSchristos2000-07-25 Paul D. Smith <psmith@gnu.org> 2627*69606e3fSchristos 2628*69606e3fSchristos * job.c (construct_command_argv_internal): Add "~" to the list of 2629*69606e3fSchristos sh_chars[] which disallow optimizing out the shell call. 2630*69606e3fSchristos 2631*69606e3fSchristos2000-07-23 Paul Eggert <eggert@twinsun.com> 2632*69606e3fSchristos 2633*69606e3fSchristos * NEWS, make.texinfo: Document .LOW_RESOLUTION_TIME, which 2634*69606e3fSchristos supersedes --disable-nsec-timestamps. 2635*69606e3fSchristos * make.texinfo: Consistently use "time stamp" instead of "timestamp". 2636*69606e3fSchristos * README: Remove --disable-nsec-timestamps. 2637*69606e3fSchristos 2638*69606e3fSchristos * filedef.h (struct file.low_resolution_time): New member. 2639*69606e3fSchristos * file.c (snap_deps): Add support for .LOW_RESOLUTION_TIME. 2640*69606e3fSchristos * remake.c (update_file_1): 2641*69606e3fSchristos Avoid spurious rebuilds due to low resolution time stamps, 2642*69606e3fSchristos generalizing the earlier code that applied only to archive members. 2643*69606e3fSchristos (f_mtime): Archive members always have low resolution time stamps. 2644*69606e3fSchristos 2645*69606e3fSchristos * configure.in: Remove --disable-nsec-timestamps, as this has 2646*69606e3fSchristos been superseded by .LOW_RESOLUTION_TIME. 2647*69606e3fSchristos 2648*69606e3fSchristos2000-07-23 Paul Eggert <eggert@twinsun.com> 2649*69606e3fSchristos 2650*69606e3fSchristos * configure.in (enable_nsec_timestamps): Renamed from 2651*69606e3fSchristos make_cv_nsec_timestamps, since enable/disable options 2652*69606e3fSchristos shouldn't be cached. 2653*69606e3fSchristos 2654*69606e3fSchristos2000-07-23 Bruno Haible <haible@clisp.cons.org> 2655*69606e3fSchristos and Paul Eggert <eggert@twinsun.com> 2656*69606e3fSchristos 2657*69606e3fSchristos * file.c (file_timestamp_now): 2658*69606e3fSchristos Use preprocessor-time check for FILE_TIMESTAMP_HI_RES 2659*69606e3fSchristos so that clock_gettime is not linked unless needed. 2660*69606e3fSchristos 2661*69606e3fSchristos * filedef.h (FILE_TIMESTAMP_HI_RES): 2662*69606e3fSchristos Remove definition; "configure" now does this. 2663*69606e3fSchristos 2664*69606e3fSchristos * configure.in (jm_AC_TYPE_UINTMAX_T): Move up, 2665*69606e3fSchristos to before high resolution file timestamp check, 2666*69606e3fSchristos since that check now uses uintmax_t. 2667*69606e3fSchristos (FILE_TIMESTAMP_HI_RES): Define to nonzero if the code should use 2668*69606e3fSchristos high resolution file timestamps. 2669*69606e3fSchristos (HAVE_CLOCK_GETTIME): Do not define if !FILE_TIMESTAMP_HI_RES, 2670*69606e3fSchristos so that we don't link in clock_gettime unnecessarily. 2671*69606e3fSchristos 2672*69606e3fSchristos2000-07-17 Paul D. Smith <psmith@gnu.org> 2673*69606e3fSchristos 2674*69606e3fSchristos * i18n/ja.po: New version of the translation file. 2675*69606e3fSchristos 2676*69606e3fSchristos2000-07-07 Paul D. Smith <psmith@gnu.org> 2677*69606e3fSchristos 2678*69606e3fSchristos * remake.c (f_mtime): If NO_FLOAT is defined, don't bother with 2679*69606e3fSchristos the offset calculation. 2680*69606e3fSchristos (name_mtime): Replace EINTR test with EINTR_SET macro. 2681*69606e3fSchristos 2682*69606e3fSchristos2000-07-07 Paul Eggert <eggert@twinsun.com> 2683*69606e3fSchristos 2684*69606e3fSchristos Fix for PR/1811: 2685*69606e3fSchristos 2686*69606e3fSchristos * remake.c (update_file_1): 2687*69606e3fSchristos Avoid spurious rebuilds of archive members due to their 2688*69606e3fSchristos timestamp resolution being only one second. 2689*69606e3fSchristos (f_mtime): Avoid spurious warnings of timestamps in the future due to 2690*69606e3fSchristos the clock's resolution being lower than file timestamps'. 2691*69606e3fSchristos When warning about future timestamps, report only the discrepancy, 2692*69606e3fSchristos not the absolute value of the timestamp and the current time. 2693*69606e3fSchristos 2694*69606e3fSchristos * file.c (file_timestamp_now): New arg RESOLUTION. 2695*69606e3fSchristos * filedef.h (file_timestamp_now): Likewise. 2696*69606e3fSchristos (FILE_TIMESTAMP_NS): Now returns int. All uses changed. 2697*69606e3fSchristos 2698*69606e3fSchristos2000-07-05 Paul D. Smith <psmith@gnu.org> 2699*69606e3fSchristos 2700*69606e3fSchristos * variable.c (lookup_variable) [VMS]: Remove vestigial references 2701*69606e3fSchristos to listp. Fixes PR/1793. 2702*69606e3fSchristos 2703*69606e3fSchristos2000-06-26 Paul Eggert <eggert@twinsun.com> 2704*69606e3fSchristos 2705*69606e3fSchristos * Makefile.am (MAINTAINERCLEANFILES): New macro, with stamp-pot in it. 2706*69606e3fSchristos 2707*69606e3fSchristos * dir.c (vms_hash): Ensure ctype macro args are nonnegative. 2708*69606e3fSchristos 2709*69606e3fSchristos * remake.c (f_mtime): Remove unused var memtime. 2710*69606e3fSchristos 2711*69606e3fSchristos2000-06-25 Martin Buchholz <martin@xemacs.org> 2712*69606e3fSchristos 2713*69606e3fSchristos * make.texinfo, NEWS, TODO.private: Minor spelling corrections. 2714*69606e3fSchristos Ran spell-check on make.texinfo. 2715*69606e3fSchristos 2716*69606e3fSchristos2000-06-23 Paul D. Smith <psmith@gnu.org> 2717*69606e3fSchristos 2718*69606e3fSchristos * main.c (main): Replace EXIT_SUCCESS, EXIT_FAILURE, and 2719*69606e3fSchristos EXIT_TROUBLE with MAKE_SUCCESS, MAKE_FAILURE, and MAKE_TROUBLE. 2720*69606e3fSchristos * make.h: Define these macros. 2721*69606e3fSchristos 2722*69606e3fSchristos * Version 3.79.1 released. 2723*69606e3fSchristos 2724*69606e3fSchristos * configure.in: Add a new option, --disable-nsec-timestamps, to 2725*69606e3fSchristos avoid using sub-second timestamps on systems that support it. It 2726*69606e3fSchristos can lead to problems, e.g. if your makefile relies on "cp -p". 2727*69606e3fSchristos * README.template: Document the issue with "cp -p". 2728*69606e3fSchristos 2729*69606e3fSchristos * config.guess, config.sub: Updated. 2730*69606e3fSchristos 2731*69606e3fSchristos 2732*69606e3fSchristos 2733*69606e3fSchristosSee ChangeLog.2, available in the CVS repository at: 2734*69606e3fSchristos 2735*69606e3fSchristos http://savannah.gnu.org/cvs/?group=make 2736*69606e3fSchristos 2737*69606e3fSchristosfor earlier changes. 2738*69606e3fSchristos 2739*69606e3fSchristos 2740*69606e3fSchristosCopyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software 2741*69606e3fSchristosFoundation, Inc. 2742*69606e3fSchristosThis file is part of GNU Make. 2743*69606e3fSchristos 2744*69606e3fSchristosGNU Make is free software; you can redistribute it and/or modify it under the 2745*69606e3fSchristosterms of the GNU General Public License as published by the Free Software 2746*69606e3fSchristosFoundation; either version 2, or (at your option) any later version. 2747*69606e3fSchristos 2748*69606e3fSchristosGNU Make is distributed in the hope that it will be useful, but WITHOUT ANY 2749*69606e3fSchristosWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 2750*69606e3fSchristosA PARTICULAR PURPOSE. See the GNU General Public License for more details. 2751*69606e3fSchristos 2752*69606e3fSchristosYou should have received a copy of the GNU General Public License along with 2753*69606e3fSchristosGNU Make; see the file COPYING. If not, write to the Free Software 2754*69606e3fSchristosFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2755