[master]: Packaging cleanups.

Signed-off-by: Manoj Srivastava <srivasta@debian.org>
This commit is contained in:
Manoj Srivastava 2016-01-16 00:36:25 -08:00
parent bb74c00b29
commit 6592ff6f78
17 changed files with 55 additions and 911 deletions

10
debian/changelog vendored
View file

@ -1,3 +1,13 @@
make-dfsg (4.1-1) unstable; urgency=low
* New upstream release
* Updated Standards version to 3.9.6. No changes needed.
* Updated the VCS-Git field of the control file to use HTTPS transport
* Updated the copyright file to DEP-5 format.
* Reverted to source format 1.0 , and use dgit
-- Manoj Srivastava <srivasta@debian.org> Sat, 16 Jan 2016 00:37:31 -0800
make-dfsg (4.0-8) unstable; urgency=high
* Update the timeout for the fopen fail test to 300 seconds, since the

4
debian/control vendored
View file

@ -1,10 +1,10 @@
Source: make-dfsg
VCS-Git: git://anonscm.debian.org/users/srivasta/debian/make-dfsg.git
VCS-Git: https://anonscm.debian.org/git/users/srivasta/debian/make-dfsg.git
VCS-Browser: http://anonscm.debian.org/gitweb/?p=users/srivasta/debian/make-dfsg.git
Section: devel
Priority: standard
Maintainer: Manoj Srivastava <srivasta@debian.org>
Standards-Version: 3.9.5.0
Standards-Version: 3.9.6
Homepage: http://www.gnu.org/software/make/
Build-Depends: gettext, po-debconf, debhelper (>= 9.0.0), dh-autoreconf,
autoconf, automake | automaken, autopoint, file, pkg-config,

72
debian/copyright vendored
View file

@ -1,43 +1,45 @@
This is the Debian GNU/Linux prepackaged version of GNU Make. GNU
Make was written by Richard Stallman and Roland McGrath.
This package was put together by Ian Murdock <imurdock@debian.org>,
from sources obtained from: ftp://ftp.gnu.org/gnu/make/
Changes:
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: make
Upstream-Contact: help-make@gnu.org
Sources: git://git.savannah.gnu.org/make.git
Comment: This is the Debian GNU/Linux prepackaged version of GNU Make. GNU Make
was written by Richard Stallman and Roland McGrath. This package was put
together by Ian Murdock <imurdock@debian.org>
Changes:
* added Debian GNU/Linux package maintenance system files
* removed documentation that fails to meet the Debian free software
guidelines.
* Pared down the package to just the documentation bits, and some
build infrastructure.
Parts of the GNU Make build structure remain in this package.
The package has since changed maintainers, the current maintainer being
Manoj Srivastava <srivasta@pilgrim.umass.edu>.
Files: *
Copyright: 1988-2014 Free Software Foundation, Inc.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
License: GPL-3+
The Debian specific changes are © 1997-2009, Manoj Srivastava
<srivasta@debian.org>, and distributed under the terms of the GNU
General Public License, version 2.
Files: debian/*
Copyright: 1997-2009, 2014-2016 Manoj Srivastava <srivasta@debian.org>
License: GPL-3+
GNU Make is Copyright © 1985- 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
License: GPL-3+
This package is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 dated June, 1991.
This program is distributed in the hope that it will be useful,
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
On Debian GNU/Linux systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.
A copy of the GNU General Public License is also available at
<URL:http://www.gnu.org/copyleft/gpl.html>. You may also obtain
it by writing to the Free Software Foundation, Inc., 51 Franklin
St, Fifth Floor, Boston, MA 02110-1301 USA
The documentation for this package is available under the GNU Free
Documentation License, and has been removed.
Manoj Srivastava <srivasta@debian.org>
arch-tag: d4250e44-a0e0-4ee0-adb9-2bd74f6eeb27
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License can be found in "/usr/share/common-licenses/GPL-3".

View file

@ -1,68 +0,0 @@
From 1817da6859317c4bd3603fc002fc0cb3668d8984 Mon Sep 17 00:00:00 2001
From: Manoj Srivastava <srivasta@golden-gryphon.com>
Date: Fri, 13 Jun 2014 15:45:18 -0700
Subject: [PATCH 01/11] debcherry fixup patch
147ab2d git-archimport-id: srivasta@debian.org--lenny/make-dfsg--debian--3.81--patch-3
- no changes against upstream or conflicts
1d865a1 [topic--multi-arch]: NMU changes from Steve Langaseck to support multi-arch.
- extra changes or conflicts
---
Makefile.am | 2 +-
remake.c | 18 ++++++++++++++++--
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4c07f70..e3bbe57 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -63,7 +63,7 @@ endif
man_MANS = make.1
-DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" -DMULTIARCH_DIRS="$(MULTIARCH_DIRS)" @DEFS@
AM_CPPFLAGS = $(GLOBINC)
AM_CFLAGS = $(GUILE_CFLAGS)
diff --git a/remake.c b/remake.c
index 138cdc6..d5386eb 100644
--- a/remake.c
+++ b/remake.c
@@ -1522,9 +1522,11 @@ library_search (const char *lib, FILE_TIMESTAMP *mtime_ptr)
{
static char *dirs[] =
{
+#ifdef MULTIARCH_DIRS
+ MULTIARCH_DIRS
+#endif
#ifndef _AMIGA
"/lib",
- "/usr/lib",
#endif
#if defined(WINDOWS32) && !defined(LIBDIR)
/*
@@ -1533,7 +1535,19 @@ library_search (const char *lib, FILE_TIMESTAMP *mtime_ptr)
*/
#define LIBDIR "."
#endif
- LIBDIR, /* Defined by configuration. */
+ LIBDIR, /* Defined by configuration. */
+#ifndef _AMIGA
+/*
+ * In the Debian binaries, PREFIX is /usr and thus this searches /lib,
+ * /usr/lib and /usr/lib again and therefore misses any libraries that
+ * are not packaged and were installed by the site admin. The ideal
+ * behaviour would be to have the search path set by a Makefile
+ * variable (other than the VPATH blunt object) but even absent that,
+ * it would be more useful if it looked in /usr/local/lib even though
+ * make itself hasn't been installed in the /usr/local tree -- manoj
+ */
+ "/usr/local/lib",
+#endif
0
};
--
2.0.0

