Compare commits

...

8 Commits
4.2 ... 4.2.1

Author SHA1 Message Date
Paul Smith
9ab8af7cd8 GNU Make release 4.2.1. 2016-06-10 19:02:10 -04:00
Paul Smith
f522852f07 * maintMakefile: TP recommends rsync for retrieving PO files. 2016-06-06 08:32:00 -04:00
Jeremy Devenport
a3d8c086d5 * main.c (main): [SV 48009] Reset stack limit for make re-exec.
Copyright-paperwork-exempt: yes
2016-05-31 03:17:26 -04:00
Paul Smith
4762480ae9 [SV 47995] Ensure forced double-colon rules work with -j.
The fix for SV 44742 had a side-effect that some double-colon targets
were skipped.  This happens because the "considered" facility assumed
that all targets would be visited on each walk through the dependency
graph: we used a bit for considered and toggled it on each pass; if
we didn't walk the entire graph on every pass the bit would get out
of sync.  The new behavior after SV 44742 might return early without
walking the entire graph.  To fix this I changed the considered value
to an integer which is monotonically increasing: it is then never
possible to incorrectly determine that a previous pass through the
graph already considered the current target.

* filedef.h (struct file): make CONSIDERED an unsigned int.
* main.c (main): No longer need to reset CONSIDERED.
* remake.c (update_goal_chain): increment CONSIDERED rather than
inverting it between 0<->1.
(update_file_1): Reset CONSIDERED to 0 so it's re-considered.
(check_dep): Ditto.
* tests/scripts/features/double_colon: Add a regression test.
2016-05-31 03:17:26 -04:00
Paul Smith
ef6c059e1e * DELETE_ON_ERROR: [SV 48061] Use "exit 1" for portability.
Reported by Joel Fredrikson <Joel.Fredrikson@it.uu.se>
2016-05-31 03:17:26 -04:00
Paul Smith
cf4ed2ebe8 * w32/pathstuff.c: [SV 47996] Use ISBLANK() not isblank(). 2016-05-31 03:17:26 -04:00
Eli Zaretskii
5a4f9a67a3 Fix printing time stamps on MS-Windows
* dir.c (print_dir_data_base) [WINDOWS32]: Use %I64u format for
printing unsigned 64-bit data types, as %ull is not universally
supported.
2016-05-28 12:53:02 +03:00
Luke Allardyce
2987163ac4 [SV 48037] Fix MinGW build with Posix configury tools
* w32/Makefile.am (libw32_a_CPPFLAGS): Add -I$(srcdir)/glob.

Copyright-paperwork-exempt: yes
2016-05-27 22:39:55 +03:00
11 changed files with 59 additions and 31 deletions

11
NEWS
View File

@@ -1,6 +1,6 @@
GNU make NEWS -*-indented-text-*-
History of user-visible changes.
22 May 2016
10 June 2016
See the end of this file for copyrights and conditions.
@@ -8,6 +8,15 @@ All changes mentioned here are more fully described in the GNU make
manual, which is contained in this distribution as the file doc/make.texi.
See the README file and the GNU make manual for instructions for
reporting bugs.
Version 4.2.1 (10 Jun 2016)
A complete list of bugs fixed in this version is available here:
h
ttp://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=107&set=custom
This release is a bug-fix release.
Version 4.2 (22 May 2016)

View File

@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([GNU make],[4.2],[bug-make@gnu.org])
AC_INIT([GNU make],[4.2.1],[bug-make@gnu.org])
AC_PREREQ([2.69])

4
dir.c
View File

