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