View file

@ -1,31 +0,0 @@
From 2676051595b283cd938b992698a9c1bf0055cd78 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Sun, 13 Oct 2013 16:01:22 -0400
Subject: [PATCH 02/11] [SV 40139] Modify "missing separator" for better
translation
---
read.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/read.c b/read.c
index 15d1b13..83224ac 100644
--- a/read.c
+++ b/read.c
@@ -1120,9 +1120,10 @@ eval (struct ebuffer *ebuf, int set_default)
if (*p2 != '\0')
/* There's no need to be ivory-tower about this: check for
one of the most common bugs found in makefiles... */
- fatal (fstart, _("missing separator%s"),
- (cmd_prefix == '\t' && !strneq (line, " ", 8))
- ? "" : _(" (did you mean TAB instead of 8 spaces?)"));
+ if (cmd_prefix == '\t' && !strneq (line, " ", 8))
+ fatal (fstart, _("missing separator (did you mean TAB instead of 8 spaces?)"));
+ else
+ fatal (fstart, _("missing separator"));
continue;
}
--
2.0.0

View file

@ -1,86 +0,0 @@
From 412ca4c82ed5d3a45acede9b0ec2013eea22e411 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Sun, 20 Oct 2013 12:49:01 -0400
Subject: [PATCH 03/11] * read.c (record_files): [SV 33034] Change fatal() to
error()
Allows deprecated syntax. However we don't guarantee this syntax
will continue to be legal in the future.
Change suggested by David Boyce <david.s.boyce@gmail.com>
Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
Conflicts:
NEWS
---
NEWS | 26 +++++++++++++++-----------
read.c | 2 +-
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/NEWS b/NEWS
index 2227a35..23e5a1f 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,19 @@ 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.0.90
+
+A complete list of bugs fixed in this version is available here:
+
+http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=105&set=custom
+
+* Change the fatal error for mixed explicit and implicit rules, that was
+ introduced in GNU make 3.82, to a non-fatal error. However, this syntax is
+ still deprecated and may return to being illegal in a future version of GNU
+ make. Makefiles that rely on this syntax should be fixed.
+ See https://savannah.gnu.org/bugs/?33034
+
+
Version 4.0 (09 Oct 2013)
A complete list of bugs fixed in this version is available here:
@@ -144,15 +157,6 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=104&set
it explicitly.
* WARNING: Backward-incompatibility!
- In previous versions of make it was acceptable to list one or more explicit
- targets followed by one or more pattern targets in the same rule and it
- worked "as expected". However, this was not documented as acceptable and if
- you listed any explicit targets AFTER the pattern targets, the entire rule
- would be mis-parsed. This release removes this ability completely: make
- will generate an error message if you mix explicit and pattern targets in
- the same rule.
-
-* WARNING: Backward-incompatibility!
As a result of parser enhancements, three backward-compatibility issues
exist: first, a prerequisite containing an "=" cannot be escaped with a
backslash any longer. You must create a variable containing an "=" and
@@ -239,8 +243,8 @@ Version 3.81 (01 Apr 2006)
any prerequisite that does not exist, even though that prerequisite
might have caused the target to rebuild. Starting with the _next_
release of GNU make, '$?' will contain all prerequisites that caused
- the target to be considered out of date. See this Savannah bug:
- http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=16051
+ the target to be considered out of date.
+ See http://savannah.gnu.org/bugs/?16051
* WARNING: Backward-incompatibility!
GNU make now implements a generic "second expansion" feature on the
diff --git a/read.c b/read.c
index 83224ac..9bbde48 100644
--- a/read.c
+++ b/read.c
@@ -2218,7 +2218,7 @@ record_files (struct nameseq *filenames, const char *pattern,
/* Reduce escaped percents. If there are any unescaped it's an error */
name = filenames->name;
if (find_percent_cached (&name))
- fatal (flocp, _("mixed implicit and normal rules"));
+ error (flocp, _("*** mixed implicit and normal rules: deprecated syntax"));
}
}
--
2.0.0

