-
Notifications
You must be signed in to change notification settings - Fork 84
/
ChangeLog.3
5633 lines (4188 loc) · 210 KB
/
ChangeLog.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2013-10-09 Paul Smith <[email protected]>
Version 4.0 released.
* configure.ac: Updated for the release.
* NEWS: Updated for the release.
* maintMakefile (tag-release): New target to add a Git tag.
* read.c (eval): Typo fix.
* ChangeLog.1: Typo fixes.
* w32/subproc/sub_proc.c (process_cleanup): Typo fix.
2013-10-07 Eli Zaretskii <[email protected]>
* w32/compat/posixfcn.c (tmpfile): Move declaration of h before
the first executable statement. Reported by Gisle Vanem
2013-10-05 Paul Smith <[email protected]>
* makeint.h (MAP_USERFUNC): A new map type for function names.
* main.c (initialize_stopchar_map): Set up the function name map.
* gnumake.h (gmk_func_ptr): Define a type for function pointers.
(gmk_add_function): Convert the last argument to FLAGS.
(GMK_FUNC_*): Define flags for the function. Change the default
behavior to "expand" since that's the most common one.
* function.c (function_table_entry): Use new function pointer type.
(lookup_function): Accept any valid function name character based
on the MAP_USERFUNC values.
(define_new_function): Use the new calling signature. Verify that
registered functions have valid names.
* guile.c (guile_gmake_setup): Use new calling signatures.
* loadapi.c (gmk_add_function): Ditto.
* variable.h (define_new_function): Ditto.
* doc/make.texi (Loaded Object API): Make the registered function
API documentation more clear.
2013-10-03 Eli Zaretskii <[email protected]>
* function.c (abspath): Reset root_len to one for Cygwin only when
HAVE_DOS_PATHS is defined. Suggested by Christopher Faylor.
2013-10-02 Eli Zaretskii <[email protected]>
* w32/compat/posixfcn.c (tmpfile): New function, a replacement for
the Windows libc version.
Fix $abspath on Cygwin when HAVE_DOS_PATHS is in effect.
* function.c (IS_ABSOLUTE) [__CYGWIN__]: Special definition for
Cygwin.
(abspath) [__CYGWIN__]: Reset root_len to 1 if the absolute file
name has the Posix /foo/bar form.
[HAVE_DOS_PATHS]: Use root_len instead of hard-coded 2.
2013-10-01 Paul Smith <[email protected]>
* configure.ac: Update version to 3.99.93.
* NEWS: Ditto.
2013-09-30 Paul Smith <[email protected]>
* guile.c: Portability fixes for Guile 1.8.
2013-09-29 Paul Smith <[email protected]>
* output.c (output_dump): Always write Enter/Leave messages to stdio.
(log_working_directory): This now always writes to stdio, so we
don't need the struct output parameter anymore.
(output_start): Show the working directory when output_sync is not
set or is recursive.
* main.c (main): Ensure the special "already shown Enter message"
token is removed from MAKE_RESTARTS before the user can see it.
* function.c (func_shell_base): If the output_context stderr
exists but is invalid, write to the real stderr.
Fixes suggested by Frank Heckenbach <[email protected]>.
* output.c: Guard unistd.h inclusion, add io.h.
* gnumake.h: Move GMK_EXPORT before the declarations.
* make_msvc_net2003.vcproj: Add missing files.
Changes for MSVC suggested by Gerte Hoogewerf <[email protected]>
* function.c (func_shell_base) [EMX]: Fix EMX support for output-sync.
* job.c (child_execute_job) [EMX]: Ditto.
* job.h (child_execute_job) [EMX]: Ditto.
* w32/compat/posixfcn.c: Invert the test for NO_OUTPUT_SYNC.
* guile.c (GSUBR_TYPE): Pre-2.0 Guile doesn't provide a typedef
for gsubr pointers. Create one.
(guile_define_module): Use it.
(internal_guile_eval): Force UTF-8 encoding for Guile strings.
* main.c (main): Clear GNUMAKEFLAGS after parsing, to avoid
proliferation of options.
* NEWS: Document it.
* doc/make.texi (Options/Recursion): Ditto.
2013-09-23 Eli Zaretskii <[email protected]>
* w32/compat/posixfcn.c: Fix the forgotten OUTPUT_SYNC conditional.
* job.h: Ditto, but in a comment.
2013-09-22 Paul Smith <[email protected]>
* configure.ac: Update version to 3.99.92.
* NEWS: Ditto.
* implicit.c (pattern_search): After second expansion be sure to
handle order-only markers inside the expansion properly.
Fixes Savannah bug #31155.
* guile.c (guile_define_module): Technically a void* cannot
contain a pointer-to-function and some compilers warn about this.
Cast the function pointers.
* load.c (load_object): Ditto.
* read.c (eval): If load_file() returns -1, don't add this to the
"to be rebuilt" list.
* doc/make.texi (load Directive): Document it.
* guile.c (guile_gmake_setup): Don't initialize Guile so early.
(func_guile): Lazily initialize Guile the first time the $(guile ..)
function is invoked. Guile can steal file descriptors which
confuses our jobserver FD checking, so we don't want to initialize
it before we have to.
VMS port updates by Hartmut Becker <[email protected]>
* makefile.com: Add output to the filelist.
* output.c (va_copy): Add an implementation of this macro for VMS.
* commands.c: Ensure filedef.h is #included before dep.h.
* dir.c: Ditto.
* file.c: Ditto.
* guile.c: Ditto.
* main.c: Ditto.
* misc.c: Ditto.
* read.c: Ditto.
* rule.c: Ditto.
* variable.c: Ditto.
* readme.vms: Renamed to README.VMS and updates for this release.
* Makefile.am: Ditto.
* NEWS: Ditto.
* README.template: Ditto.
* Makefile.DOS.template: Ditto.
2013-09-21 Paul Smith <[email protected]>
* maintMakefile (check-alt-config): Create a target to test
alternative configurations. Each one will build make with a
different configuration then run the test suite.
Invert the output-sync #define to NO_OUTPUT_SYNC
* configure.ac: Don't set OUTPUT_SYNC.
* makeint.h: Ditto.
* main.c: Use NO_OUTPUT_SYNC instead of OUTPUT_SYNC.
* output.c: Ditto.
* output.h: Ditto.
* job.h: Ditto.
* job.c: Ditto.
* config.ami.template: Set NO_OUTPUT_SYNC.
* config.h-vms.template: Ditto.
* config.h.W32.template: Ditto.
* configh.dos.template: Ditto.
Output generated while reading makefiles should be synced.
* main.c (make_sync): Define a context for syncing while reading
makefiles and other top-level operations.
(main): If we request syncing, enable it while we are parsing
options, reading makefiles, etc. to capture that output. Just
before we start to run rules, dump the output if any.
(die): Dump any output we've been syncing before we die
* output.h (OUTPUT_SET): Disable output_context if not syncout.
Stderr generated from shell functions in recipes should be synced.
* job.h (FD_STDIN, FD_STDOUT, FD_STDERR): Create new macros to
avoid magic numbers.
(child_execute_job): Take a FD for stderr.
* job.c (child_execute_job): Handle STDERR FD's in addition to
stdin and stdout.
(start_job_command): Call child_execute_job() with the new STDERR
parameter. Instead of performing the dup() here, send it to
child_execute_job() where it's already being done.
* function.c (func_shell_base): Pass the OUTPUT_CONTEXT stderr to
child_execute_job() if it's set, otherwise FD_STDERR.
* main.c (main): Pass FD_STDERR to child_execute_job().
2013-09-19 Paul Smith <[email protected]>
* main.c (main): Set MAKE_RESTARTS to negative before re-exec if
we've already generated an "Entering" message. If we are started
and notice that MAKE_RESTARTS is negative, assume we already wrote
"Entering" and don't write it again.
2013-09-18 Paul Smith <[email protected]>
* main.c (main): Set starting_directory before we write any
errors. Fixes Savannah bug #40043.
2013-09-16 Eli Zaretskii <[email protected]>
* output.c [WINDOWS32]: Include windows.h and sub_proc.h, to avoid
compiler warnings for CLOSE_ON_EXEC.
2013-09-16 Paul Smith <[email protected]>
* configure.ac: Update version to 3.99.91.
* NEWS: Ditto.
2013-09-15 Paul Smith <[email protected]>
* doc/make.texi (Error Messages): Add a bit more info to the
section on static pattern errors, since they're common.
Fixes Savannah bug #31326.
* read.c (eval_makefile): If the file open fails with an
unrecoverable error, stop now rather than trying to make it.
Fixes Savannah bug #27374.
* main.c (main): Perform the validation of the jobserver FDs
early, before we read makefiles, to ensure that something hasn't
opened and used those FDs for some other reason.
Fixes Savannah bug #39934.
* main.c (main): Don't set MAKEFLAGS in the environment when we
restart. We have the original command line flags so keep the
original MAKEFLAGS settings as well.
Fixes Savannah bug #39203.
2013-09-14 Paul Smith <[email protected]>
* main.c (decode_debug_flags): Add support for the "n" flag to
disable all debugging.
* make.1: Document the "n" (none) flag.
* doc/make.texi (Options Summary): Ditto.
* NEWS: Ditto.
Fixes Savannah bug #35248.
* misc.c (close_stdout): Move to output.c.
* main.c (main): Move atexit call to output_init().
* makeint.h: Remove close_stdout() declaration.
* output.c (output_init): Add close_stdout at exit only if it's open.
Fixes Savannah bug #33134. Suggested by David Boyce <[email protected]>.
2013-09-14 Paul Smith <[email protected]>
* misc.c (set_append_mode, open_tmpfd, open_tmpfile): Move to output.c.
* misc.h: Ditto.
* output.h: Ditto.
* main.c (main): Move stdio init into output.c:output_init().
Change open_tmpfile() to output_tmpfile().
* output.c: Rename open_*() to output_*(). set_append_mode() and
open_tmpfd() are static.
(_outputs, log_working_directory): Accept a struct output and
print to that rather than the global context.
(output_dump): In recurse mode print enter/leave once for the
whole makefile.
(output_init): Initialize this processes stdio as well as child's.
* vmsjobs.c: Reformat to be closer to convention.
2013-09-12 Paul Smith <[email protected]>
Rework output to handle synchronization and directory logging more
reliably.
* output.c: New file. Implement lazy synchronization and
directory logging so that we manage them "just in time", and the
destination of the output is set via a global state variable.
* output.h: New file.
* function.c (func_shell_base): Ensure the output is set up before
running a shell command, in case it writes to stderr.
(func_error): Use outputs() to generate output.
* job.h (struct child): Add struct output to track the child's output.
* job.c: Use struct output in the child structure to track output.
(child_out, sync_init, assign_child_tempfiles, pump_from_tmp)
(acquire_semaphore, release_semaphore, sync_output): Move most of
the output_sync handling to output.c.
(child_error): Set output, then use simple message() and error()
not _s versions.
* main.c (log_working_directory): Moved to output.c
(trace_option, decode_trace_flags) Remove. Remove support for
different trace modes; we don't use it anymore.
(die) Invoke output_close() before we exit.
* misc.c (message_s, error_s): Removed; no longer needed.
(message, error, fatal, perror_with_name, pfatal_with_name): Moved
to output.c.
* makeint.h: Remove message_s(), error_s(), and
log_working_directory(). Remove the TRACE_* macros.
* doc/make.texi: Enhance documentation for output sync, and remove
MODE assignment for --trace.
* make.1: Remove MODE assignment for --trace.
* Makefile.am: Add new files.
* NMakefile.template: Ditto.
* SMakefile.template: Ditto.
* build_w32.bat: Ditto.
* dosbuild.bat: Ditto.
* make.lnk: Ditto.
* make_nsvc_net2003.vcproj: Ditto.
* makefile.vms: Ditto.
* po/POTFILES.in: Ditto.
2013-08-22 Petr Machata <[email protected]>
* function.c (func_shell_base): Get rid of any avoidable limit on
stack size for processes spawned via $(shell).
2013-07-22 Paul Smith <[email protected]>
* implicit.c (pattern_search): Use PARSE_SIMPLE_SEQ() even for
non-second expansion prerequisites, to handle globbing in patterns.
Fixes Savannah bug #39310.
* dep.h (PARSE_SIMPLE_SEQ): Macro for simple file sequence parsing.
* default.c (set_default_suffixes): Use it.
* file.c (split_prereqs): Ditto.
* main.c (main): Ditto.
* read.c (eval): Ditto.
* rule.c (install_pattern_rule): Ditto.
* file.c (split_prereqs): Use PARSEFS_NONE instead of 0.
2013-07-21 Paul Smith <[email protected]>
Cleanups detected by cppcheck. Fixes Savannah bug #39158.
* arscan.c (ar_scan): Reduce the scope of local variables.
* dir.c (vms_hash): Ditto.
(find_directory): Ditto.
(file_impossible_p): Ditto.
* expand.c (variable_expand_string): Ditto.
* function.c (func_sort): Ditto.
(func_and): Ditto.
* job.c (reap_children): Ditto.
(exec_command): Ditto.
* main.c (main): Ditto.
* misc.c (collapse_continuations): Ditto.
* read.c (eval): Ditto.
(parse_file_seq): Ditto.
* vpath.c (gpath_search): Ditto.
(selective_vpath_search): Ditto.
* job.c (is_bourne_compatible_shell): Simplify for non-Windows systems.
* remake.c (f_mtime): Remove duplicate test.
* signame.c (strsignal): Fix bogus conditional.
* job.c (assign_child_tempfiles): Assign OUTFD to -1 for safety.
(start_job_command): Don't test output_sync and sync_cmd: redundant.
Changes suggested by Frank Heckenbach <[email protected]>.
2013-07-14 Paul Smith <[email protected]>
* filedef.h (update_status): Convert UPDATE_STATUS from a char to
an enumeration. Some systems declare "char" to be "unsigned"
which broke the code (which expected to be able to use -1 as a
flag). Using magic values was unpleasant, so rather than just
force "signed char" I reworked it to use an enum.
* dep.h (update_goal_chain): Return an update_status value not int.
* remake.c (touch_file): Ditto.
(update_goal_chain): Track the update_status enum.
* file.c (enter_file): Use new enumeration values with update_status.
(remove_intermediates): Ditto.
(print_file): Ditto.
* commands.c (execute_file_commands): Ditto.
* job.c (reap_children): Ditto.
(start_job_command): Ditto.
(start_waiting_job): Ditto.
* main.c (main): Ditto.
* remake.c (update_file): Ditto.
(complain): Ditto.
(update_file_1): Ditto.
(notice_finished_file): Ditto.
(remake_file): Ditto.
* vmsjobs.c (vmsHandleChildTerm): Ditto.
2013-07-09 Paul Smith <[email protected]>
* implicit.c (pattern_search): Keep a local copy of the number of
deps in deplist: the global max might change due to recursion.
Fixes a bug reported by Martin d'Anjou <[email protected]>.
2013-06-28 Paul Smith <[email protected]>
* misc.c (set_append_mode): Set the O_APPEND flag on a file descriptor.
(open_tmpfd): Set append mode on the temporary file descriptor.
* main.c (main): Set append mode on stdout and stderr.
* makeint.h (set_append_mode): Declare it.
2013-06-22 Eli Zaretskii <[email protected]>
* build_w32.bat (LinkGCC): Prevent a comment from being displayed
at build time.
* job.c (construct_command_argv_internal) [WINDOWS32]: Use
case-insensitive comparison with internal commands of non-Unix
shells.
* main.c (find_and_set_default_shell): Don't use file_exists_p or
dir_file_exists_p, as those call readdir, which can fail if PATH
includes directories with non-ASCII characters, and that would
cause Make to fail at startup with confusing diagnostics. See
https://sourceforge.net/mailarchive/message.php?msg_id=30846737
for the details.
2013-06-22 Paul Smith <[email protected]>
Improve performance by using a character map to determine where we
want to stop searching strings, rather than discrete comparisons.
* read.c (find_char_unquote): Pass a stop map instead of various
flags and use that to check when to stop parsing the string.
(eval): Use the new find_char_unquote() calling signature.
(remove_comments): Ditto.
(unescape_char): Ditto.
(find_percent_cached): Ditto.
(parse_file_seq): Use a stop-map flag.
* main.c (stopchar_map): Character map definition.
(initialize_stopchar_map): Initialize the map definition.
(main): Invoke the map initialization function.
* misc.c (end_of_token_w32): Remove unused function.
* dir.c (dosify): Use STOP_SET to check for stop chars.
* main.c (main): Ditto.
* misc.c (end_of_token): Ditto.
* function.c (subst_expand): Ditto.
(func_notdir_suffix): Ditto.
(func_basename_dir): Ditto.
(abspath): Ditto.
* job.c (is_bourne_compatible_shell): Ditto.
* variable.c (parse_variable_definition): Ditto.
* read.c (eval): Ditto.
(conditional_line): Ditto.
(find_percent_cached): Ditto.
* dep.h (PARSE_FILE_SEQ): Update function declaration.
* default.c (set_default_suffixes): Update PARSE_FILE_SEQ() call.
* file.c (split_prereqs): Ditto.
* function.c (string_glob): Ditto.
* implicit.c (pattern_search): Ditto.
* rule.c (install_pattern_rule): Ditto.
* main.c (main): Ditto.
2013-06-21 Paul Smith <[email protected]>
* main.c (verify_flag): Global variable to determine whether to
verify the database or not.
(decode_debug_flags): If debug mode, enable verify_flag.
(main): If MAKE_MAINTAINER_MODE, enable verify_flag, otherwise not.
(die): Only verify the database if verify_flag is set.
* file.c (enter_file): Don't check caching unless verify_flag.
* makeint.h: Export verify_flag.
2013-05-27 Paul Smith <[email protected]>
* variable.c (define_automatic_variables): Create a new variable
MAKE_HOST.
2013-05-27 Hartmut Becker <[email protected]>
* function.c (func_shell_base) [VMS]: Support VMS.
* makefile.com [VMS]: Ditto.
* makefile.vms [VMS]: Ditto.
* makeint.h [VMS]: Ditto.
* vmsjobs.c [VMS]: Ditto.
* job.h: Define RECORD_SYNC_MUTEX() when OUTPUT_SYNC is not set.
* load.c (unload_file): Fix signature if MAKE_LOAD is not set.
2013-05-26 Paul Smith <[email protected]>
* remake.c (f_mtime): Ensure that archive file names are in the
string cache. Fixes Savannah bug #38442.
* read.c (readline): To be safe, move the entire buffer if we
detect a CR. Fixes Savannah bug #38945.
* job.c (new_job): Compare OUT to the beginning of the OUT
var/function, not IN. Fixes Savannah bug #39035.
2013-05-22 Paul Smith <[email protected]>
* main.c (switches[]): Order switches so simple flags all come first.
(define_makeflags): Rework to make option passing more
reliable and the code less tricksy. Ensure simple flags are kept
in the initial batch of flags. Do not allow any flags with
options in that batch. If there are only non-simple flags MAKEFLAGS
begins with ' '.
(print_data_base): Print the version. Fixes part of Savannah #35336.
* read.c (eval_buffer): Initialize lineno.
2013-05-18 Alexey Pavlov <[email protected]> (tiny change)
* w32/Makefile.am (libw32_a_SOURCES): Add compat/posixfcn.c.
* configure.ac (OUTPUT_SYNC): Define for mingw32 target.
* job.c (construct_command_argv_internal) <sh_cmds_dos>
[WINDOWS32]: Add "move". Fixes Savannah bug #30714.
* guile.c: Move inclusion of makeint.h before gnumake.h. This
order must be observed when building Make, because gnumake.h must
be included with GMK_BUILDING_MAKE defined, which makeint.h
already does. Otherwise, the linker will look for, and fail to
find, gmk_* functions in some external dynamic library.
2013-05-17 Benno Schulenberg <[email protected]>
* main.c (decode_output_sync_flags): Fix output message.
* read.c (EXTRANEOUS): Ditto.
(record_files): Ditto.
* remake.c (update_file_1): Ditto.
2013-05-17 Eli Zaretskii <[email protected]>
* main.c (prepare_mutex_handle_string): Define conditioned on
OUTPUT_SYNC.
* build_w32.bat: Copy config.h.W32 to config.h regardless of
whether or not we are building from SCM.
2013-05-17 Paul Smith <[email protected]>
* configure.ac: Update version to 3.99.90.
* NEWS: Ditto.
* Source (*.[ch]): Remove TABs, use GNU coding styles.
* ALL: Update copyright.
* hash.c (CALLOC): Use xcalloc() to handle out of memory errors.
* makeint.h: Prototype new unload_file() function.
* load.c (unload_file): Create a function to unload a file.
(struct load_list): Type to remember loaded objects.
(loaded_syms): Global variable of remembered loaded objects so we
can unload them later. We don't have to remove from the list
because the only time we unload is if we're about to re-exec.
(load_object): Remove unneeded extra DLP argument.
(load_file): Remove unneeded extra DLP argument.
* filedef.h (struct file): Remove the DLP pointer and add the
LOADED bit flag. Saves 32/64 bytes per file, as this pointer is
almost never needed.
* read.c (eval): Set the new LOADED bit flag on the file.
* file.c (rehash_file): Merge the loaded bitfield.
* commands.c (execute_file_commands): Call unload_file() instead
of dlclose() directly.
2013-05-14 Paul Smith <[email protected]>
* doc/make.texi (Loaded Object API): Document the requirement for
the plugin_is_GPL_compatible symbol.
* load.c (load_object): Check for plugin_is_GPL_compatible symbol.
2013-05-13 Paul Smith <[email protected]>
* filedef.h (struct file): Add a builtin flag.
* file.c (enter_file): Unset the builtin flag.
(rehash_file): Ditto.
(print_file): Don't print builtin files if we've omitted them.
* default.c (undefine_default_variables): New function: go through
the default variables and undefine them.
(set_default_suffixes): Mark these suffix rules as builtin.
* makeint.h: Prototype.
* main.c (main): Handle addition of -r and -R to MAKEFLAGS in the
makefile. Fixes Savannah bug #20501.
* main.c (define_makeflags): Assign o_env_override level to
MAKEFLAGS to ensure it's set even in the presence of -e.
Fixes Savannah bug #2216.
* makeint.h (TRACE_NONE, TRACE_RULE, TRACE_DIRECTORY): Define
constants for the trace mode.
* main.c: Add new --trace mode parsing.
(decode_trace_flags): New function.
(decode_switches): Call it.
(define_makeflags): Fix a bug with long-name options.
* misc.c (fatal): Remove special output-sync handling.
* make.1: Document new --trace mode flags.
* doc/make.texi (Options Summary): Ditto.
2013-05-11 Eli Zaretskii <[email protected]>
* job.c (child_out): Output the newline following the message
before fllush-ing the stream. Avoids displaying the following
failure message, which goes to stderr, on the same line.
2013-05-06 Eli Zaretskii <[email protected]>
* gnumake.h (GMK_EXPORT) [_WIN32]: Move the dllexport declaration
here from makeint.h.
* makeint.h (GMK_BUILDING_MAKE) [WINDOWS32]: Define before
including gnumake.h.
* doc/make.texi (Loaded Object Example): Add a note about building
shared objects on MS-Windows.
2013-05-05 Paul Smith <[email protected]>
* makeint.h (OUTPUT_SYNC_LINE, OUTPUT_SYNC_RECURSE): Rename
output-sync options "job" to "line" and "make" to "recurse".
* main.c (decode_output_sync_flags): Ditto.
* job.c (reap_children): Ditto.
(start_job_command): Ditto.
* make.1: Ditto.
* doc/make.texi (Parallel Output): Ditto.
* job.c (child_out): Write newlines explicitly, and don't do
anything if the message is empty.
(sync_output): Put working dir messages around stdout AND stderr.
(start_job_command): Move the tmp file assignment earlier. After
we do it, write the command line to the temp file to get the order
correct.
* misc.c (message): Remove special handling for output_sync.
(error): Ditto.
2013-05-04 Paul Smith <[email protected]>
* loadapi.c (gmk_alloc): New function.
* gnumake.h: Add gmk_alloc(). Clean GMK_EXPORT a bit to avoid MAIN.
* makeint.h (GMK_EXPORT): New handling, vs. MAIN.
* doc/make.texi (Loaded Object API): Add information on the memory
handling functions.
(Loaded Object Example): Create an example.
* job.c (pump_from_tmp): (Rename) Write to stdout/stderr using
FILE* rather than fd. It's not a good idea to mix and match.
2013-05-04 Eli Zaretskii <[email protected]>
* makeint.h (ftruncate) [_MSC_VER]: Redirect to _chsize.
(_S_ISDIR): If not defined (MinGW64), define to S_ISDIR.
2013-05-04 Paul Smith <[email protected]>
* job.c (child_out): Handle EINTR and incomplete write scenarios.
(sync_init): New function: separate the initialization code.
(assign_child_tempfiles): Remove truncation from this function,
(sync_output): and add it here after output is generated.
(reap_children): Always call sync_output() in case output_sync was
reset after the child started, due to error.
(start_job_command): Create new sync_cmd variable. Use new method
for initializing the handle.
If we're not syncing the output be sure any output we've saved is
dumped immediately before starting the child.
2013-05-04 Eli Zaretskii <[email protected]>
* job.c (start_job_command): Make the condition for creating a
temporary output file be identical to the Posix code branch.
Suggested by Frank Heckenbach <[email protected]>.
2013-05-03 Eli Zaretskii <[email protected]>
* w32/subproc/sub_proc.c: Include makeint.h. Remove a private
incompatible prototype of xmalloc.
(batch_file_with_spaces): New function, detects Windows batch
files whose names include whitespace characters.
(process_begin): If exec_name is a batch file with whitespace
characters in its name, pass NULL as the first argument to
CreateProcess. This avoids weird failures due to buggy quoting by
CreateProcess. For the details, see the discussion starting at
https://lists.gnu.org/archive/html/make-w32/2013-04/msg00008.html.
* load.c (load_object, load_file): Accept an additional argument
DLP and return in it a pointer that can be used to unload the
dynamic object.
* read.c (eval): Call load_file with an additional argument, and
record the pointer returned there in the 'struct file' object of
dynamic objects in that object's 'struct file'.
* commands.c (execute_file_commands): Unload dynamic objects
before remaking them, to avoid failure to remake if the OS doesn't
allow overwriting objects that are in use.
* filedef.h (struct file): New member dlopen_ptr.
* gnumake.h (GMK_EXPORT): Define to dllexport/dllimport
decorations for Windows and to nothing on other platforms.
(gmk_eval, gmk_expand, gmk_add_function): Add GMK_EXPORT qualifier
to prototypes.
* makeint.h (MAIN): Define before including gnumake.h, to give
correct dllexport decorations to exported functions.
(load_file): Adjust prototype.
* loadapi.c: Don't include gnumake.h, since makeint.h already
includes it, and takes care of defining MAIN before doing so.
* build_w32.bat (LinkGCC): Produce an import library for functions
exported by Make for loadable dynamic objects.
* w32/compat/posixfcn.c (dlclose): New function.
* w32/include/dlfcn.h (dlclose): Add prototype.
2013-05-01 Eli Zaretskii <[email protected]>
* job.c (start_job_command) [WINDOWS32]: Make the same fix for
MS-Windows as the previous commit did for Posix platforms.
(construct_command_argv_internal): Don't treat a backslash as an
escape character before whitespace, if the shell is not a Posix
shell. For the description of the problem, see
https://lists.gnu.org/archive/html/make-w32/2013-04/msg00014.html.
2013-05-01 Paul Smith <[email protected]>
* job.c (start_job_command): Don't redirect output for recursive
make jobs, unless we're in makefile synchronization mode.
2013-04-30 Stefano Lattarini <[email protected]> (tiny change)
build: enable the 'silent-rules' automake options
* configure.ac (AM_INIT_AUTOMAKE): Here. The future major Automake
version 2.0 (ETA about one, one and half year from now) will enable
it by default, so better prepare ourselves.
2013-04-30 Stefano Lattarini <[email protected]> (tiny change)
build: require Autoconf >= 2.62 and Automake >= 1.11.1
Older versions of those tools should be considered fully obsolete.
Also, GNU make already requires Gettext >= 0.18.1, which has been
released six months after Automake 1.11.1 and two years after
Autoconf 2.62; so the new requirement shouldn't be problematic
for people already bootstrapping GNU make from the Git repository.
* configure.ac (AC_PREREQ): Require Autoconf 2.62 or later.
(AM_INIT_AUTOMAKE): Require Automake 1.11.1 or later (1.11 had
some serious bugs, and should not be used).
2013-04-30 Stefano Lattarini <[email protected]> (tiny change)
build: get rid of 'HAVE_ANSI_COMPILER' C preprocessor conditional
GNU make already assume C89 or later throughout the codebase, and
that preprocessor conditional was no longer used anyway.
* configure.ac: Remove AC_DEFINE of HAVE_ANSI_COMPILER.
* config.ami.template: Remove #define of HAVE_ANSI_COMPILER.
* config.h-vms.template: Likewise.
* config.h.W32.template: Likewise.
* configh.dos.template: Likewise.
2013-04-30 Stefano Lattarini <[email protected]> (tiny change)
cosmetics: fix few innocuous typos
Most of these were found using Lucas De Marchi's 'codespell' tool.
* ChangeLog: Fix minor typos.
* ChangeLog.2: Likewise.
* README.Amiga: Likewise.
* TODO.private: Likewise.
* function.c: Likewise.
* glob/glob.h: Likewise.
* job.c: Likewise.
* main.c: Likewise.
* readme.vms: Likewise.
* remake.c: Likewise.
* tests/ChangeLog: Likewise.
* tests/NEWS: Likewise.
* tests/README: Likewise.
* tests/scripts/variables/private: Likewise.
* vmsdir.h: Likewise.
* signame.c: Likewise. While at it, improve line wrapping in the
touched comment.
2013-04-29 Eli Zaretskii <[email protected]>
* w32/include/dlfcn.h: New file.
* w32/compat/posixfcn.c: Include dlfcn.h.
(dlopen, dlerror, dlsym) [MAKE_LOAD]: New functions, in support of
dynamic loading.
* config.h.W32.template (MAKE_LOAD): Define.
* load.c (load_object) [HAVE_DOS_PATHS]: Support backslashes and
drive letters in file names of dynamic objects.
* job.c (construct_command_argv_internal) [WINDOWS32]: Return
right after generating new_argv for one_shell case. This fixes
the Windows build for both Unixy shell and stock Windows shells.
2013-04-28 Eli Zaretskii <[email protected]>
* dir.c (local_stat) [WINDOWS32]: Use the wrapper on MS-Windows.
If the argument ends in "dir/.", make sure the parent dir exists
and is indeed a directory. Fixes Savannah bug #37065.
2013-04-28 Paul Smith <[email protected]>
* makeint.h (message_s, error_s): Functions that print to strings
rather than directly to files.
* misc.c (message_s, error_s): Create them.
* job.c (child_error): Print error messages to the output sync
logs, if one exists, rather then directly to the terminal.
(reap_children): Move the per-line sync after child_error().
* configure.ac: Remove support for pre-ANSI variadic function calls.
* makeint.h: Ditto.
* misc.c: Ditto.
* config.ami.template: Ditto.
* config.h-vms.template: Ditto.
* config.h.W32.template: Ditto.
* configh.dos.template: Ditto.
Implement a "per-job" output synchronization option.
* main.c (decode_output_sync_flags): Recognize the new option.
* makeint.h (OUTPUT_SYNC_JOB): Add new values for "job"
* job.c (assign_child_tempfiles): In per-job mode, truncate the
temp file for re-use by the next job.
(sync_output): Don't close the temp files as we may still use them.
(free_child): Close the temp files here as we definitely don't
need them.
(new_job): In per-job output mode, sync_output() after each job.
* job.h (struct child): Avoid ifdefs.
* make.1: Add new options to the man page.
* doc/make.texi (Parallel Output): Break documentation on input
and output into separate sections for readability. Document the
new "job" and "none" modes.
2013-04-27 Paul Smith <[email protected]>
* job.c (construct_command_argv_internal): Fix oneshell support
for non-POSIX-sh shells.
* load.c (load_object): Extract all POSIX-isms into a separate
function for portability.
(load_file): Check the .LOADED variable first and don't invoke
load_object() if it's already been loaded.
2013-04-27 Eli Zaretskii <[email protected]>
* read.c (record_files): Pay attention to .ONESHELL in MS-Windows.
* job.c (construct_command_argv_internal): Support .ONESHELL on
MS-Windows, when the shell is not a Unixy shell.
2013-04-27 Eli Zaretskii <[email protected]>
* job.c: Fix compilation error on GNU/Linux due to "label at end
of compound statement".
2013-04-27 Frank Heckenbach <[email protected]> (tiny change)
* job.c (sync_output): Don't discard the output if
acquire_semaphore fails; instead, dump the output unsynchronized.
2013-04-27 Eli Zaretskii <[email protected]>
Support --output-sync on MS-Windows.
* w32/compat/posixfcn.c: New file, with emulations of Posix
functions and Posix functionality for MS-Windows.
* w32/subproc/sub_proc.c: Include io.h.
(process_noinherit): New function, forces a file descriptor to not
be inherited by child processes.
(process_easy): Accept two additional arguments, and use them to
set up the standard output and standard error handles of the child
process.
* w32/include/sub_proc.h (process_easy): Adjust prototype.
(process_noinherit): Add prototype.
* read.c [WINDOWS32]: Include windows.h and sub_proc.h.
* makeint.h (LOCALEDIR) [WINDOWS32}: Define to NULL if not
defined. This is needed because the MS-Windows build doesn't have
a canonical place for LOCALEDIR.
(WIN32_LEAN_AND_MEAN) [WINDOWS32]: Define, to avoid getting from
windows.h header too much stuff that could conflict with the code.
* main.c <sync_mutex>: New static variable.
<switches>: Add support for "--sync-mutex" switch.
(decode_output_sync_flags): Decode the --sync-mutex= switch.
(prepare_mutex_handle_string) [WINDOWS32]: New function.
(main): Add "output-sync" to .FEATURES.
* job.h (CLOSE_ON_EXEC) [WINDOWS32]: Define to call
process_noinherit.
(F_GETFD, F_SETLKW, F_WRLCK, F_UNLCK, struct flock) [WINDOWS32]:
New macros.
(RECORD_SYNC_MUTEX): New macro, a no-op for Posix platforms.
(sync_handle_t): New typedef.
* job.c <sync_handle>: Change type to sync_handle_t.
(FD_NOT_EMPTY): Seek to the file's end. Suggested by Frank
Heckenbach <[email protected]>.
(pump_from_tmp_fd) [WINDOWS32]: Switch to_fd to binary mode for
the duration of this function, and then change back before
returning.
(start_job_command) [WINDOWS32]: Support output_sync mode on
MS-Windows. Use a system-wide mutex instead of locking
stdout/stderr. Call process_easy with two additional arguments:
child->outfd and child->errfd.
(exec_command) [WINDOWS32]: Pass two additional arguments, both
-1, to process_easy, to adjust for the changed function signature.
* function.c (windows32_openpipe) [WINDOWS32]: This function now
returns an int, which is -1 if it fails and zero otherwise. It
also calls 'error' instead of 'fatal', to avoid exiting
prematurely.
(func_shell_base) [WINDOWS32]: Call perror_with_name if
windows32_openpipe fails, now that it always returns. This avoids
a compiler warning that error_prefix is not used in the MS-Windows
build.
* config.h.W32.template (OUTPUT_SYNC): Define.
* build_w32.bat: Add w32/compat/posixfcn.c to compilation and
linking commands.
2013-04-20 Stefano Lattarini <[email protected]> (tiny change)
* README.git: Our autoconf input file is 'configure.ac', not
'configure.in'. Adjust accordingly.
* build_w32.bat: Likewise.
* config.h-vms.template: Likewise.
* Makefile.DOS.template: Likewise.
2013-04-16 Paul Smith <[email protected]>
* misc.c (open_tmpfd): Add a new function that returns a temporary
file by file descriptor.
(open_tmpfile): Move here from main.c.
* job.c (assign_child_tempfiles): Use the new open_tmpfd().
2013-04-15 Paul Smith <[email protected]>
* makeint.h (OUTPUT_SYNC_TARGET, OUTPUT_SYNC_MAKE): Rename.
* job.c (start_job_command): Use new constants.
* main.c: New -O argument format.
* doc/make.texi (Options Summary): Document the argument to -O.
* make.1: Ditto.
* main.c (define_makeflags): Don't add space between a single-char
option and its argument.
2013-04-06 Paul Smith <[email protected]>
* doc/make.texi (Implicit Variables): Clarify LDFLAGS vs. LDLIBS.
Fixes Savannah bug #37970.
* remake.c (check_dep): Reconsider files waiting on prerequisites,
as they may have finished. Fixes Savannah bug #37703.
2013-02-28 Paul Smith <[email protected]>
* function.c (func_realpath): On Solaris (at least) realpath() can
fail due to EINTR, so loop it. Fixes Savannah bug #38420.
2013-02-25 Paul Smith <[email protected]>
Add a proposed supported API for GNU make loaded objects.
* doc/make.texi (Loaded Object API): Document it.
* Makefile.am (make_SOURCES): Add new loadapi.c.
* dep.h: Remove eval_buffer(); moved to loadapi.c:gmk_eval().
* read.c (eval_buffer): Change eval_buffer() signature.
* main.c (main): Change eval_buffer() signature.
* variable.h (define_new_function): Change func_ptr signature.
* load.c (SYMBOL_EXTENSION): Change the extension.
* loadapi.c: Implement the new API.
* gnumake.h (gmk_eval): New function prototype.
(gmk_expand) Ditto.
(gmk_add_function) Ditto.
* gmk-default.scm (gmk-eval): Remove: now implemented in guile.c.
* guile.c (guile_expand_wrapper): Use gmk_expand()
(guile_eval_wrapper): Implement eval here to avoid double-expansion.
(guile_define_module): Define gmk-eval.
(func_guile): Use new func_ptr calling model.
(guile_gmake_setup): Use gmk_add_function() to declare $(guile ...)
* function.c (function_table_entry): Provide alternative func_ptr.
(func_eval): New signature for eval_buffer();
(function_table_init): New initialization for function_table_entry.
(expand_builtin_function): Support alternative invocation signature.
(define_new_function): Ditto.
2013-01-20 Paul Smith <[email protected]>
* gnumake.h: New file to contain externally-visible content.
* makeint.h: Include gnumake.h. Move gmk_floc type to gnumake.h.
* Makefile.am (include_HEADERS): Install the gnumake.h header.
* makeint.h: Change struct floc to gmk_floc typedef.
* Many: Use the new typedef.
* make.h: Rename to makeint.h.
* Many: Use the new name makeint.h.