@@ -1082,7 +1082,7 @@ print_dir_data_base (void)
else if (dir->contents->dirfiles.ht_vec == 0)
{
#ifdef WINDOWS32
printf (_("# %s (key %s, mtime %ull): could not be opened.\n"),
printf (_("# %s (key %s, mtime %I64u): could not be opened.\n"),
dir->name, dir->contents->path_key,
(unsigned long long)dir->contents->mtime);
#else /* WINDOWS32 */
@@ -1119,7 +1119,7 @@ print_dir_data_base (void)
}
}
#ifdef WINDOWS32
printf (_("# %s (key %s, mtime %ull): "),
printf (_("# %s (key %s, mtime %I64u): "),
dir->name, dir->contents->path_key,
(unsigned long long)dir->contents->mtime);
#else /* WINDOWS32 */

View File

@@ -58,6 +58,8 @@ struct file
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
has been performed. */
unsigned int considered; /* equal to 'considered' if file has been
considered on current scan of goal chain */
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
enum update_status /* Status of the last attempt to update. */
{
@@ -96,8 +98,6 @@ struct file
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
unsigned int pat_searched:1;/* Nonzero if we already searched for
pattern-specific variables. */
unsigned int considered:1; /* equal to 'considered' if file has been
considered on current scan of goal chain */
unsigned int no_diag:1; /* True if the file failed to update and no
diagnostics has been issued (dontcare). */
};

9
main.c
View File

@@ -2262,10 +2262,6 @@ main (int argc, char **argv, char **envp)
for (i = 0, d = read_files; d != 0; ++i, d = d->next)
{
/* Reset the considered flag; we may need to look at the file
again to print an error. */
d->file->considered = 0;
if (d->file->updated)
{
/* This makefile was updated. */
@@ -2458,6 +2454,11 @@ main (int argc, char **argv, char **envp)
exit (WIFEXITED(r) ? WEXITSTATUS(r) : EXIT_FAILURE);
}
#else
#ifdef SET_STACK_SIZE
/* Reset limits, if necessary. */
if (stack_limit.rlim_cur)
setrlimit (RLIMIT_STACK, &stack_limit);
#endif
exec_command ((char **)nargv, environ);
#endif
free (aargv);

View File

@@ -144,7 +144,7 @@ ChangeLog: .check-git-HEAD
## ---------------- ##
## Updating files. ##
## ---------------- ##
RSYNC = rsync -Lrtvz
WGET = wget --passive-ftp -np -nv
ftp-gnu = ftp://ftp.gnu.org/gnu
@@ -165,13 +165,14 @@ move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
po_repo = http://translationproject.org/latest/$(PACKAGE)
po_sync = translationproject.org::tp/latest/$(PACKAGE)/
.PHONY: do-po-update po-update
do-po-update:
tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
&& rm -rf "$$tmppo" \
&& mkdir "$$tmppo" \
&& (cd "$$tmppo" \
&& $(WGET) $(po_wget_flags) -A '*.po' $(po_repo)) \
&& $(RSYNC) $(po_sync) "$$tmppo" \
&& cp "$$tmppo"/*.po $(top_srcdir)/po \
&& rm -rf "$$tmppo"
cd po && $(MAKE) update-po

View File

@@ -57,8 +57,9 @@ unsigned int commands_started = 0;
static struct goaldep *goal_list;
static struct dep *goal_dep;
/* Current value for pruning the scan of the goal chain (toggle 0/1). */
static unsigned int considered;
/* Current value for pruning the scan of the goal chain.
All files start with considered == 0. */
static unsigned int considered = 0;
static enum update_status update_file (struct file *file, unsigned int depth);
static enum update_status update_file_1 (struct file *file, unsigned int depth);
@@ -90,12 +91,12 @@ update_goal_chain (struct goaldep *goaldeps)
goal_list = rebuilding_makefiles ? goaldeps : NULL;
/* All files start with the considered bit 0, so the global value is 1. */
considered = 1;
#define MTIME(file) (rebuilding_makefiles ? file_mtime_no_search (file) \
: file_mtime (file))
/* Start a fresh batch of consideration. */
++considered;
/* Update all the goals until they are all finished. */
while (goals != 0)
@@ -247,10 +248,10 @@ update_goal_chain (struct goaldep *goaldeps)
}
}
/* If we reached the end of the dependency graph toggle the considered
flag for the next pass. */
/* If we reached the end of the dependency graph update CONSIDERED
for the next pass. */
if (g == 0)
considered = !considered;
++considered;
}
if (rebuilding_makefiles)
@@ -615,8 +616,8 @@ update_file_1 (struct file *file, unsigned int depth)
break;
if (!running)
/* The prereq is considered changed if the timestamp has changed while
it was built, OR it doesn't exist. */
/* The prereq is considered changed if the timestamp has changed
while it was built, OR it doesn't exist. */
d->changed = ((file_mtime (d->file) != mtime)
|| (mtime == NONEXISTENT_MTIME));
@@ -650,7 +651,7 @@ update_file_1 (struct file *file, unsigned int depth)
/* We may have already considered this file, when we didn't know
we'd need to update it. Force update_file() to consider it and
not prune it. */
d->file->considered = !considered;
d->file->considered = 0;
new = update_file (d->file, depth);
if (new > dep_status)
@@ -1087,7 +1088,7 @@ check_dep (struct file *file, unsigned int depth,
/* If the target was waiting for a dependency it has to be
reconsidered, as that dependency might have finished. */
if (file->command_state == cs_deps_running)
file->considered = !considered;
file->considered = 0;
set_command_state (file, cs_not_started);
}

View File

@@ -197,6 +197,21 @@ all:: 3
',
'-rs -j2 1 2 root', "all_one\nall_two\nroot\n");
# SV 47995 : Parallel double-colon rules with FORCE
run_make_test('
all:: ; @echo one
all:: joe ; @echo four
joe: FORCE ; touch joe-is-forced
FORCE:
',
'-j5', "one\ntouch joe-is-forced\nfour\n");
unlink('joe-is-forced');
# This tells the test driver that the perl test script executed properly.
1;

View File

@@ -6,17 +6,17 @@ $details = "";
run_make_test('
.DELETE_ON_ERROR:
all: ; false > $@
all: ; exit 1 > $@
',
'', "false > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** Deleting file 'all'", 512);
'', "exit 1 > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** Deleting file 'all'", 512);
run_make_test('
.DELETE_ON_ERROR:
all: foo.x ;
%.x : %.q ; echo > $@
%.q : ; false > $@
%.q : ; exit 1 > $@
',
'', "false > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512);
'', "exit 1 > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512);
# This tells the test driver that the perl test script executed properly.
1;

View File

@@ -22,4 +22,5 @@ noinst_LIBRARIES = libw32.a
libw32_a_SOURCES = subproc/misc.c subproc/sub_proc.c subproc/w32err.c \
compat/posixfcn.c pathstuff.c w32os.c
libw32_a_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/subproc -I$(top_srcdir)
libw32_a_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/subproc -I$(top_srcdir) \
-I$(top_srcdir)/glob

View File

@@ -32,7 +32,7 @@ convert_vpath_to_windows32(char *Path, char to_delim)
* contain blanks get trounced here. Use 8.3 format as a workaround.
*/
for (etok = Path; etok && *etok; etok++)
if (isblank ((unsigned char) *etok))
if (ISBLANK ((unsigned char) *etok))
*etok = to_delim;
return (convert_Path_to_windows32(Path, to_delim));