View file

@ -1,29 +0,0 @@
From 2d8c8e071de087a4bcd8d1d9fd63c82d7f0dcd61 Mon Sep 17 00:00:00 2001
From: Daniel Richard G <skunk@iskunk.org>
Date: Sat, 23 Nov 2013 22:31:36 -0500
Subject: [PATCH 04/11] * load.c: [SV 40515] Define RTLD_GLOBAL if not set.
Copyright-paperwork-exempt: yes
---
load.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/load.c b/load.c
index a2cbc25..9d201ba 100644
--- a/load.c
+++ b/load.c
@@ -30,6 +30,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "filedef.h"
#include "variable.h"
+/* Tru64 V4.0 does not have this flag */
+#ifndef RTLD_GLOBAL
+# define RTLD_GLOBAL 0
+#endif
+
struct load_list
{
struct load_list *next;
--
2.0.0

View file

@ -1,25 +0,0 @@
From accf44ed08577a5df94eca5bf67583827b900eb2 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Sun, 12 Jan 2014 00:13:22 -0500
Subject: [PATCH 05/11] * commands.c: [SV 40789] Remove unneeded header dlfcn.h
---
commands.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/commands.c b/commands.c
index f910358..eda75df 100644
--- a/commands.c
+++ b/commands.c
@@ -14,8 +14,6 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <dlfcn.h>
-
#include "makeint.h"
#include "filedef.h"
#include "dep.h"
--
2.0.0

View file

@ -1,44 +0,0 @@
From 53701732badacf839aa132d4b4a449618b44a6fc Mon Sep 17 00:00:00 2001
From: Alan Hourihane <alanh@fairlite.co.uk>
Date: Sat, 18 Jan 2014 16:41:47 -0500
Subject: [PATCH 06/11] * configure.ac: [SV 40790] Fix load autoconf variables.
Copyright-paperwork-exempt: yes
---
configure.ac | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9684749..7490b4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -317,20 +317,20 @@ AC_ARG_ENABLE([load],
[make_cv_load="$enableval" user_load="$enableval"],
[make_cv_load="yes"])
-AS_CASE([/$ac_cv_func_dlopen/$ac_cv_func_dlsym/$ac_cv_func_dlerror/],
+AS_CASE([/$ac_cv_have_decl_dlopen/$ac_cv_have_decl_dlsym/$ac_cv_have_decl_dlerror/],
[*/no/*], [make_cv_load=no])
+# We might need -ldl
+AS_IF([test "$make_cv_load" = yes], [
+ AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=])
+ ])
+
AS_CASE([/$make_cv_load/$user_load/],
[*/no/*], [make_cv_load=no],
[AC_DEFINE(MAKE_LOAD, 1,
[Define to 1 to enable 'load' support in GNU make.])
])
-# We might need -ldl
-AS_IF([test "$make_cv_load" = yes], [
- AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=])
- ])
-
# If we want load support, we might need to link with export-dynamic.
# See if we can figure it out. Unfortunately this is very difficult.
# For example passing -rdynamic to the SunPRO linker gives a warning
--
2.0.0

View file

@ -1,42 +0,0 @@
From 583cc8ce62a77121c20eb4d5121a0dd60e5f9c34 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Sat, 1 Feb 2014 23:08:59 -0500
Subject: [PATCH 07/11] * job.c (set_child_handler_action_flags): [SV 41341]
Ensure signal handler is in place before alarm(1).
---
job.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/job.c b/job.c
index febfac0..7b061a6 100644
--- a/job.c
+++ b/job.c
@@ -1108,10 +1108,20 @@ set_child_handler_action_flags (int set_handler, int set_alarm)
/* If we're about to enter the read(), set an alarm to wake up in a
second so we can check if the load has dropped and we can start more
work. On the way out, turn off the alarm and set SIG_DFL. */
- alarm (set_handler ? 1 : 0);
- sa.sa_handler = set_handler ? job_noop : SIG_DFL;
- sa.sa_flags = 0;
- sigaction (SIGALRM, &sa, NULL);
+ if (set_handler)
+ {
+ sa.sa_handler = job_noop;
+ sa.sa_flags = 0;
+ sigaction (SIGALRM, &sa, NULL);
+ alarm (1);
+ }
+ else
+ {
+ alarm (0);
+ sa.sa_handler = SIG_DFL;
+ sa.sa_flags = 0;
+ sigaction (SIGALRM, &sa, NULL);
+ }
}
#endif
}
--
2.0.0

View file

@ -1,298 +0,0 @@
From 9ec91871f535f54a60b11b7777b04bb869c4f24a Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Thu, 1 May 2014 09:48:10 -0400
Subject: [PATCH 08/11] [SV 42249] Propagate correct rule status results.
* remake.c (update_file, update_file_1, check_dep): Return an enum
update_status value instead of an int, and keep the highest value we
find as we walk the graph so that the ultimate status is correct.
* tests/scripts/options/dash-q: Add a test for updating prerequisites.
---
remake.c | 75 +++++++++++++++++++++++++++-----------------
tests/scripts/options/dash-q | 44 +++++++++++++++++++-------
2 files changed, 78 insertions(+), 41 deletions(-)
diff --git a/remake.c b/remake.c
index d5386eb..b1c932f 100644
--- a/remake.c
+++ b/remake.c
@@ -58,10 +58,10 @@ unsigned int commands_started = 0;
/* Current value for pruning the scan of the goal chain (toggle 0/1). */
static unsigned int considered;
-static int update_file (struct file *file, unsigned int depth);
-static int update_file_1 (struct file *file, unsigned int depth);
-static int check_dep (struct file *file, unsigned int depth,
- FILE_TIMESTAMP this_mtime, int *must_make_ptr);
+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);
+static enum update_status check_dep (struct file *file, unsigned int depth,
+ FILE_TIMESTAMP this_mtime, int *must_make);
static enum update_status touch_file (struct file *file);
static void remake_file (struct file *file);
static FILE_TIMESTAMP name_mtime (const char *name);
@@ -130,7 +130,7 @@ update_goal_chain (struct dep *goals)
file = file->prev)
{
unsigned int ocommands_started;
- int fail;
+ enum update_status fail;
file->dontcare = g->dontcare;
@@ -161,14 +161,12 @@ update_goal_chain (struct dep *goals)
if (commands_started > ocommands_started)
g->changed = 1;
- /* If we updated a file and STATUS was not already 1, set it to
- 1 if updating failed, or to 0 if updating succeeded. Leave
- STATUS as it is if no updating was done. */
-
stop = 0;
if ((fail || file->updated) && status < us_question)
{
- if (file->update_status != us_success)
+ /* We updated this goal. Update STATUS and decide whether
+ to stop. */
+ if (file->update_status)
{
/* Updating failed, or -q triggered. The STATUS value
tells our caller which. */
@@ -282,11 +280,11 @@ update_goal_chain (struct dep *goals)
If there are multiple double-colon entries for FILE,
each is considered in turn. */
-static int
+static enum update_status
update_file (struct file *file, unsigned int depth)
{
- int status = 0;
- register struct file *f;
+ enum update_status status = us_success;
+ struct file *f;
f = file->double_colon ? file->double_colon : file;
@@ -311,26 +309,31 @@ update_file (struct file *file, unsigned int depth)
the chain is exhausted. */
for (; f != 0; f = f->prev)
{
+ enum update_status new;
+
f->considered = considered;
- status |= update_file_1 (f, depth);
+ new = update_file_1 (f, depth);
check_renamed (f);
/* Clean up any alloca() used during the update. */
alloca (0);
/* If we got an error, don't bother with double_colon etc. */
- if (status != 0 && !keep_going_flag)
- return status;
+ if (new && !keep_going_flag)
+ return new;
if (f->command_state == cs_running
|| f->command_state == cs_deps_running)
{
/* Don't run the other :: rules for this
file until this rule is finished. */
- status = 0;
+ status = us_success;
break;
}
+
+ if (new > status)
+ status = new;
}
/* Process the remaining rules in the double colon chain so they're marked
@@ -343,7 +346,11 @@ update_file (struct file *file, unsigned int depth)
f->considered = considered;
for (d = f->deps; d != 0; d = d->next)
- status |= update_file (d->file, depth + 1);
+ {
+ enum update_status new = update_file (d->file, depth + 1);
+ if (new > status)
+ new = status;
+ }
}
return status;
@@ -399,12 +406,12 @@ complain (struct file *file)
/* Consider a single 'struct file' and update it as appropriate.
Return 0 on success, or non-0 on failure. */
-static int
+static enum update_status
update_file_1 (struct file *file, unsigned int depth)
{
+ enum update_status dep_status = us_success;
FILE_TIMESTAMP this_mtime;
int noexist, must_make, deps_changed;
- int dep_status = 0;
struct file *ofile;
struct dep *d, *ad;
struct dep amake;
@@ -521,6 +528,7 @@ update_file_1 (struct file *file, unsigned int depth)
while (d)
{
+ enum update_status new;
FILE_TIMESTAMP mtime;
int maybe_make;
int dontcare = 0;
@@ -555,7 +563,9 @@ update_file_1 (struct file *file, unsigned int depth)
d->file->dontcare = file->dontcare;
}
- dep_status |= check_dep (d->file, depth, this_mtime, &maybe_make);
+ new = check_dep (d->file, depth, this_mtime, &maybe_make);
+ if (new > dep_status)
+ dep_status = new;
/* Restore original dontcare flag. */
if (rebuilding_makefiles)
@@ -601,6 +611,7 @@ update_file_1 (struct file *file, unsigned int depth)
for (d = file->deps; d != 0; d = d->next)
if (d->file->intermediate)
{
+ enum update_status new;
int dontcare = 0;
FILE_TIMESTAMP mtime = file_mtime (d->file);
@@ -619,7 +630,9 @@ update_file_1 (struct file *file, unsigned int depth)
not prune it. */
d->file->considered = !considered;
- dep_status |= update_file (d->file, depth);
+ new = update_file (d->file, depth);
+ if (new > dep_status)
+ dep_status = new;
/* Restore original dontcare flag. */
if (rebuilding_makefiles)
@@ -664,9 +677,10 @@ update_file_1 (struct file *file, unsigned int depth)
/* If any dependency failed, give up now. */
- if (dep_status != 0)
+ if (dep_status)
{
- file->update_status = us_failed;
+ /* I'm not sure if we can't just assign dep_status... */
+ file->update_status = dep_status == us_none ? us_failed : dep_status;
notice_finished_file (file);
--depth;
@@ -981,13 +995,13 @@ notice_finished_file (struct file *file)
FILE depends on (including FILE itself). Return nonzero if any updating
failed. */
-static int
+static enum update_status
check_dep (struct file *file, unsigned int depth,
FILE_TIMESTAMP this_mtime, int *must_make_ptr)
{
struct file *ofile;
struct dep *d;
- int dep_status = 0;
+ enum update_status dep_status = us_success;
++depth;
start_updating (file);
@@ -1060,6 +1074,7 @@ check_dep (struct file *file, unsigned int depth,
d = file->deps;
while (d != 0)
{
+ enum update_status new;
int maybe_make;
if (is_updating (d->file))
@@ -1083,12 +1098,14 @@ check_dep (struct file *file, unsigned int depth,
d->file->parent = file;
maybe_make = *must_make_ptr;
- dep_status |= check_dep (d->file, depth, this_mtime,
- &maybe_make);
+ new = check_dep (d->file, depth, this_mtime, &maybe_make);
+ if (new > dep_status)
+ dep_status = new;
+
if (! d->ignore_mtime)
*must_make_ptr = maybe_make;
check_renamed (d->file);
- if (dep_status != 0 && !keep_going_flag)
+ if (dep_status && !keep_going_flag)
break;
if (d->file->command_state == cs_running
diff --git a/tests/scripts/options/dash-q b/tests/scripts/options/dash-q
index 56f04a1..194588d 100644
--- a/tests/scripts/options/dash-q
+++ b/tests/scripts/options/dash-q
@@ -5,21 +5,21 @@ $details = "Try various uses of -q and ensure they all give the correct results.
# TEST 0
-run_make_test('
+run_make_test(qq!
one:
two: ;
three: ; :
-four: ; $(.XY)
-five: ; \
- $(.XY)
-six: ; \
- $(.XY)
- $(.XY)
-seven: ; \
- $(.XY)
- : foo
- $(.XY)
-',
+four: ; \$(.XY)
+five: ; \\
+ \$(.XY)
+six: ; \\
+ \$(.XY)
+\t\$(.XY)
+seven: ; \\
+ \$(.XY)
+\t: foo
+\t\$(.XY)
+!,
'-q one', '');
# TEST 1
@@ -54,4 +54,24 @@ one:: ; @echo two
',
'-q', '', 256);
+# TEST 7 : Savannah bug # 42249
+# Make sure we exit with 1 even for prerequisite updates
+run_make_test('
+build-stamp: ; echo $@
+build-arch: build-stamp
+build-x: build-arch
+build-y: build-x
+',
+ '-q build-y', '', 256);
+
+# TEST 8
+# Make sure we exit with 2 on error even with -q
+run_make_test('
+build-stamp: ; echo $@
+build-arch: build-stamp-2
+build-x: build-arch
+build-y: build-x
+',
+ '-q build-y', "#MAKE#: *** No rule to make target 'build-stamp-2', needed by 'build-arch'. Stop.\n", 512);
+
1;
--
2.0.0

View file

@ -1,126 +0,0 @@
From 2086cc583c11cb919710c688a0f8e9c26731bd0f Mon Sep 17 00:00:00 2001
From: Manoj Srivastava <srivasta@golden-gryphon.com>
Date: Sun, 4 May 2014 17:08:48 -0700
Subject: [PATCH 09/11] [handle_excessive_command_length]: Patch to fix large
cmmand line
When presented with a very very long command line (e.g. WebKit's linking
of libWebCore.la in current git), make fails to execute the command as
it doesn't split the command line to fit within the limits.
This patch provides a POSIX specific fix.
Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
---
configure.ac | 3 ++-
job.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7490b4d..404c7ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,8 @@ AC_HEADER_DIRENT
AC_HEADER_STAT
AC_HEADER_TIME
AC_CHECK_HEADERS([stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
- memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h])
+ memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h \
+ sys/user.h linux/binfmts.h])
AM_PROG_CC_C_O
AC_C_CONST
diff --git a/job.c b/job.c
index 7b061a6..63a6253 100644
--- a/job.c
+++ b/job.c
@@ -27,6 +27,14 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include <string.h>
+#if defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H)
+#include <sys/user.h>
+#include <linux/binfmts.h>
+#endif
+#ifndef PAGE_SIZE
+# define PAGE_SIZE (sysconf(_SC_PAGESIZE))
+#endif
+
/* Default shell to use. */
#ifdef WINDOWS32
#include <windows.h>
@@ -3067,6 +3075,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
#ifdef WINDOWS32
char *command_ptr = NULL; /* used for batch_mode_shell mode */
#endif
+ char *args_ptr;
# ifdef __EMX__ /* is this necessary? */
if (!unixy_shell && shellflags)
@@ -3232,8 +3241,17 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
return new_argv;
}
+#ifdef MAX_ARG_STRLEN
+ static char eval_line[] = "eval\\ \\\"set\\ x\\;\\ shift\\;\\ ";
+#define ARG_NUMBER_DIGITS 5
+#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4 \
+ + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2))
+#else
+#define EVAL_LEN 0
+#endif
+
new_line = xmalloc ((shell_len*2) + 1 + sflags_len + 1
- + (line_len*2) + 1);
+ + (line_len*2) + 1 + EVAL_LEN);
ap = new_line;
/* Copy SHELL, escaping any characters special to the shell. If
we don't escape them, construct_command_argv_internal will
@@ -3253,6 +3271,30 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
#ifdef WINDOWS32
command_ptr = ap;
#endif
+
+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
+ if (unixy_shell && line_len > MAX_ARG_STRLEN)
+ {
+ unsigned j;
+ memcpy (ap, eval_line, sizeof (eval_line) - 1);
+ ap += sizeof (eval_line) - 1;
+ for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++)
+ ap += sprintf (ap, "\\$\\{%u\\}", j);
+ *ap++ = '\\';
+ *ap++ = '"';
+ *ap++ = ' ';
+ /* Copy only the first word of SHELL to $0. */
+ for (p = shell; *p != '\0'; ++p)
+ {
+ if (isspace ((unsigned char)*p))
+ break;
+ *ap++ = *p;
+ }
+ *ap++ = ' ';
+ }
+#endif
+ args_ptr = ap;
+
for (p = line; *p != '\0'; ++p)
{
if (restp != NULL && *p == '\n')
@@ -3300,6 +3342,13 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
}
#endif
*ap++ = *p;
+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
+ if (unixy_shell && line_len > MAX_ARG_STRLEN && (ap - args_ptr > MAX_ARG_STRLEN - 2))
+ {
+ *ap++ = ' ';
+ args_ptr = ap;
+ }
+#endif
}
if (ap == new_line + shell_len + sflags_len + 2)
{
--
2.0.0

View file

@ -1,50 +0,0 @@
From a81b184a680d8bfba523ac974c4c9b700e0fbb21 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Sat, 26 Oct 2013 00:10:17 -0400
Subject: [PATCH 10/11] * makeint.h (STOP_SET): [SV 40371] Cast to unsigned
char.
* tests/scripts/misc/utf8: Test variable names with characters >127.
Fix suggested by Robert Bogomip <bob.bogo@milohedge.com>
---
makeint.h | 2 +-
tests/scripts/misc/utf8 | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 tests/scripts/misc/utf8
diff --git a/makeint.h b/makeint.h
index 3e22296..7677af0 100644
--- a/makeint.h
+++ b/makeint.h
@@ -409,7 +409,7 @@ extern int unixy_shell;
# define MAP_VMSCOMMA 0x0000
#endif
-#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(int)(_v)],(_m))
+#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(unsigned char)(_v)],(_m))
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
# define SET_STACK_SIZE
diff --git a/tests/scripts/misc/utf8 b/tests/scripts/misc/utf8
new file mode 100644
index 0000000..2adcd07
--- /dev/null
+++ b/tests/scripts/misc/utf8
@@ -0,0 +1,14 @@
+# -*-perl-*-
+$description = "Test utf8 handling.";
+
+$details = "";
+
+# Variable names containing UTF8 characters
+run_make_test("
+\xe2\x96\xaa := hello
+\$(info \$(\xe2\x96\xaa))
+all:
+",
+ '', "hello\n#MAKE#: Nothing to be done for 'all'.");
+
+1;
--
2.0.0

View file

@ -1,51 +0,0 @@
From a94ea051c5a91f3aa34405d1f549d88325701af1 Mon Sep 17 00:00:00 2001
From: Manoj Srivastava <srivasta@golden-gryphon.com>
Date: Fri, 13 Jun 2014 14:33:29 -0700
Subject: [PATCH 11/11] [test-fopenfail-timeout-fix]: Set fopen-fail timeout to
300
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Thanks to Víctor M. Jáquez L. <vjaquez@igalia.com> for the solution.
The problem is, if I understand it correctly, the timeout value:
By default the test timeout (tests/test_driver.pl) is 5 seconds, but in this
particular test, the timeout is reached before hitting the "too many open
files" error, which is the expected error. This is the case when the computer
is not under a heavy load.
This commit changes the timeout value only for the fail-open test to
300, allowing the tests to pass.
Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
---
tests/test_driver.pl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/test_driver.pl b/tests/test_driver.pl
index 2f83270..194d6fa 100644
--- a/tests/test_driver.pl
+++ b/tests/test_driver.pl
@@ -419,7 +419,9 @@ sub run_all_tests
{
$categories_run = 0;
+ my $save_timeout = $test_timeout;
foreach $testname (sort @TESTS) {
+ local $test_timeout = $save_timeout;
$suite_passed = 1; # reset by test on failure
$num_of_logfiles = 0;
$num_of_tmpfiles = 0;
@@ -462,6 +464,7 @@ sub run_all_tests
$tests_run = 0;
$tests_passed = 0;
+ if ($testname =~ m{misc/fopen-fail}msx) { $test_timeout = 300; }
# Run the test!
$code = do $perl_testname;
--
2.0.0

12
debian/patches/series vendored
View file

@ -1,12 +0,0 @@
# exported from git by git-debcherry
0001-debcherry-fixup-patch.patch
0002-SV-40139-Modify-missing-separator-for-better-transla.patch
0003-read.c-record_files-SV-33034-Change-fatal-to-error.patch
0004-load.c-SV-40515-Define-RTLD_GLOBAL-if-not-set.patch
0005-commands.c-SV-40789-Remove-unneeded-header-dlfcn.h.patch
0006-configure.ac-SV-40790-Fix-load-autoconf-variables.patch
0007-job.c-set_child_handler_action_flags-SV-41341.patch
0008-SV-42249-Propagate-correct-rule-status-results.patch
0009-handle_excessive_command_length-Patch-to-fix-large-c.patch
0010-makeint.h-STOP_SET-SV-40371-Cast-to-unsigned-char.patch
0011-test-fopenfail-timeout-fix-Set-fopen-fail-timeout-to.patch

View file

@ -1 +1 @@
3.0 (quilt)
1.0

View file

@ -495,17 +495,11 @@ sub run_all_tests
{
$categories_run = 0;
<<<<<<< HEAD
my $save_timeout = $test_timeout;
foreach $testname (sort @TESTS) {
local $test_timeout = $save_timeout;
=======
$lasttest = '';
foreach $testname (sort @TESTS) {
# Skip duplicates on VMS caused by logical name search lists.
next if $testname eq $lasttest;
$lasttest = $testname;
>>>>>>> upstream
$suite_passed = 1; # reset by test on failure
$num_of_logfiles = 0;
$num_of_tmpfiles = 0;