Compare commits
57 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bcee1864f4 | ||
|
7a05dfee17 | ||
|
b3884b6199 | ||
|
00a29b7cdd | ||
|
dc62df15c3 | ||
|
48f881d9ec | ||
|
ae5b60c6a1 | ||
|
34e875fab2 | ||
|
6925c68189 | ||
|
3e611c05a0 | ||
|
c55f31d05d | ||
|
efd32f8da0 | ||
|
0d6b893b6e | ||
|
56a9df0d91 | ||
|
4bec0ace93 | ||
|
b119ff1512 | ||
|
a58f35f819 | ||
|
7f806a278b | ||
|
0bdbc64c9d | ||
|
3c945c8317 | ||
|
de7f11af49 | ||
|
e5dfe9e074 | ||
|
36f155c8bb | ||
|
95ae6bbdd1 | ||
|
519a7c5bcb | ||
|
993b78d5a3 | ||
|
49f4723b0c | ||
|
c34a6d6d07 | ||
|
694b30dfe6 | ||
|
dae5f53f05 | ||
|
3ffc99baef | ||
|
9c4a278bbd | ||
|
f83aa1e94f | ||
|
539d55578b | ||
|
7a6a3abdcd | ||
|
ef864d2be6 | ||
|
966e01fab7 | ||
|
2bfdac0113 | ||
|
d6bbfbfe82 | ||
|
3fc63a36eb | ||
|
ec9e7e7c9c | ||
|
5fe9b3a45f | ||
|
2d4dfd6bee | ||
|
e5494879d5 | ||
|
97dd22fe6f | ||
|
4bdfdfc1de | ||
|
16e43594e4 | ||
|
bdf98ed389 | ||
|
ee7f908927 | ||
|
e62c874ba6 | ||
|
7b4e48e3b0 | ||
|
7cf149fc79 | ||
|
ba10d75822 | ||
|
201e8d2a73 | ||
|
c2611a71f6 | ||
|
aa3f81378c | ||
|
4cf7c2db3f |
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,3 +2,7 @@ make-3.81.tar.bz2
|
||||
/make-*/
|
||||
make-3.82.tar.bz2
|
||||
*.rpm
|
||||
/make-4.0.tar.bz2
|
||||
/make-4.1.tar.bz2
|
||||
/make-4.2.1.tar.bz2
|
||||
/make-4.3.tar.gz
|
||||
|
7
STAGE1-make
Normal file
7
STAGE1-make
Normal file
@ -0,0 +1,7 @@
|
||||
srpm $1
|
||||
mcd $BUILDDIR/$1
|
||||
$SRC/${1}-*/configure $TCONFIGARGS
|
||||
notparallel
|
||||
test -d tools/gnulib/lib && make $J V=1 -C tools/gnulib/lib
|
||||
make $J V=1
|
||||
make $J install DESTDIR=${ROOTFS}
|
19
gating.yaml
Normal file
19
gating.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
@ -1,261 +0,0 @@
|
||||
diff -Bburpd make-3.81_orig/file.c make-3.81/file.c
|
||||
--- make-3.81_orig/file.c 2006-05-23 13:59:11.000000000 +0200
|
||||
+++ make-3.81/file.c 2006-05-23 14:39:34.000000000 +0200
|
||||
@@ -490,7 +490,7 @@ expand_deps (struct file *f)
|
||||
|
||||
o = subst_expand (buffer, d->name, "%", "$*", 1, 2, 0);
|
||||
|
||||
- free (d->name);
|
||||
+ hash_strfree (d->name);
|
||||
d->name = savestring (buffer, o - buffer);
|
||||
d->staticpattern = 0; /* Clear staticpattern so that we don't
|
||||
re-expand %s below. */
|
||||
@@ -549,7 +549,7 @@ expand_deps (struct file *f)
|
||||
dp->name[0] = '\0';
|
||||
else
|
||||
{
|
||||
- free (dp->name);
|
||||
+ hash_strfree (dp->name);
|
||||
dp->name = savestring (buffer, o - buffer);
|
||||
}
|
||||
}
|
||||
@@ -580,7 +580,7 @@ expand_deps (struct file *f)
|
||||
if (d1->file == 0)
|
||||
d1->file = enter_file (d1->name);
|
||||
else
|
||||
- free (d1->name);
|
||||
+ hash_strfree (d1->name);
|
||||
d1->name = 0;
|
||||
d1->staticpattern = 0;
|
||||
d1->need_2nd_expansion = 0;
|
||||
Only in make-3.81: file.c~
|
||||
diff -Bburpd make-3.81_orig/implicit.c make-3.81/implicit.c
|
||||
--- make-3.81_orig/implicit.c 2006-05-23 13:59:11.000000000 +0200
|
||||
+++ make-3.81/implicit.c 2006-05-23 14:40:01.000000000 +0200
|
||||
@@ -864,7 +864,7 @@ pattern_search (struct file *file, int a
|
||||
dep->file = enter_file (dep->name);
|
||||
/* enter_file uses dep->name _if_ we created a new file. */
|
||||
if (dep->name != dep->file->name)
|
||||
- free (dep->name);
|
||||
+ hash_strfree (dep->name);
|
||||
dep->name = 0;
|
||||
dep->file->tried_implicit |= dep->changed;
|
||||
}
|
||||
Only in make-3.81: implicit.c~
|
||||
diff -Bburpd make-3.81_orig/main.c make-3.81/main.c
|
||||
--- make-3.81_orig/main.c 2006-05-23 13:59:11.000000000 +0200
|
||||
+++ make-3.81/main.c 2006-05-23 14:40:49.000000000 +0200
|
||||
@@ -540,6 +540,7 @@ initialize_global_hash_tables (void)
|
||||
init_hash_files ();
|
||||
hash_init_directories ();
|
||||
hash_init_function_table ();
|
||||
+ init_hash_strings ();
|
||||
}
|
||||
|
||||
static struct file *
|
||||
Only in make-3.81: main.c~
|
||||
diff -Bburpd make-3.81_orig/make.h make-3.81/make.h
|
||||
--- make-3.81_orig/make.h 2006-05-23 13:59:11.000000000 +0200
|
||||
+++ make-3.81/make.h 2006-05-23 14:41:21.000000000 +0200
|
||||
@@ -431,6 +431,11 @@ extern void print_spaces PARAMS ((unsign
|
||||
extern char *find_percent PARAMS ((char *));
|
||||
extern FILE *open_tmpfile PARAMS ((char **, const char *));
|
||||
|
||||
+extern void init_hash_strings PARAMS ((void));
|
||||
+extern char *hash_strdup PARAMS ((const char *));
|
||||
+extern char *hash_savestring PARAMS ((const char *, unsigned int));
|
||||
+extern void hash_strfree PARAMS ((char *));
|
||||
+
|
||||
#ifndef NO_ARCHIVES
|
||||
extern int ar_name PARAMS ((char *));
|
||||
extern void ar_parse_name PARAMS ((char *, char **, char **));
|
||||
Only in make-3.81: make.h~
|
||||
diff -Bburpd make-3.81_orig/misc.c make-3.81/misc.c
|
||||
--- make-3.81_orig/misc.c 2006-05-23 13:59:11.000000000 +0200
|
||||
+++ make-3.81/misc.c 2006-05-23 14:42:59.000000000 +0200
|
||||
@@ -16,8 +16,10 @@ You should have received a copy of the G
|
||||
GNU Make; see the file COPYING. If not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
|
||||
|
||||
+#include <assert.h>
|
||||
#include "make.h"
|
||||
#include "dep.h"
|
||||
+#include "hash.h"
|
||||
#include "debug.h"
|
||||
|
||||
/* Variadic functions. We go through contortions to allow proper function
|
||||
@@ -511,7 +513,7 @@ void
|
||||
free_dep (struct dep *d)
|
||||
{
|
||||
if (d->name != 0)
|
||||
- free (d->name);
|
||||
+ hash_strfree (d->name);
|
||||
|
||||
if (d->stem != 0)
|
||||
free (d->stem);
|
||||
@@ -535,7 +537,7 @@ copy_dep_chain (const struct dep *d)
|
||||
bcopy ((char *) d, (char *) c, sizeof (struct dep));
|
||||
|
||||
if (c->name != 0)
|
||||
- c->name = xstrdup (c->name);
|
||||
+ c->name = hash_strdup (c->name);
|
||||
if (c->stem != 0)
|
||||
c->stem = xstrdup (c->stem);
|
||||
|
||||
@@ -909,3 +911,154 @@ close_stdout (void)
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
+
|
||||
+/* Hash table of duplicated strings. */
|
||||
+
|
||||
+struct hash_string
|
||||
+{
|
||||
+ char *string;
|
||||
+ unsigned int count;
|
||||
+};
|
||||
+
|
||||
+static unsigned long
|
||||
+string_hash_1 (key)
|
||||
+ const void *key;
|
||||
+{
|
||||
+ return_ISTRING_HASH_1 (((const struct hash_string *) key)->string);
|
||||
+}
|
||||
+
|
||||
+static unsigned long
|
||||
+string_hash_2 (key)
|
||||
+ const void *key;
|
||||
+{
|
||||
+ return_ISTRING_HASH_2 (((const struct hash_string *) key)->string);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+string_hash_cmp (x, y)
|
||||
+ const void *x;
|
||||
+ const void *y;
|
||||
+{
|
||||
+ return_ISTRING_COMPARE (((const struct hash_string *) x)->string,
|
||||
+ ((const struct hash_string *) y)->string);
|
||||
+}
|
||||
+
|
||||
+static struct hash_table strings;
|
||||
+
|
||||
+void
|
||||
+init_hash_strings ()
|
||||
+{
|
||||
+ hash_init (&strings, 1000, string_hash_1, string_hash_2,
|
||||
+ string_hash_cmp);
|
||||
+}
|
||||
+
|
||||
+/* Keep track duplicated string and return the old one if exists. */
|
||||
+
|
||||
+char *
|
||||
+hash_strdup (ptr)
|
||||
+ const char *ptr;
|
||||
+{
|
||||
+ struct hash_string *h, key;
|
||||
+
|
||||
+ if (*ptr == '\0')
|
||||
+ return "";
|
||||
+
|
||||
+ key.string = (char *) ptr;
|
||||
+ key.count = 0;
|
||||
+ h = (struct hash_string *) hash_find_item (&strings, &key);
|
||||
+ if (h == NULL)
|
||||
+ {
|
||||
+ char *result = (char *) malloc (strlen (ptr) + 1);
|
||||
+
|
||||
+ if (result == NULL)
|
||||
+ fatal (NILF, _("virtual memory exhausted"));
|
||||
+
|
||||
+ strcpy (result, ptr);
|
||||
+
|
||||
+ h = (struct hash_string *) malloc (sizeof (struct hash_string));
|
||||
+ if (h == NULL)
|
||||
+ fatal (NILF, _("virtual memory exhausted"));
|
||||
+
|
||||
+ h->string = result;
|
||||
+ h->count = 1;
|
||||
+ hash_insert (&strings, h);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ h->count++;
|
||||
+ assert (h->count != 0);
|
||||
+ }
|
||||
+
|
||||
+ return h->string;
|
||||
+}
|
||||
+
|
||||
+char *
|
||||
+hash_savestring (str, length)
|
||||
+ const char *str;
|
||||
+ unsigned int length;
|
||||
+{
|
||||
+ struct hash_string *h, key;
|
||||
+
|
||||
+ if (length == 0 || *str == '\0')
|
||||
+ return "";
|
||||
+
|
||||
+ key.string = alloca (length + 1);
|
||||
+ key.count = 0;
|
||||
+ bcopy (str, key.string, length);
|
||||
+ key.string [length] = '\0';
|
||||
+
|
||||
+ h = (struct hash_string *) hash_find_item (&strings, &key);
|
||||
+ if (h == NULL)
|
||||
+ {
|
||||
+ char *out = (char *) xmalloc (length + 1);
|
||||
+ bcopy (str, out, length);
|
||||
+ out[length] = '\0';
|
||||
+
|
||||
+ h = (struct hash_string *) malloc (sizeof (struct hash_string));
|
||||
+ if (h == NULL)
|
||||
+ fatal (NILF, _("virtual memory exhausted"));
|
||||
+
|
||||
+ h->string = out;
|
||||
+ h->count = 1;
|
||||
+ hash_insert (&strings, h);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ h->count++;
|
||||
+ assert (h->count != 0);
|
||||
+ }
|
||||
+
|
||||
+ return h->string;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+hash_strfree (ptr)
|
||||
+ char *ptr;
|
||||
+{
|
||||
+ struct hash_string *h, key;
|
||||
+
|
||||
+ if (*ptr == '\0')
|
||||
+ return;
|
||||
+
|
||||
+ key.string = ptr;
|
||||
+ key.count = 0;
|
||||
+ h = (struct hash_string *) hash_find_item (&strings, &key);
|
||||
+
|
||||
+ /* Check if string comes from hash_strdup or hash_savestring. */
|
||||
+ if (h == NULL || h->string != ptr)
|
||||
+ {
|
||||
+ free (ptr);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ h->count--;
|
||||
+ if (h->count == 0)
|
||||
+ {
|
||||
+ struct hash_string *d;
|
||||
+
|
||||
+ d = hash_delete (&strings, h);
|
||||
+ assert (d == h);
|
||||
+ free (h->string);
|
||||
+ free (h);
|
||||
+ }
|
||||
+}
|
||||
Only in make-3.81: misc.c~
|
||||
Only in make-3.81: read.c~
|
@ -1,250 +0,0 @@
|
||||
diff -urpN make/ChangeLog make-new/ChangeLog
|
||||
--- make/ChangeLog 2010-09-13 13:42:35.000000000 +0200
|
||||
+++ make-new/ChangeLog 2010-09-13 13:42:09.000000000 +0200
|
||||
@@ -1,3 +1,22 @@
|
||||
+2010-08-13 Paul Smith <psmith@gnu.org>
|
||||
+
|
||||
+ * NEWS: Accidentally forgot to back out the sorted wildcard
|
||||
+ enhancement in 3.82, so update NEWS.
|
||||
+ Also add NEWS about the error check for explicit and pattern
|
||||
+ targets in the same rule, added to 3.82.
|
||||
+
|
||||
+ * main.c (main): Add "oneshell" to $(.FEATURES) (forgot to add
|
||||
+ this in 3.82!)
|
||||
+
|
||||
+ * read.c (parse_file_seq): Fix various errors parsing archives
|
||||
+ with multiple objects in the parenthesis, as well as wildcards.
|
||||
+ Fixes Savannah bug #30612.
|
||||
+
|
||||
+2010-08-10 Paul Smith <psmith@gnu.org>
|
||||
+
|
||||
+ * main.c (main): Expand MAKEFLAGS before adding it to the
|
||||
+ environment when re-exec'ing. Fixes Savannah bug #30723.
|
||||
+
|
||||
2010-07-28 Paul Smith <psmith@gnu.org>
|
||||
|
||||
Version 3.82 released.
|
||||
diff -urpN make/main.c make-new/main.c
|
||||
--- make/main.c 2010-09-13 13:42:35.000000000 +0200
|
||||
+++ make-new/main.c 2010-09-13 13:42:12.000000000 +0200
|
||||
@@ -1138,7 +1138,7 @@ main (int argc, char **argv, char **envp
|
||||
a macro and some compilers (MSVC) don't like conditionals in macros. */
|
||||
{
|
||||
const char *features = "target-specific order-only second-expansion"
|
||||
- " else-if shortest-stem undefine"
|
||||
+ " else-if shortest-stem undefine oneshell"
|
||||
#ifndef NO_ARCHIVES
|
||||
" archives"
|
||||
#endif
|
||||
@@ -2093,7 +2093,7 @@ main (int argc, char **argv, char **envp
|
||||
const char *pv = define_makeflags (1, 1);
|
||||
char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
|
||||
sprintf (p, "MAKEFLAGS=%s", pv);
|
||||
- putenv (p);
|
||||
+ putenv (allocated_variable_expand (p));
|
||||
}
|
||||
|
||||
if (ISDB (DB_BASIC))
|
||||
diff -urpN make/NEWS make-new/NEWS
|
||||
--- make/NEWS 2010-09-13 13:42:35.000000000 +0200
|
||||
+++ make-new/NEWS 2010-09-13 13:42:11.000000000 +0200
|
||||
@@ -18,14 +18,6 @@ http://sv.gnu.org/bugs/index.php?group=m
|
||||
* Compiling GNU make now requires a conforming ISO C 1989 compiler and
|
||||
standard runtime library.
|
||||
|
||||
-* WARNING: Future backward-incompatibility!
|
||||
- Wildcards are not documented as returning sorted values, but up to and
|
||||
- including this release the results have been sorted and some makefiles are
|
||||
- apparently depending on that. In the next release of GNU make, for
|
||||
- performance reasons, we may remove that sorting. If your makefiles
|
||||
- require sorted results from wildcard expansions, use the $(sort ...)
|
||||
- function to request it explicitly.
|
||||
-
|
||||
* WARNING: Backward-incompatibility!
|
||||
The POSIX standard for make was changed in the 2008 version in a
|
||||
fundamentally incompatible way: make is required to invoke the shell as if
|
||||
@@ -42,6 +34,21 @@ http://sv.gnu.org/bugs/index.php?group=m
|
||||
existing targets were provided in $?).
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
+ Wildcards were not documented as returning sorted values, but the results
|
||||
+ have been sorted up until this release.. If your makefiles require sorted
|
||||
+ results from wildcard expansions, use the $(sort ...) function to request
|
||||
+ 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
|
||||
diff -urpN make/read.c make-new/read.c
|
||||
--- make/read.c 2010-09-13 13:42:35.000000000 +0200
|
||||
+++ make-new/read.c 2010-09-13 13:42:11.000000000 +0200
|
||||
@@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned
|
||||
{
|
||||
/* This looks like the first element in an open archive group.
|
||||
A valid group MUST have ')' as the last character. */
|
||||
- const char *e = p + nlen;
|
||||
+ const char *e = p;
|
||||
do
|
||||
{
|
||||
e = next_token (e);
|
||||
@@ -3084,19 +3084,19 @@ parse_file_seq (char **stringp, unsigned
|
||||
Go to the next item in the string. */
|
||||
if (flags & PARSEFS_NOGLOB)
|
||||
{
|
||||
- NEWELT (concat (2, prefix, tp));
|
||||
+ NEWELT (concat (2, prefix, tmpbuf));
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If we get here we know we're doing glob expansion.
|
||||
TP is a string in tmpbuf. NLEN is no longer used.
|
||||
We may need to do more work: after this NAME will be set. */
|
||||
- name = tp;
|
||||
+ name = tmpbuf;
|
||||
|
||||
/* Expand tilde if applicable. */
|
||||
- if (tp[0] == '~')
|
||||
+ if (tmpbuf[0] == '~')
|
||||
{
|
||||
- tildep = tilde_expand (tp);
|
||||
+ tildep = tilde_expand (tmpbuf);
|
||||
if (tildep != 0)
|
||||
name = tildep;
|
||||
}
|
||||
@@ -3152,7 +3152,10 @@ parse_file_seq (char **stringp, unsigned
|
||||
else
|
||||
{
|
||||
/* We got a chain of items. Attach them. */
|
||||
- (*newp)->next = found;
|
||||
+ if (*newp)
|
||||
+ (*newp)->next = found;
|
||||
+ else
|
||||
+ *newp = found;
|
||||
|
||||
/* Find and set the new end. Massage names if necessary. */
|
||||
while (1)
|
||||
diff -urpN make/tests/ChangeLog make-new/tests/ChangeLog
|
||||
--- make/tests/ChangeLog 2010-09-13 13:42:35.000000000 +0200
|
||||
+++ make-new/tests/ChangeLog 2010-09-13 13:42:10.000000000 +0200
|
||||
@@ -1,3 +1,16 @@
|
||||
+2010-08-13 Paul Smith <psmith@gnu.org>
|
||||
+
|
||||
+ * scripts/features/archives: New regression tests for archive
|
||||
+ support. Test for fix to Savannah bug #30612.
|
||||
+
|
||||
+ * run_make_tests.pl (set_more_defaults): Set a %FEATURES hash to
|
||||
+ the features available in $(.FEATURES).
|
||||
+
|
||||
+2010-08-10 Paul Smith <psmith@gnu.org>
|
||||
+
|
||||
+ * scripts/features/reinvoke: Ensure command line variable settings
|
||||
+ are preserved across make re-exec. Tests Savannah bug #30723.
|
||||
+
|
||||
2010-07-28 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* scripts/targets/POSIX: Compatibility issues with Solaris (and
|
||||
diff -urpN make/tests/run_make_tests.pl make-new/tests/run_make_tests.pl
|
||||
--- make/tests/run_make_tests.pl 2010-09-13 13:42:35.000000000 +0200
|
||||
+++ make-new/tests/run_make_tests.pl 2010-09-13 13:42:10.000000000 +0200
|
||||
@@ -29,6 +29,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/>.
|
||||
|
||||
+%FEATURES = ();
|
||||
|
||||
$valgrind = 0; # invoke make with valgrind
|
||||
$valgrind_args = '';
|
||||
@@ -367,6 +368,8 @@ sub set_more_defaults
|
||||
$parallel_jobs = 1;
|
||||
}
|
||||
|
||||
+ %FEATURES = map { $_ => 1 } split /\s+/, `sh -c "echo '\\\$(info \\\$(.FEATURES))' | $make_path -f- 2>/dev/null"`;
|
||||
+
|
||||
# Set up for valgrind, if requested.
|
||||
|
||||
if ($valgrind) {
|
||||
diff -urpN make/tests/scripts/features/archives make-new/tests/scripts/features/archives
|
||||
--- make/tests/scripts/features/archives 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ make-new/tests/scripts/features/archives 2010-09-13 13:42:10.000000000 +0200
|
||||
@@ -0,0 +1,42 @@
|
||||
+# -*-mode: perl-*-
|
||||
+
|
||||
+$description = "Test GNU make's archive management features.";
|
||||
+
|
||||
+$details = "\
|
||||
+This only works on systems that support it.";
|
||||
+
|
||||
+# If this instance of make doesn't support archives, skip it
|
||||
+exists $FEATURES{archives} or return -1;
|
||||
+
|
||||
+# Create some .o files to work with
|
||||
+utouch(-60, qw(a1.o a2.o a3.o));
|
||||
+
|
||||
+# Very simple
|
||||
+run_make_test('all: libxx.a(a1.o)',
|
||||
+ '', "ar rv libxx.a a1.o\nar: creating libxx.a\na - a1.o\n");
|
||||
+
|
||||
+# Multiple .o's. Add a new one to the existing library
|
||||
+run_make_test('all: libxx.a(a1.o a2.o)',
|
||||
+ '', "ar rv libxx.a a2.o\na - a2.o\n");
|
||||
+
|
||||
+# Touch one of the .o's so it's rebuilt
|
||||
+utouch(-40, 'a1.o');
|
||||
+run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n");
|
||||
+
|
||||
+# Use wildcards
|
||||
+run_make_test('all: libxx.a(*.o)',
|
||||
+ '', "#MAKE#: Nothing to be done for `all'.\n");
|
||||
+
|
||||
+# Touch one of the .o's so it's rebuilt
|
||||
+utouch(-30, 'a1.o');
|
||||
+run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n");
|
||||
+
|
||||
+# Use both wildcards and simple names
|
||||
+utouch(-50, 'a2.o');
|
||||
+run_make_test('all: libxx.a(a3.o *.o)', '',
|
||||
+ "ar rv libxx.a a3.o\na - a3.o\nar rv libxx.a a2.o\nr - a2.o\n");
|
||||
+
|
||||
+rmfiles(qw(a1.o a2.o a3.o libxx.a));
|
||||
+
|
||||
+# This tells the test driver that the perl test script executed properly.
|
||||
+1;
|
||||
diff -urpN make/tests/scripts/features/reinvoke make-new/tests/scripts/features/reinvoke
|
||||
--- make/tests/scripts/features/reinvoke 2010-09-13 13:42:35.000000000 +0200
|
||||
+++ make-new/tests/scripts/features/reinvoke 2010-09-13 13:42:10.000000000 +0200
|
||||
@@ -57,9 +57,24 @@ include $(F)',
|
||||
# Now try with the file we're not updating being the actual file we're
|
||||
# including: this and the previous one test different parts of the code.
|
||||
|
||||
-run_make_test(undef, "F=b", "[ -f b ] || echo >> b\nhello\n")
|
||||
+run_make_test(undef, 'F=b', "[ -f b ] || echo >> b\nhello\n")
|
||||
|
||||
&rmfiles('a','b','c');
|
||||
|
||||
+# Ensure command line variables are preserved properly across re-exec
|
||||
+# Tests for Savannah bug #30723
|
||||
+
|
||||
+run_make_test('
|
||||
+ifdef RECURSE
|
||||
+-include foo30723
|
||||
+endif
|
||||
+recurse: ; @$(MAKE) -f $(MAKEFILE_LIST) RECURSE=1 test
|
||||
+test: ; @echo F.O=$(F.O)
|
||||
+foo30723: ; @touch $@
|
||||
+',
|
||||
+ '--no-print-directory F.O=bar', "F.O=bar\n");
|
||||
+
|
||||
+unlink('foo30723');
|
||||
+
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
@ -1,77 +0,0 @@
|
||||
From 2f661dc20617ba6fdeb2d7e243dc898653faafea Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Tue, 26 Apr 2011 21:50:26 +0200
|
||||
Subject: [PATCH] Always copy the string before expanding it
|
||||
|
||||
It might get freed during expansion, e.g. with eval function.
|
||||
A simple reproducer:
|
||||
|
||||
TRUE = $(eval TRUE := true)
|
||||
all:
|
||||
$(TRUE)
|
||||
---
|
||||
ChangeLog | 5 +++++
|
||||
expand.c | 18 +++++++++---------
|
||||
2 files changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index 91878fb..7519164 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2011-04-26 Lubomir Rintel <lkundrak@v3.sk>
|
||||
+
|
||||
+ * expand.c (variable_expand_string): Always copy the string
|
||||
+ to expand.
|
||||
+
|
||||
2010-08-13 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* NEWS: Accidentally forgot to back out the sorted wildcard
|
||||
diff --git a/expand.c b/expand.c
|
||||
index 2315b06..3e6e346 100644
|
||||
--- a/expand.c
|
||||
+++ b/expand.c
|
||||
@@ -197,7 +197,7 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
{
|
||||
struct variable *v;
|
||||
const char *p, *p1;
|
||||
- char *abuf = NULL;
|
||||
+ char *abuf;
|
||||
char *o;
|
||||
unsigned int line_offset;
|
||||
|
||||
@@ -214,14 +214,15 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
|
||||
/* If we want a subset of the string, allocate a temporary buffer for it.
|
||||
Most of the functions we use here don't work with length limits. */
|
||||
- if (length > 0 && string[length] != '\0')
|
||||
+ if (length == -1)
|
||||
{
|
||||
- abuf = xmalloc(length+1);
|
||||
- memcpy(abuf, string, length);
|
||||
- abuf[length] = '\0';
|
||||
- string = abuf;
|
||||
+ length = strlen (string);
|
||||
}
|
||||
- p = string;
|
||||
+
|
||||
+ abuf = xmalloc(length+1);
|
||||
+ memcpy(abuf, string, length);
|
||||
+ abuf[length] = '\0';
|
||||
+ p = abuf;
|
||||
|
||||
while (1)
|
||||
{
|
||||
@@ -411,8 +412,7 @@ variable_expand_string (char *line, const char *string, long length)
|
||||
++p;
|
||||
}
|
||||
|
||||
- if (abuf)
|
||||
- free (abuf);
|
||||
+ free (abuf);
|
||||
|
||||
variable_buffer_output (o, "", 1);
|
||||
return (variable_buffer + line_offset);
|
||||
--
|
||||
1.7.4.1
|
||||
|
@ -1,57 +0,0 @@
|
||||
2012-09-09 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* remake.c (update_file_1): Force intermediate files to be
|
||||
considered, not pruned, if their non-intermediate parent needs to
|
||||
be remade. Fixes Savannah bug #30653.
|
||||
|
||||
Index: remake.c
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/remake.c,v
|
||||
retrieving revision 1.153
|
||||
retrieving revision 1.154
|
||||
diff -u -r1.153 -r1.154
|
||||
--- remake.c 5 Mar 2012 14:10:45 -0000 1.153
|
||||
+++ remake.c 10 Sep 2012 02:36:05 -0000 1.154
|
||||
@@ -612,6 +612,10 @@
|
||||
d->file->dontcare = file->dontcare;
|
||||
}
|
||||
|
||||
+ /* 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;
|
||||
|
||||
dep_status |= update_file (d->file, depth);
|
||||
|
||||
Index: tests/scripts/features/parallelism
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/tests/scripts/features/parallelism,v
|
||||
retrieving revision 1.19
|
||||
retrieving revision 1.20
|
||||
diff -u -r1.19 -r1.20
|
||||
--- tests/scripts/features/parallelism 4 Mar 2012 00:24:32 -0000 1.19
|
||||
+++ tests/scripts/features/parallelism 10 Sep 2012 02:36:05 -0000 1.20
|
||||
@@ -214,6 +214,23 @@
|
||||
rmfiles(qw(foo.y foo.y.in main.bar));
|
||||
}
|
||||
|
||||
+# Ensure intermediate/secondary files are not pruned incorrectly.
|
||||
+# See Savannah bug #30653
|
||||
+
|
||||
+utouch(-15, 'file2');
|
||||
+utouch(-10, 'file4');
|
||||
+utouch(-5, 'file1');
|
||||
+
|
||||
+run_make_test(q!
|
||||
+.INTERMEDIATE: file3
|
||||
+file4: file3 ; @mv -f $< $@
|
||||
+file3: file2 ; touch $@
|
||||
+file2: file1 ; @touch $@
|
||||
+!,
|
||||
+ '--no-print-directory -j2', "touch file3");
|
||||
+
|
||||
+#rmfiles('file1', 'file2', 'file3', 'file4');
|
||||
+
|
||||
if ($all_tests) {
|
||||
# Jobserver FD handling is messed up in some way.
|
||||
# Savannah bug #28189
|
@ -1,157 +0,0 @@
|
||||
diff -urp make-3.82/misc.c make-3.82-pm/misc.c
|
||||
--- make-3.82/misc.c 2010-07-19 09:10:54.000000000 +0200
|
||||
+++ make-3.82-pm/misc.c 2010-08-11 15:26:45.000000000 +0200
|
||||
@@ -342,17 +342,31 @@ strerror (int errnum)
|
||||
/* Print an error message from errno. */
|
||||
|
||||
void
|
||||
+perror_with_name_err (const char *str, const char *name, int errnum)
|
||||
+{
|
||||
+ error (NILF, _("%s%s: %s"), str, name, strerror (errnum));
|
||||
+}
|
||||
+
|
||||
+void
|
||||
perror_with_name (const char *str, const char *name)
|
||||
{
|
||||
- error (NILF, _("%s%s: %s"), str, name, strerror (errno));
|
||||
+ perror_with_name_err (str, name, errno);
|
||||
}
|
||||
|
||||
/* Print an error message from errno and exit. */
|
||||
|
||||
void
|
||||
+pfatal_with_name_err (const char *name, int errnum)
|
||||
+{
|
||||
+ fatal (NILF, _("%s: %s"), name, strerror (errnum));
|
||||
+
|
||||
+ /* NOTREACHED */
|
||||
+}
|
||||
+
|
||||
+void
|
||||
pfatal_with_name (const char *name)
|
||||
{
|
||||
- fatal (NILF, _("%s: %s"), name, strerror (errno));
|
||||
+ pfatal_with_name_err (name, errno);
|
||||
|
||||
/* NOTREACHED */
|
||||
}
|
||||
diff -urp make-3.82/main.c make-3.82-pm/main.c
|
||||
--- make-3.82/main.c 2010-08-11 15:34:12.000000000 +0200
|
||||
+++ make-3.82-pm/main.c 2010-08-11 15:30:11.000000000 +0200
|
||||
@@ -1536,13 +1536,13 @@ main (int argc, char **argv, char **envp
|
||||
strcat (template, DEFAULT_TMPFILE);
|
||||
outfile = open_tmpfile (&stdin_nm, template);
|
||||
if (outfile == 0)
|
||||
- pfatal_with_name (_("fopen (temporary file)"));
|
||||
+ pfatal_with_name_err (_("fopen (temporary file)"), errno);
|
||||
while (!feof (stdin) && ! ferror (stdin))
|
||||
{
|
||||
char buf[2048];
|
||||
unsigned int n = fread (buf, 1, sizeof (buf), stdin);
|
||||
if (n > 0 && fwrite (buf, 1, n, outfile) != n)
|
||||
- pfatal_with_name (_("fwrite (temporary file)"));
|
||||
+ pfatal_with_name_err (_("fwrite (temporary file)"), errno);
|
||||
}
|
||||
fclose (outfile);
|
||||
|
||||
@@ -1747,7 +1747,7 @@ main (int argc, char **argv, char **envp
|
||||
else if ((job_rfd = dup (job_fds[0])) < 0)
|
||||
{
|
||||
if (errno != EBADF)
|
||||
- pfatal_with_name (_("dup jobserver"));
|
||||
+ pfatal_with_name_err (_("dup jobserver"), errno);
|
||||
|
||||
error (NILF,
|
||||
_("warning: jobserver unavailable: using -j1. Add `+' to parent make rule."));
|
||||
@@ -1788,7 +1788,7 @@ main (int argc, char **argv, char **envp
|
||||
char c = '+';
|
||||
|
||||
if (pipe (job_fds) < 0 || (job_rfd = dup (job_fds[0])) < 0)
|
||||
- pfatal_with_name (_("creating jobs pipe"));
|
||||
+ pfatal_with_name_err (_("creating jobs pipe"), errno);
|
||||
|
||||
/* Every make assumes that it always has one job it can run. For the
|
||||
submakes it's the token they were given by their parent. For the
|
||||
@@ -1803,7 +1803,7 @@ main (int argc, char **argv, char **envp
|
||||
|
||||
EINTRLOOP (r, write (job_fds[1], &c, 1));
|
||||
if (r != 1)
|
||||
- pfatal_with_name (_("init jobserver pipe"));
|
||||
+ pfatal_with_name_err (_("init jobserver pipe"), errno);
|
||||
}
|
||||
|
||||
/* Fill in the jobserver_fds struct for our children. */
|
||||
@@ -2226,7 +2226,7 @@ main (int argc, char **argv, char **envp
|
||||
/* If there is a temp file from reading a makefile from stdin, get rid of
|
||||
it now. */
|
||||
if (stdin_nm && unlink (stdin_nm) < 0 && errno != ENOENT)
|
||||
- perror_with_name (_("unlink (temporary file): "), stdin_nm);
|
||||
+ perror_with_name_err (_("unlink (temporary file): "), stdin_nm, errno);
|
||||
|
||||
/* If there were no command-line goals, use the default. */
|
||||
if (goals == 0)
|
||||
Только в make-3.82-pm: job.c~
|
||||
Только в make-3.82-pm: main.c~
|
||||
diff -urp make-3.82/make.h make-3.82-pm/make.h
|
||||
--- make-3.82/make.h 2010-08-11 15:34:12.000000000 +0200
|
||||
+++ make-3.82-pm/make.h 2010-08-11 15:31:26.000000000 +0200
|
||||
@@ -385,6 +385,8 @@ void die (int) __attribute__ ((noreturn)
|
||||
void log_working_directory (int);
|
||||
void pfatal_with_name (const char *) __attribute__ ((noreturn));
|
||||
void perror_with_name (const char *, const char *);
|
||||
+void pfatal_with_name_err (const char *, int errnum) __attribute__ ((noreturn));
|
||||
+void perror_with_name_err (const char *, const char *, int errnum);
|
||||
void *xmalloc (unsigned int);
|
||||
void *xcalloc (unsigned int);
|
||||
void *xrealloc (void *, unsigned int);
|
||||
diff -urp make-3.82/job.c make-3.82-pm/job.c
|
||||
--- make-3.82/job.c 2010-07-24 10:27:50.000000000 +0200
|
||||
+++ make-3.82-pm/job.c 2010-08-11 15:33:54.000000000 +0200
|
||||
@@ -917,7 +917,7 @@ free_child (struct child *child)
|
||||
|
||||
EINTRLOOP (r, write (job_fds[1], &token, 1));
|
||||
if (r != 1)
|
||||
- pfatal_with_name (_("write jobserver"));
|
||||
+ pfatal_with_name_err (_("write jobserver"), errno);
|
||||
|
||||
DB (DB_JOBS, (_("Released token for child %p (%s).\n"),
|
||||
child, child->file->name));
|
||||
@@ -1768,6 +1768,7 @@ new_job (struct file *file)
|
||||
|
||||
/* Set interruptible system calls, and read() for a job token. */
|
||||
set_child_handler_action_flags (1, waiting_jobs != NULL);
|
||||
+ errno = 0;
|
||||
got_token = read (job_rfd, &token, 1);
|
||||
saved_errno = errno;
|
||||
set_child_handler_action_flags (0, waiting_jobs != NULL);
|
||||
@@ -1782,10 +1783,14 @@ new_job (struct file *file)
|
||||
|
||||
/* If the error _wasn't_ expected (EINTR or EBADF), punt. Otherwise,
|
||||
go back and reap_children(), and try again. */
|
||||
- errno = saved_errno;
|
||||
- if (errno != EINTR && errno != EBADF)
|
||||
- pfatal_with_name (_("read jobs pipe"));
|
||||
- if (errno == EBADF)
|
||||
+ if (saved_errno != EINTR && saved_errno != EBADF)
|
||||
+ {
|
||||
+ if (got_token == 0)
|
||||
+ fatal (NILF, _("read jobs pipe EOF"));
|
||||
+ else
|
||||
+ pfatal_with_name_err (_("read jobs pipe"), saved_errno);
|
||||
+ }
|
||||
+ if (saved_errno == EBADF)
|
||||
DB (DB_JOBS, ("Read returned EBADF.\n"));
|
||||
}
|
||||
#endif
|
||||
@@ -1909,7 +1914,8 @@ load_too_high (void)
|
||||
error (NILF,
|
||||
_("cannot enforce load limits on this operating system"));
|
||||
else
|
||||
- perror_with_name (_("cannot enforce load limit: "), "getloadavg");
|
||||
+ perror_with_name_err (_("cannot enforce load limit: "),
|
||||
+ "getloadavg", errno);
|
||||
}
|
||||
lossage = errno;
|
||||
load = 0;
|
||||
Только в make-3.82-pm: make.h~
|
||||
Только в make-3.82-pm: misc.c.orig
|
@ -1,116 +0,0 @@
|
||||
Index: read.c
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/read.c,v
|
||||
retrieving revision 1.198
|
||||
retrieving revision 1.200
|
||||
diff -u -r1.198 -r1.200
|
||||
--- read.c 29 Apr 2011 15:27:39 -0000 1.198
|
||||
+++ read.c 7 May 2011 14:36:12 -0000 1.200
|
||||
@@ -2901,6 +2901,7 @@
|
||||
const char *name;
|
||||
const char **nlist = 0;
|
||||
char *tildep = 0;
|
||||
+ int globme = 1;
|
||||
#ifndef NO_ARCHIVES
|
||||
char *arname = 0;
|
||||
char *memname = 0;
|
||||
@@ -3109,32 +3110,40 @@
|
||||
}
|
||||
#endif /* !NO_ARCHIVES */
|
||||
|
||||
- switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl))
|
||||
- {
|
||||
- case GLOB_NOSPACE:
|
||||
- fatal (NILF, _("virtual memory exhausted"));
|
||||
-
|
||||
- case 0:
|
||||
- /* Success. */
|
||||
- i = gl.gl_pathc;
|
||||
- nlist = (const char **)gl.gl_pathv;
|
||||
- break;
|
||||
-
|
||||
- case GLOB_NOMATCH:
|
||||
- /* If we want only existing items, skip this one. */
|
||||
- if (flags & PARSEFS_EXISTS)
|
||||
- {
|
||||
- i = 0;
|
||||
- break;
|
||||
- }
|
||||
- /* FALLTHROUGH */
|
||||
-
|
||||
- default:
|
||||
- /* By default keep this name. */
|
||||
+ /* glob() is expensive: don't call it unless we need to. */
|
||||
+ if (!(flags & PARSEFS_EXISTS) && strpbrk (name, "?*[") == NULL)
|
||||
+ {
|
||||
+ globme = 0;
|
||||
i = 1;
|
||||
nlist = &name;
|
||||
- break;
|
||||
- }
|
||||
+ }
|
||||
+ else
|
||||
+ switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl))
|
||||
+ {
|
||||
+ case GLOB_NOSPACE:
|
||||
+ fatal (NILF, _("virtual memory exhausted"));
|
||||
+
|
||||
+ case 0:
|
||||
+ /* Success. */
|
||||
+ i = gl.gl_pathc;
|
||||
+ nlist = (const char **)gl.gl_pathv;
|
||||
+ break;
|
||||
+
|
||||
+ case GLOB_NOMATCH:
|
||||
+ /* If we want only existing items, skip this one. */
|
||||
+ if (flags & PARSEFS_EXISTS)
|
||||
+ {
|
||||
+ i = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ /* FALLTHROUGH */
|
||||
+
|
||||
+ default:
|
||||
+ /* By default keep this name. */
|
||||
+ i = 1;
|
||||
+ nlist = &name;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
/* For each matched element, add it to the list. */
|
||||
while (i-- > 0)
|
||||
@@ -3174,7 +3183,8 @@
|
||||
#endif /* !NO_ARCHIVES */
|
||||
NEWELT (concat (2, prefix, nlist[i]));
|
||||
|
||||
- globfree (&gl);
|
||||
+ if (globme)
|
||||
+ globfree (&gl);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (arname)
|
||||
Index: tests/scripts/functions/wildcard
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/tests/scripts/functions/wildcard,v
|
||||
retrieving revision 1.6
|
||||
retrieving revision 1.7
|
||||
diff -u -r1.6 -r1.7
|
||||
--- tests/scripts/functions/wildcard 13 Jun 2009 21:21:49 -0000 1.6
|
||||
+++ tests/scripts/functions/wildcard 7 May 2011 14:36:11 -0000 1.7
|
||||
@@ -88,4 +88,16 @@
|
||||
!,
|
||||
'', "\n");
|
||||
|
||||
+# TEST #5: wildcard used to verify file existence
|
||||
+
|
||||
+touch('xxx.yyy');
|
||||
+
|
||||
+run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
|
||||
+ '', "file=xxx.yyy\n");
|
||||
+
|
||||
+unlink('xxx.yyy');
|
||||
+
|
||||
+run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
|
||||
+ '', "file=\n");
|
||||
+
|
||||
1;
|
@ -1,14 +0,0 @@
|
||||
diff -up make-3.82/make.h\~ make-3.82/make.h
|
||||
--- make-3.82/make.h~ 2010-07-20 15:12:06.000000000 +0200
|
||||
+++ make-3.82/make.h 2010-08-11 15:19:09.000000000 +0200
|
||||
@@ -472,7 +472,7 @@ long int lseek ();
|
||||
#endif /* Not GNU C library or POSIX. */
|
||||
|
||||
#ifdef HAVE_GETCWD
|
||||
-# if !defined(VMS) && !defined(__DECC)
|
||||
+# if !defined(VMS) && !defined(__DECC) && !defined(getcwd)
|
||||
char *getcwd ();
|
||||
# endif
|
||||
#else
|
||||
|
||||
Diff finished. Wed Aug 11 15:19:12 2010
|
@ -1,26 +0,0 @@
|
||||
diff -up make-3.82/main.c\~ make-3.82/main.c
|
||||
--- make-3.82/main.c~ 2010-07-19 09:10:53.000000000 +0200
|
||||
+++ make-3.82/main.c 2010-08-11 15:12:09.000000000 +0200
|
||||
@@ -1765,6 +1765,20 @@ main (int argc, char **argv, char **envp
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef PIPE_BUF
|
||||
+ if (job_slots > PIPE_BUF)
|
||||
+#elif defined _POSIX_PIPE_BUF
|
||||
+ if (job_slots > _POSIX_PIPE_BUF)
|
||||
+#else
|
||||
+ if (job_slots > 512)
|
||||
+#endif
|
||||
+ {
|
||||
+ error (NILF,
|
||||
+ _("More parallel jobs (-jN) than this platform can handle requested."));
|
||||
+ error (NILF, _("Resetting to single job (-j1) mode."));
|
||||
+ job_slots = 1;
|
||||
+ }
|
||||
+
|
||||
/* If we have >1 slot but no jobserver-fds, then we're a top-level make.
|
||||
Set up the pipe and install the fds option for our children. */
|
||||
|
||||
|
||||
Diff finished. Wed Aug 11 15:12:32 2010
|
@ -1,19 +0,0 @@
|
||||
diff -up make-3.82/main.c\~ make-3.82/main.c
|
||||
--- make-3.82/main.c~ 2010-08-12 14:59:20.000000000 +0200
|
||||
+++ make-3.82/main.c 2010-08-12 15:00:07.000000000 +0200
|
||||
@@ -1756,8 +1756,11 @@ main (int argc, char **argv, char **envp
|
||||
|
||||
if (job_slots > 0)
|
||||
{
|
||||
- close (job_fds[0]);
|
||||
- close (job_fds[1]);
|
||||
+ if (restarts == 0)
|
||||
+ {
|
||||
+ close (job_fds[0]);
|
||||
+ close (job_fds[1]);
|
||||
+ }
|
||||
job_fds[0] = job_fds[1] = -1;
|
||||
free (jobserver_fds->list);
|
||||
free (jobserver_fds);
|
||||
|
||||
Diff finished. Thu Aug 12 15:00:22 2010
|
@ -1,30 +0,0 @@
|
||||
diff -up make-3.82/job.c\~ make-3.82/job.c
|
||||
--- make-3.82/job.c~ 2010-08-12 14:57:15.000000000 +0200
|
||||
+++ make-3.82/job.c 2010-08-12 14:58:23.000000000 +0200
|
||||
@@ -2876,7 +2876,7 @@ construct_command_argv_internal (char *l
|
||||
}
|
||||
|
||||
new_line = alloca (shell_len + 1 + sflags_len + 1
|
||||
- + (line_len*2) + 1);
|
||||
+ + (line_len*4) + 1);
|
||||
ap = new_line;
|
||||
memcpy (ap, shell, shell_len);
|
||||
ap += shell_len;
|
||||
@@ -2904,13 +2904,14 @@ construct_command_argv_internal (char *l
|
||||
#endif
|
||||
if (PRESERVE_BSNL)
|
||||
{
|
||||
- *(ap++) = '\\';
|
||||
+ *(ap++) = '\'';
|
||||
/* Only non-batch execution needs another backslash,
|
||||
because it will be passed through a recursive
|
||||
invocation of this function. */
|
||||
if (!batch_mode_shell)
|
||||
*(ap++) = '\\';
|
||||
*(ap++) = '\n';
|
||||
+ *(ap++) = '\'';
|
||||
}
|
||||
++p;
|
||||
continue;
|
||||
|
||||
Diff finished. Thu Aug 12 14:58:34 2010
|
@ -1,30 +0,0 @@
|
||||
Index: main.c
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/main.c,v
|
||||
retrieving revision 1.247
|
||||
retrieving revision 1.246
|
||||
diff -u -r1.247 -r1.246
|
||||
--- main.c 18 Sep 2011 23:39:26 -0000 1.247
|
||||
+++ main.c 29 Aug 2010 23:05:27 -0000 1.246
|
||||
@@ -2089,6 +2089,11 @@
|
||||
|
||||
++restarts;
|
||||
|
||||
+ /* If we're re-exec'ing the first make, put back the number of
|
||||
+ job slots so define_makefiles() will get it right. */
|
||||
+ if (master_job_slots)
|
||||
+ job_slots = master_job_slots;
|
||||
+
|
||||
/* Reset makeflags in case they were changed. */
|
||||
{
|
||||
const char *pv = define_makeflags (1, 1);
|
||||
@@ -2830,9 +2825,6 @@
|
||||
&& (*(unsigned int *) cs->value_ptr ==
|
||||
*(unsigned int *) cs->noarg_value))
|
||||
ADD_FLAG ("", 0); /* Optional value omitted; see below. */
|
||||
- else if (cs->c == 'j')
|
||||
- /* Special case for `-j'. */
|
||||
- ADD_FLAG ("1", 1);
|
||||
else
|
||||
{
|
||||
char *buf = alloca (30);
|
@ -1,22 +0,0 @@
|
||||
diff -urp make-3.82/function.c make-3.82-pm/function.c
|
||||
--- make-3.82/function.c 2010-07-13 03:20:39.000000000 +0200
|
||||
+++ make-3.82-pm/function.c 2010-10-27 01:43:27.000000000 +0200
|
||||
@@ -1138,12 +1138,12 @@ func_sort (char *o, char **argv, const c
|
||||
{
|
||||
char c = *(t++);
|
||||
|
||||
- if (! isspace ((unsigned char)c))
|
||||
+ if (! isblank ((unsigned char)c))
|
||||
continue;
|
||||
|
||||
++wordi;
|
||||
|
||||
- while (isspace ((unsigned char)*t))
|
||||
+ while (isblank ((unsigned char)*t))
|
||||
++t;
|
||||
}
|
||||
|
||||
Только в make-3.82-pm: function.c~
|
||||
Двоичные файлы make-3.82/function.o и make-3.82-pm/function.o различаются
|
||||
Двоичные файлы make-3.82/make и make-3.82-pm/make различаются
|
||||
Только в make-3.82-pm: misc.c~
|
@ -1,111 +0,0 @@
|
||||
|
||||
This patch add the support for --debug=c and --debug=e to make
|
||||
this option when activated will trace in stdout the activity of $(call and $(eval in the Makefile
|
||||
|
||||
The trace use the format:
|
||||
### xxx -->
|
||||
### xxx <--
|
||||
the number of space before ### is at least 1 and increase with the nesting of eval/call
|
||||
|
||||
usage: make --debug=c,e
|
||||
|
||||
diff -r -u make-3.82/debug.h make-3.82-lo_trace/debug.h
|
||||
--- make-3.82/debug.h 2010-07-12 20:20:38.000000000 -0500
|
||||
+++ make-3.82-lo_trace/debug.h 2011-06-22 12:06:37.000000000 -0500
|
||||
@@ -21,6 +21,8 @@
|
||||
#define DB_JOBS (0x004)
|
||||
#define DB_IMPLICIT (0x008)
|
||||
#define DB_MAKEFILES (0x100)
|
||||
+#define DB_CALL (0x01000)
|
||||
+#define DB_EVAL (0x02000)
|
||||
|
||||
#define DB_ALL (0xfff)
|
||||
|
||||
diff -r -u make-3.82/function.c make-3.82-lo_trace/function.c
|
||||
--- make-3.82/function.c 2011-06-23 01:01:35.000000000 -0500
|
||||
+++ make-3.82-lo_trace/function.c 2011-06-23 01:40:05.000000000 -0500
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "amiga.h"
|
||||
#endif
|
||||
|
||||
+static int depth = 0;
|
||||
+
|
||||
|
||||
struct function_table_entry
|
||||
{
|
||||
@@ -1371,7 +1373,12 @@
|
||||
|
||||
install_variable_buffer (&buf, &len);
|
||||
|
||||
+ depth += 1;
|
||||
+ DBS( DB_EVAL, ("### eval -->\n"));
|
||||
+ DB( DB_EVAL, ("%s\n", argv[0]));
|
||||
eval_buffer (argv[0]);
|
||||
+ DBS( DB_EVAL, ("### eval <--\n"));
|
||||
+ depth -= 1;
|
||||
|
||||
restore_variable_buffer (buf, len);
|
||||
|
||||
@@ -2338,6 +2345,7 @@
|
||||
if (v == 0 || *v->value == '\0')
|
||||
return o;
|
||||
|
||||
+ depth += 1;
|
||||
body = alloca (flen + 4);
|
||||
body[0] = '$';
|
||||
body[1] = '(';
|
||||
@@ -2345,6 +2353,7 @@
|
||||
body[flen+2] = ')';
|
||||
body[flen+3] = '\0';
|
||||
|
||||
+ DBS(DB_CALL, ("### call %s -->\n", body));
|
||||
/* Set up arguments $(1) .. $(N). $(0) is the function name. */
|
||||
|
||||
push_new_variable_scope ();
|
||||
@@ -2354,6 +2363,7 @@
|
||||
char num[11];
|
||||
|
||||
sprintf (num, "%d", i);
|
||||
+ DBS(DB_CALL, ("### arg %i for call %s is '%s'\n", i, body, *argv));
|
||||
define_variable (num, strlen (num), *argv, o_automatic, 0);
|
||||
}
|
||||
|
||||
@@ -2367,6 +2377,7 @@
|
||||
char num[11];
|
||||
|
||||
sprintf (num, "%d", i);
|
||||
+ DBS(DB_CALL, ("### arg %i for call %s is implicit\n", i, body));
|
||||
define_variable (num, strlen (num), "", o_automatic, 0);
|
||||
}
|
||||
|
||||
@@ -2377,7 +2388,14 @@
|
||||
|
||||
saved_args = max_args;
|
||||
max_args = i;
|
||||
+
|
||||
o = variable_expand_string (o, body, flen+3);
|
||||
+ DBS(DB_CALL, ("### call to %s expended into\n", body));
|
||||
+ DB(DB_CALL, ("%s\n", o));
|
||||
+ DBS(DB_CALL, ("### call %s <--\n", body));
|
||||
+
|
||||
+ depth -= 1;
|
||||
+
|
||||
max_args = saved_args;
|
||||
|
||||
v->exp_count = 0;
|
||||
diff -r -u make-3.82/main.c make-3.82-lo_trace/main.c
|
||||
--- make-3.82/main.c 2010-07-19 02:10:53.000000000 -0500
|
||||
+++ make-3.82-lo_trace/main.c 2011-06-22 11:46:39.000000000 -0500
|
||||
@@ -634,6 +634,12 @@
|
||||
case 'b':
|
||||
db_level |= DB_BASIC;
|
||||
break;
|
||||
+ case 'c':
|
||||
+ db_level |= DB_CALL;
|
||||
+ break;
|
||||
+ case 'e':
|
||||
+ db_level |= DB_EVAL;
|
||||
+ break;
|
||||
case 'i':
|
||||
db_level |= DB_BASIC | DB_IMPLICIT;
|
||||
break;
|
@ -1,84 +0,0 @@
|
||||
diff --git a/make-3.82-gbuild/function.c b/make-3.82-gbuild/function.c
|
||||
index e2f6c8c..ff0527f 100644
|
||||
--- a/make-3.82/function.c
|
||||
+++ b/make-3.82/function.c
|
||||
@@ -2333,8 +2333,10 @@ func_call (char *o, char **argv, const char *funcname UNUSED)
|
||||
v = lookup_variable (fname, flen);
|
||||
|
||||
if (v == 0)
|
||||
- warn_undefined (fname, flen);
|
||||
-
|
||||
+ {
|
||||
+ warn_undefined (fname, flen);
|
||||
+ warn_undefined_function (fname, flen);
|
||||
+ }
|
||||
if (v == 0 || *v->value == '\0')
|
||||
return o;
|
||||
|
||||
diff --git a/make-3.82-gbuild/main.c b/make-3.82-gbuild/main.c
|
||||
index c6989e3..2f545a7 100644
|
||||
--- a/make-3.82/main.c
|
||||
+++ b/make-3.82/main.c
|
||||
@@ -275,6 +275,11 @@ static int print_usage_flag = 0;
|
||||
|
||||
int warn_undefined_variables_flag;
|
||||
|
||||
+/* If nonzero, we should print a warning message
|
||||
+ for each attemtp to call an undefined user function. */
|
||||
+
|
||||
+int warn_undefined_functions_flag;
|
||||
+
|
||||
/* If nonzero, always build all targets, regardless of whether
|
||||
they appear out of date or not. */
|
||||
|
||||
@@ -368,6 +373,8 @@ static const char *const usage[] =
|
||||
Consider FILE to be infinitely new.\n"),
|
||||
N_("\
|
||||
--warn-undefined-variables Warn when an undefined variable is referenced.\n"),
|
||||
+ N_("\
|
||||
+ --warn-undefined-functions Warn when an undefined user function is called.\n"),
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -424,6 +431,8 @@ static const struct command_switch switches[] =
|
||||
{ CHAR_MAX+5, flag, &warn_undefined_variables_flag, 1, 1, 0, 0, 0,
|
||||
"warn-undefined-variables" },
|
||||
{ CHAR_MAX+6, string, &eval_strings, 1, 0, 0, 0, 0, "eval" },
|
||||
+ { CHAR_MAX+7, flag, &warn_undefined_functions_flag, 1, 1, 0, 0, 0,
|
||||
+ "warn-undefined-functions" },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
diff --git a/make-3.82-gbuild/make.h b/make-3.82-gbuild/make.h
|
||||
index 60ade4c..f2ebb56 100644
|
||||
--- a/make-3.82/make.h
|
||||
+++ b/make-3.82/make.h
|
||||
@@ -513,7 +513,7 @@ extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
||||
extern int print_version_flag, print_directory_flag, check_symlink_flag;
|
||||
extern int warn_undefined_variables_flag, posix_pedantic, not_parallel;
|
||||
extern int second_expansion, clock_skew_detected, rebuilding_makefiles;
|
||||
-extern int one_shell;
|
||||
+extern int one_shell, warn_undefined_functions_flag;
|
||||
|
||||
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
||||
extern int batch_mode_shell;
|
||||
diff --git a/make-3.82-gbuild/variable.h b/make-3.82-gbuild/variable.h
|
||||
index c215867..02713c1 100644
|
||||
--- a/make-3.82/variable.h
|
||||
+++ b/make-3.82/variable.h
|
||||
@@ -220,6 +220,13 @@ void undefine_variable_in_set (const char *name, unsigned int length,
|
||||
(int)(l), (n)); \
|
||||
}while(0)
|
||||
|
||||
+#define warn_undefined_function(n,l) do{\
|
||||
+ if (warn_undefined_functions_flag) \
|
||||
+ error (reading_file, \
|
||||
+ _("warning: undefined function `%.*s'"), \
|
||||
+ (int)(l), (n)); \
|
||||
+ }while(0)
|
||||
+
|
||||
char **target_environment (struct file *file);
|
||||
|
||||
struct pattern_var *create_pattern_var (const char *target,
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
@ -1,16 +0,0 @@
|
||||
diff -up make-3.82/job.c\~ make-3.82/job.c
|
||||
--- make-3.82/job.c~ 2010-08-11 16:13:33.000000000 +0200
|
||||
+++ make-3.82/job.c 2010-08-12 14:20:08.000000000 +0200
|
||||
@@ -2442,7 +2442,11 @@ construct_command_argv_internal (char *l
|
||||
|
||||
/* See if it is safe to parse commands internally. */
|
||||
if (shell == 0)
|
||||
- shell = default_shell;
|
||||
+ {
|
||||
+ shell = default_shell;
|
||||
+ if (shellflags == 0)
|
||||
+ shellflags = "-c";
|
||||
+ }
|
||||
#ifdef WINDOWS32
|
||||
else if (strcmp (shell, default_shell))
|
||||
{
|
Binary file not shown.
36
make-4.3-cloexec.patch
Normal file
36
make-4.3-cloexec.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From d79fe162c009788888faaf0317253b6f0cac7092 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Buettner <kevinb@redhat.com>
|
||||
Date: Thu, 23 Apr 2020 17:05:34 -0400
|
||||
Subject: [SV 58232] Disable inheritance of jobserver FDs for recursive make
|
||||
|
||||
A parent make will invoke a sub-make with close-on-exec disabled for
|
||||
the jobserver pipe FDs. Force close-on-exec to be to be enabled in
|
||||
the sub-make so the pipe is not always passed to child jobs.
|
||||
|
||||
I have a test case which, when invoked with a suitable -j switch,
|
||||
will hang if the recipe inherits the jobserver pipe. This test case
|
||||
was inspired by a real world case in which testing GDB on Fedora
|
||||
would hang due to some poorly written test GDB cases having been
|
||||
passed the jobserver file descriptors.
|
||||
|
||||
* src/posixos.c (jobserver_parse_auth): Call fd_noinherit() for
|
||||
jobserver pipe descriptors.
|
||||
|
||||
Copyright-paperwork-exempt: yes
|
||||
|
||||
diff --git a/src/posixos.c b/src/posixos.c
|
||||
index 525f292c..eab175a4 100644
|
||||
--- a/src/posixos.c
|
||||
+++ b/src/posixos.c
|
||||
@@ -145,6 +145,11 @@ jobserver_parse_auth (const char *auth)
|
||||
/* When using pselect() we want the read to be non-blocking. */
|
||||
set_blocking (job_fds[0], 0);
|
||||
|
||||
+ /* By default we don't send the job pipe FDs to our children.
|
||||
+ See jobserver_pre_child() and jobserver_post_child(). */
|
||||
+ fd_noinherit (job_fds[0]);
|
||||
+ fd_noinherit (job_fds[1]);
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
|
268
make-4.3-filter-out.patch
Normal file
268
make-4.3-filter-out.patch
Normal file
@ -0,0 +1,268 @@
|
||||
From e49e11e069fe7f214263be1782242b9b50f71eaa Mon Sep 17 00:00:00 2001
|
||||
From: Paul Smith <psmith@gnu.org>
|
||||
Date: Thu, 12 Nov 2020 17:00:39 -0500
|
||||
Subject: [SV 59093] Rewrite filter/filter-out to avoid large stack usage
|
||||
|
||||
* src/function.c (func_filter_filterout): Allocate arrays to hold
|
||||
pattern and word information rather than creating linked lists on
|
||||
the stack.
|
||||
* tests/scripts/functions/filter-out: Test large filters.
|
||||
|
||||
diff --git a/src/function.c b/src/function.c
|
||||
index 0917e0cd..5edfe8b3 100644
|
||||
--- a/src/function.c
|
||||
+++ b/src/function.c
|
||||
@@ -910,7 +910,6 @@ func_foreach (char *o, char **argv, const char *funcname UNUSED)
|
||||
|
||||
struct a_word
|
||||
{
|
||||
- struct a_word *next;
|
||||
struct a_word *chain;
|
||||
char *str;
|
||||
size_t length;
|
||||
@@ -941,7 +940,6 @@ a_word_hash_cmp (const void *x, const void *y)
|
||||
|
||||
struct a_pattern
|
||||
{
|
||||
- struct a_pattern *next;
|
||||
char *str;
|
||||
char *percent;
|
||||
size_t length;
|
||||
@@ -950,78 +948,84 @@ struct a_pattern
|
||||
static char *
|
||||
func_filter_filterout (char *o, char **argv, const char *funcname)
|
||||
{
|
||||
- struct a_word *wordhead;
|
||||
- struct a_word **wordtail;
|
||||
+ struct a_word *words;
|
||||
+ struct a_word *word_end;
|
||||
struct a_word *wp;
|
||||
- struct a_pattern *pathead;
|
||||
- struct a_pattern **pattail;
|
||||
+ struct a_pattern *patterns;
|
||||
+ struct a_pattern *pat_end;
|
||||
struct a_pattern *pp;
|
||||
+ size_t pat_count = 0, word_count = 0;
|
||||
|
||||
struct hash_table a_word_table;
|
||||
int is_filter = funcname[CSTRLEN ("filter")] == '\0';
|
||||
- const char *pat_iterator = argv[0];
|
||||
- const char *word_iterator = argv[1];
|
||||
+ const char *cp;
|
||||
int literals = 0;
|
||||
- int words = 0;
|
||||
int hashing = 0;
|
||||
char *p;
|
||||
size_t len;
|
||||
+ int doneany = 0;
|
||||
|
||||
- /* Chop ARGV[0] up into patterns to match against the words.
|
||||
- We don't need to preserve it because our caller frees all the
|
||||
- argument memory anyway. */
|
||||
+ /* Find the number of words and get memory for them. */
|
||||
+ cp = argv[1];
|
||||
+ while ((p = find_next_token (&cp, NULL)) != 0)
|
||||
+ ++word_count;
|
||||
|
||||
- pattail = &pathead;
|
||||
- while ((p = find_next_token (&pat_iterator, &len)) != 0)
|
||||
- {
|
||||
- struct a_pattern *pat = alloca (sizeof (struct a_pattern));
|
||||
+ if (!word_count)
|
||||
+ return o;
|
||||
+
|
||||
+ words = xcalloc (word_count * sizeof (struct a_word));
|
||||
+ word_end = words + word_count;
|
||||
|
||||
- *pattail = pat;
|
||||
- pattail = &pat->next;
|
||||
+ /* Find the number of patterns and get memory for them. */
|
||||
+ cp = argv[0];
|
||||
+ while ((p = find_next_token (&cp, NULL)) != 0)
|
||||
+ ++pat_count;
|
||||
|
||||
- if (*pat_iterator != '\0')
|
||||
- ++pat_iterator;
|
||||
+ patterns = xcalloc (pat_count * sizeof (struct a_pattern));
|
||||
+ pat_end = patterns + pat_count;
|
||||
+
|
||||
+ /* Chop argv[0] up into patterns to match against the words. */
|
||||
+
|
||||
+ cp = argv[0];
|
||||
+ pp = patterns;
|
||||
+ while ((p = find_next_token (&cp, &len)) != 0)
|
||||
+ {
|
||||
+ if (*cp != '\0')
|
||||
+ ++cp;
|
||||
|
||||
- pat->str = p;
|
||||
p[len] = '\0';
|
||||
- pat->percent = find_percent (p);
|
||||
- if (pat->percent == 0)
|
||||
+ pp->str = p;
|
||||
+ pp->percent = find_percent (p);
|
||||
+ if (pp->percent == 0)
|
||||
literals++;
|
||||
-
|
||||
/* find_percent() might shorten the string so LEN is wrong. */
|
||||
- pat->length = strlen (pat->str);
|
||||
+ pp->length = strlen (pp->str);
|
||||
+
|
||||
+ ++pp;
|
||||
}
|
||||
- *pattail = 0;
|
||||
|
||||
/* Chop ARGV[1] up into words to match against the patterns. */
|
||||
|
||||
- wordtail = &wordhead;
|
||||
- while ((p = find_next_token (&word_iterator, &len)) != 0)
|
||||
+ cp = argv[1];
|
||||
+ wp = words;
|
||||
+ while ((p = find_next_token (&cp, &len)) != 0)
|
||||
{
|
||||
- struct a_word *word = alloca (sizeof (struct a_word));
|
||||
-
|
||||
- *wordtail = word;
|
||||
- wordtail = &word->next;
|
||||
-
|
||||
- if (*word_iterator != '\0')
|
||||
- ++word_iterator;
|
||||
+ if (*cp != '\0')
|
||||
+ ++cp;
|
||||
|
||||
p[len] = '\0';
|
||||
- word->str = p;
|
||||
- word->length = len;
|
||||
- word->matched = 0;
|
||||
- word->chain = 0;
|
||||
- words++;
|
||||
+ wp->str = p;
|
||||
+ wp->length = len;
|
||||
+ ++wp;
|
||||
}
|
||||
- *wordtail = 0;
|
||||
|
||||
/* Only use a hash table if arg list lengths justifies the cost. */
|
||||
- hashing = (literals >= 2 && (literals * words) >= 10);
|
||||
+ hashing = (literals > 1 && (literals * word_count) >= 10);
|
||||
if (hashing)
|
||||
{
|
||||
- hash_init (&a_word_table, words, a_word_hash_1, a_word_hash_2,
|
||||
+ hash_init (&a_word_table, word_count, a_word_hash_1, a_word_hash_2,
|
||||
a_word_hash_cmp);
|
||||
- for (wp = wordhead; wp != 0; wp = wp->next)
|
||||
+ for (wp = words; wp < word_end; ++wp)
|
||||
{
|
||||
struct a_word *owp = hash_insert (&a_word_table, wp);
|
||||
if (owp)
|
||||
@@ -1029,51 +1033,49 @@ func_filter_filterout (char *o, char **argv, const char *funcname)
|
||||
}
|
||||
}
|
||||
|
||||
- if (words)
|
||||
+ /* Run each pattern through the words, killing words. */
|
||||
+ for (pp = patterns; pp < pat_end; ++pp)
|
||||
{
|
||||
- int doneany = 0;
|
||||
-
|
||||
- /* Run each pattern through the words, killing words. */
|
||||
- for (pp = pathead; pp != 0; pp = pp->next)
|
||||
+ if (pp->percent)
|
||||
+ for (wp = words; wp < word_end; ++wp)
|
||||
+ wp->matched |= pattern_matches (pp->str, pp->percent, wp->str);
|
||||
+ else if (hashing)
|
||||
{
|
||||
- if (pp->percent)
|
||||
- for (wp = wordhead; wp != 0; wp = wp->next)
|
||||
- wp->matched |= pattern_matches (pp->str, pp->percent, wp->str);
|
||||
- else if (hashing)
|
||||
+ struct a_word a_word_key;
|
||||
+ a_word_key.str = pp->str;
|
||||
+ a_word_key.length = pp->length;
|
||||
+ wp = hash_find_item (&a_word_table, &a_word_key);
|
||||
+ while (wp)
|
||||
{
|
||||
- struct a_word a_word_key;
|
||||
- a_word_key.str = pp->str;
|
||||
- a_word_key.length = pp->length;
|
||||
- wp = hash_find_item (&a_word_table, &a_word_key);
|
||||
- while (wp)
|
||||
- {
|
||||
- wp->matched |= 1;
|
||||
- wp = wp->chain;
|
||||
- }
|
||||
+ wp->matched |= 1;
|
||||
+ wp = wp->chain;
|
||||
}
|
||||
- else
|
||||
- for (wp = wordhead; wp != 0; wp = wp->next)
|
||||
- wp->matched |= (wp->length == pp->length
|
||||
- && strneq (pp->str, wp->str, wp->length));
|
||||
}
|
||||
+ else
|
||||
+ for (wp = words; wp < word_end; ++wp)
|
||||
+ wp->matched |= (wp->length == pp->length
|
||||
+ && strneq (pp->str, wp->str, wp->length));
|
||||
+ }
|
||||
|
||||
- /* Output the words that matched (or didn't, for filter-out). */
|
||||
- for (wp = wordhead; wp != 0; wp = wp->next)
|
||||
- if (is_filter ? wp->matched : !wp->matched)
|
||||
- {
|
||||
- o = variable_buffer_output (o, wp->str, strlen (wp->str));
|
||||
- o = variable_buffer_output (o, " ", 1);
|
||||
- doneany = 1;
|
||||
- }
|
||||
+ /* Output the words that matched (or didn't, for filter-out). */
|
||||
+ for (wp = words; wp < word_end; ++wp)
|
||||
+ if (is_filter ? wp->matched : !wp->matched)
|
||||
+ {
|
||||
+ o = variable_buffer_output (o, wp->str, strlen (wp->str));
|
||||
+ o = variable_buffer_output (o, " ", 1);
|
||||
+ doneany = 1;
|
||||
+ }
|
||||
|
||||
- if (doneany)
|
||||
- /* Kill the last space. */
|
||||
- --o;
|
||||
- }
|
||||
+ if (doneany)
|
||||
+ /* Kill the last space. */
|
||||
+ --o;
|
||||
|
||||
if (hashing)
|
||||
hash_free (&a_word_table, 0);
|
||||
|
||||
+ free (patterns);
|
||||
+ free (words);
|
||||
+
|
||||
return o;
|
||||
}
|
||||
|
||||
diff --git a/tests/scripts/functions/filter-out b/tests/scripts/functions/filter-out
|
||||
index 1fe4819d..dec5343e 100644
|
||||
--- a/tests/scripts/functions/filter-out
|
||||
+++ b/tests/scripts/functions/filter-out
|
||||
@@ -27,6 +27,22 @@ all: ; @echo '$(files1) $(files2)'
|
||||
!,
|
||||
'', "foo.elc foo.elc\n");
|
||||
|
||||
+# Force use of hash (see function.c:func_filter_filterout for params)
|
||||
+
|
||||
+my $base = 'foo.1 foo.2 foo.3 foo.4 foo.5 foo.6 foo.7 foo.8 foo.9 foo.10';
|
||||
+
|
||||
+my $base10 = join(' ', ($base) x 10);
|
||||
+my $out3 = join(' ', ('foo.3') x 10);
|
||||
+my $out456 = join(' ', ('foo.4 foo.5 foo.6') x 10);
|
||||
+
|
||||
+run_make_test("words := $base10" . q!
|
||||
+files1 := $(filter %.3, $(words))
|
||||
+files2 := $(filter %.4 foo.5 foo.6, $(words))
|
||||
+all: ; @echo '$(files1) $(files2)'
|
||||
+!,
|
||||
+ '', "$out3 $out456\n");
|
||||
+
|
||||
+
|
||||
# Escaped patterns
|
||||
run_make_test(q!all:;@echo '$(filter foo\%bar,foo%bar fooXbar)'!,
|
||||
'', "foo%bar\n");
|
12
make-4.3-getcwd.patch
Normal file
12
make-4.3-getcwd.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Nrup a/src/makeint.h b/src/makeint.h
|
||||
--- a/src/makeint.h 2016-05-21 16:22:32.000000000 -0400
|
||||
+++ b/src/makeint.h 2016-09-22 16:12:38.606702160 -0400
|
||||
@@ -596,7 +596,7 @@ long int lseek ();
|
||||
# endif
|
||||
|
||||
# ifdef HAVE_GETCWD
|
||||
-# if !defined(VMS) && !defined(__DECC)
|
||||
+# if !defined(VMS) && !defined(__DECC) && !defined(getcwd)
|
||||
char *getcwd ();
|
||||
# endif
|
||||
# else
|
25
make-4.3-j8k.patch
Normal file
25
make-4.3-j8k.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -Nrup a/src/main.c b/src/main.c
|
||||
--- a/src/main.c 2016-05-31 03:17:26.000000000 -0400
|
||||
+++ b/src/main.c 2016-09-22 16:18:52.283889265 -0400
|
||||
@@ -2051,6 +2051,21 @@ main (int argc, char **argv, char **envp
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef PIPE_BUF
|
||||
+ if (job_slots > PIPE_BUF)
|
||||
+#elif defined _POSIX_PIPE_BUF
|
||||
+ if (job_slots > _POSIX_PIPE_BUF)
|
||||
+#else
|
||||
+ if (job_slots > 512)
|
||||
+#endif
|
||||
+ {
|
||||
+ O (error, NILF,
|
||||
+ _("More parallel jobs (-jN) than this platform can handle requested."));
|
||||
+ O (error, NILF, _("Resetting to single job (-j1) mode."));
|
||||
+ job_slots = 1;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
/* If we have >1 slot at this point, then we're a top-level make.
|
||||
Set up the jobserver.
|
||||
|
330
make.spec
330
make.spec
@ -1,50 +1,81 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
Summary: A GNU tool which simplifies the build process for users
|
||||
# This decides the SRPM name. Set to "make" for a rolling release
|
||||
# (like Fedora) or "make-latest" for a long term release that needs
|
||||
# optional versioned updates.
|
||||
Name: make
|
||||
Epoch: 1
|
||||
Version: 3.82
|
||||
Release: 13%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Development/Tools
|
||||
Version: 4.3
|
||||
Release: 11%{?dist}
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/make/
|
||||
Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.bz2
|
||||
Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.gz
|
||||
|
||||
Patch1: make-3.82-noclock_gettime.patch
|
||||
Patch2: make-3.82-j8k.patch
|
||||
Patch3: make-3.82-getcwd.patch
|
||||
Patch4: make-3.82-err-reporting.patch
|
||||
Patch5: make-3.81-memory.patch
|
||||
%if "%{name}" != "make"
|
||||
# Set this to the sub-package base name, for "make-latest"
|
||||
%global make make43
|
||||
%if 0%{?rhel} > 0
|
||||
%global _prefix /opt/rh/%{make}
|
||||
%else
|
||||
# We intentionally do not define a case for Fedora, as it should not
|
||||
# need this functionality, and letting it error avoids accidents.
|
||||
%{error:"Each downstream must specify its own /opt namespace"}
|
||||
%endif
|
||||
Summary: Meta package to include latest version of make
|
||||
%else
|
||||
%global make %{name}
|
||||
Summary: A GNU tool which simplifies the build process for users
|
||||
%endif
|
||||
|
||||
# Upstream: https://savannah.gnu.org/bugs/?30748
|
||||
Patch6: make-3.82-weird-shell.patch
|
||||
%if 0%{?rhel} > 0
|
||||
# This gives the user the option of saying --with guile, but defaults to WITHOUT
|
||||
%bcond_with guile
|
||||
%else
|
||||
# This gives the user the option of saying --without guile, but defaults to WITH
|
||||
%bcond_without guile
|
||||
%endif
|
||||
|
||||
Patch7: make-3.82-newlines.patch
|
||||
Patch8: make-3.82-jobserver.patch
|
||||
Patch9: make-3.82-bugfixes.patch
|
||||
Patch10: make-3.82-sort-blank.patch
|
||||
Patch11: make-3.82-copy-on-expand.patch
|
||||
Patch0: make-4.3-getcwd.patch
|
||||
|
||||
# Upstream: https://savannah.gnu.org/bugs/?33873
|
||||
Patch12: make-3.82-parallel-remake.patch
|
||||
# Assume we don't have clock_gettime in configure, so that
|
||||
# make is not linked against -lpthread (and thus does not
|
||||
# limit stack to 2MB).
|
||||
Patch1: make-4.0-noclock_gettime.patch
|
||||
|
||||
# http://savannah.gnu.org/bugs/?34335
|
||||
Patch13: make-3.82-warn_undefined_function.patch
|
||||
# BZs #142691, #17374
|
||||
Patch2: make-4.3-j8k.patch
|
||||
|
||||
# http://lists.gnu.org/archive/html/bug-make/2011-06/msg00032.html
|
||||
Patch14: make-3.82-trace.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1827850
|
||||
# https://savannah.gnu.org/bugs/?58232
|
||||
# Remove on next make rebase
|
||||
Patch3: make-4.3-cloexec.patch
|
||||
|
||||
# http://lists.gnu.org/archive/html/bug-make/2011-04/msg00002.html
|
||||
Patch15: make-3.82-expensive_glob.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2010506
|
||||
# https://savannah.gnu.org/bugs/?59093
|
||||
# Remove on next make rebase
|
||||
Patch4: make-4.3-filter-out.patch
|
||||
|
||||
# Upstream: https://savannah.gnu.org/bugs/?30653
|
||||
Patch16: make-3.82-dont-prune-intermediate.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
# autoreconf
|
||||
BuildRequires: make
|
||||
BuildRequires: autoconf, automake, gettext-devel
|
||||
BuildRequires: procps
|
||||
BuildRequires: perl
|
||||
%if %{with guile}
|
||||
BuildRequires: pkgconfig(guile-2.2)
|
||||
%endif
|
||||
BuildRequires: gcc
|
||||
|
||||
%description
|
||||
%if "%{name}" != "make"
|
||||
# We're still on the make-latest package
|
||||
Requires: %{make}
|
||||
%description -n make-latest
|
||||
The latest GNU Make, with a version-specific install
|
||||
%files -n make-latest
|
||||
|
||||
%package -n %{make}
|
||||
Summary: A GNU tool which simplifies the build process for users
|
||||
%endif
|
||||
|
||||
%description -n %{make}
|
||||
A GNU tool for controlling the generation of executables and other
|
||||
non-source files of a program from the program's source files. Make
|
||||
allows users to build and install packages without any significant
|
||||
@ -52,67 +83,214 @@ knowledge about the details of the build process. The details about
|
||||
how the program should be built are provided for make in the program's
|
||||
makefile.
|
||||
|
||||
%package -n %{make}-devel
|
||||
Summary: Header file for externally visible definitions
|
||||
|
||||
%description -n %{make}-devel
|
||||
The %{make}-devel package contains gnumake.h.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
#%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p0
|
||||
%patch13 -p2
|
||||
%patch14 -p1
|
||||
%patch15 -p0
|
||||
%patch16 -p0
|
||||
%autosetup -n make-%{version} -p1
|
||||
|
||||
rm -f tests/scripts/features/parallelism.orig
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
autoreconf -vfi
|
||||
|
||||
%configure \
|
||||
%if %{with guile}
|
||||
--with-guile
|
||||
%else
|
||||
--without-guile
|
||||
%endif
|
||||
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%make_install
|
||||
ln -sf make ${RPM_BUILD_ROOT}/%{_bindir}/gmake
|
||||
ln -sf make.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/gmake.1
|
||||
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
|
||||
|
||||
%find_lang %name
|
||||
%if "%{name}" != "make"
|
||||
install -d -m 755 ${RPM_BUILD_ROOT}/etc/scl/prefixes
|
||||
dirname %{_prefix} > %{make}.prefix
|
||||
install -p -m 644 %{make}.prefix ${RPM_BUILD_ROOT}/etc/scl/prefixes/%{make}
|
||||
|
||||
echo "export PATH=%{_prefix}/bin:\$PATH" > enable.scl
|
||||
install -p -m 755 enable.scl ${RPM_BUILD_ROOT}/%{_prefix}/enable
|
||||
%endif
|
||||
|
||||
%find_lang make
|
||||
|
||||
%check
|
||||
echo ============TESTING===============
|
||||
/usr/bin/env LANG=C make check
|
||||
/usr/bin/env LANG=C make check && true
|
||||
echo ============END TESTING===========
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%post
|
||||
if [ -f %{_infodir}/make.info.gz ]; then # for --excludedocs
|
||||
/sbin/install-info %{_infodir}/make.info.gz %{_infodir}/dir --entry="* Make: (make). The GNU make utility." || :
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
if [ -f %{_infodir}/make.info.gz ]; then # for --excludedocs
|
||||
/sbin/install-info --delete %{_infodir}/make.info.gz %{_infodir}/dir --entry="* Make: (make). The GNU make utility." || :
|
||||
fi
|
||||
fi
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
%doc NEWS README COPYING AUTHORS
|
||||
%files -n %{make} -f make.lang
|
||||
%license COPYING
|
||||
%doc NEWS README AUTHORS
|
||||
%{_bindir}/*
|
||||
%{_mandir}/man*/*
|
||||
%{_infodir}/*.info*
|
||||
%{_includedir}/gnumake.h
|
||||
%if "%{name}" != "make"
|
||||
/etc/scl/prefixes/%{make}
|
||||
%{_prefix}/enable
|
||||
%endif
|
||||
|
||||
%files -n %{make}-devel
|
||||
%{_includedir}/gnumake.h
|
||||
|
||||
%changelog
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jul 14 2022 DJ Delorie <dj@redhat.com> - 1:4.3-10
|
||||
- Add SCL compatibility to LTS builds.
|
||||
|
||||
* Wed Jun 29 2022 DJ Delorie <dj@redhat.com> - 1:4.3-9
|
||||
- Enable long-term supported builds.
|
||||
|
||||
* Fri Apr 8 2022 DJ Delorie <dj@redhat.com> - 1:4.3-8
|
||||
- Rewrite filter/filter-out to avoid large stack usage. BZ #2010506
|
||||
- Require perl core modules for testsuite
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Fri Feb 19 2021 DJ Delorie <dj@redhat.com> - 1:4.3-5
|
||||
- Allow users to build with or without guile support as desired.
|
||||
- Allow derivative downstreams to default to disabling guile support.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 DJ Delorie <dj@redhat.com> - 1:4.3-3
|
||||
- Disable inheritance of jobserver FDs for recursive make. BZ #1827850
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Mar 11 2020 DJ Delorie <dj@redhat.com> - 1:4.3-1
|
||||
- Rebase to make-4.3. Remove obsolete patches.
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Dec 06 2019 DJ Delorie <dj@redhat.com> - 1:4.2.1-15
|
||||
- Use a non-blocking read with pselect to avoid hangs. BZ #1556839
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:4.2.1-13
|
||||
- Run autoreconf
|
||||
|
||||
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:4.2.1-12
|
||||
- Switch to latest guile version
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Apr 25 2018 Patsy Griffin Franklin <pfrankli@redhat.com> 1:4.2.1-9
|
||||
- Fix build failure caused by automake versioning differences related
|
||||
to the glob changes.
|
||||
- Fix testing failure due to Perl changes related to expanding paths.
|
||||
|
||||
* Tue Feb 20 2018 Rex Dieter <rdieter@fedoraproject.org> - 1:4.2.1-8
|
||||
- BR: gcc, rebuild (guile)
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:4.2.1-6
|
||||
- Fix wrong assumptions of glibc's glob internals
|
||||
|
||||
* Thu Feb 01 2018 Richard W.M. Jones <rjones@redhat.com> - 1:4.2.1-5
|
||||
- Add upstream patch to fix incorrect use of glibc 2.27 glob internals.
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Wed Feb 01 2017 Stephen Gallagher <sgallagh@redhat.com> - 4.2.1-2
|
||||
- Add missing %%license macro
|
||||
|
||||
* Sun Sep 25 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-1
|
||||
- Rebase to make-4.2.1. Remove obsolete patches. BZ #1338558
|
||||
|
||||
* Sun Sep 25 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.1-6
|
||||
- Make test suite requires Perl to run.
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Wed Nov 4 2015 Patsy Franklin <pfrankli@redhat.com> 1:4.1-4
|
||||
- Handle NULL returns from ttyname() Upstream Bug 43434.
|
||||
Resolves: #1277968
|
||||
|
||||
* Thu Oct 29 2015 Patsy Franklin <pfrankli@redhat.com> 1:4.1-3
|
||||
- Enable Guile support.
|
||||
|
||||
* Thu Oct 29 2015 Patsy Franklin <pfrankli@redhat.com> 1:4.1-2
|
||||
- Include patches dropped in last update as they fix reported bugs and
|
||||
update the spec file to include more info on the patches.
|
||||
|
||||
* Sat Oct 24 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@laptop> - 1:4.1-1
|
||||
- Update to latest version
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.0-5.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1:4.0-4.1
|
||||
- Rebuilt for Fedora 23 Change
|
||||
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
|
||||
|
||||
* Wed Sep 03 2014 Kyle McMartin <kyle@fedoraproject.org> - 1:4.0-3.1
|
||||
- Pass the test-suite unconditionally until I fix the tests to cope with
|
||||
deterministic ar archives (which result in expected rebuilds not occuring)
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Wed Apr 30 2014 Patsy Franklin <pfrankli@redhat.com> 1:4.0-1
|
||||
- Rebase to make-4.0
|
||||
- Created make-devel sub-package to handle new dependency on gnumake.h.
|
||||
|
||||
* Thu Aug 22 2013 Petr Machata <pmachata@redhat.com> - 1:3.82-19
|
||||
- make now restores rlimit to its original values before launching
|
||||
subprocess via $(shell) (make-3.82-func_shell-rlimit.patch)
|
||||
- Determinize one test (make-3.82-tests-SECONDARY.patch)
|
||||
|
||||
* Fri Jul 26 2013 Petr Machata <pmachata@redhat.com> - 1:3.82-18
|
||||
- Backport upstream patch that adds wildcard expansion to pattern
|
||||
rules. (make-3.82-stem_glob.patch)
|
||||
|
||||
* Wed Jun 19 2013 Petr Machata <pmachata@redhat.com> - 1:3.82-17
|
||||
- Add another fix for upstream bug 30612
|
||||
|
||||
* Thu Apr 4 2013 Petr Machata <pmachata@redhat.com> - 1:3.82-16
|
||||
- Update config.sub and config.guess to support aarch64
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.82-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Thu Nov 29 2012 Petr Machata <pmachata@redhat.com> - 1:3.82-14
|
||||
- Drop patch5, which hasn't been applied for years
|
||||
|
||||
* Mon Sep 10 2012 Petr Machata <pmachata@redhat.com> - 1:3.82-13
|
||||
- Add fix for upstream bug 30653
|
||||
- Resolves: #835424
|
||||
@ -138,7 +316,7 @@ fi
|
||||
* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.82-7
|
||||
- Rebuilt for glibc bug#747377
|
||||
|
||||
* Tue May 12 2011 Lubomir Rintel <lkundrak@v3.sk> - 1:3.82-6
|
||||
* Thu May 12 2011 Lubomir Rintel <lkundrak@v3.sk> - 1:3.82-6
|
||||
- Fix free-after-use with nested assignments (#703104)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.82-5
|
||||
@ -270,7 +448,7 @@ fi
|
||||
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1:3.80-10.1
|
||||
- rebuilt for new gcc4.1 snapshot and glibc changes
|
||||
|
||||
* Mon Feb 02 2006 Petr Machata <pmachata@redhat.com> 3.80-10
|
||||
* Thu Feb 02 2006 Petr Machata <pmachata@redhat.com> 3.80-10
|
||||
- H.J. Lu caught a typo in the patch and provided a new one. (#175376)
|
||||
|
||||
* Mon Jan 09 2006 Petr Machata <pmachata@redhat.com> 3.80-9
|
||||
|
6
plans/ci.fmf
Normal file
6
plans/ci.fmf
Normal file
@ -0,0 +1,6 @@
|
||||
summary: CI Gating Plan
|
||||
discover:
|
||||
how: fmf
|
||||
directory: tests
|
||||
execute:
|
||||
how: beakerlib
|
2
sources
2
sources
@ -1 +1 @@
|
||||
1a11100f3c63fcf5753818e59d63088f make-3.82.tar.bz2
|
||||
SHA512 (make-4.3.tar.gz) = 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b
|
||||
|
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||
# Description: Test for GNU make utility v.3.82 shipped with el7 breaks
|
||||
# Author: Michal Kolar <mkolar@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2016 Red Hat, Inc.
|
||||
#
|
||||
# This program 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 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.mk golden.output
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Michal Kolar <mkolar@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: GNU make utility v.3.82 shipped with el7 breaks" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 2m" >> $(METADATA)
|
||||
@echo "RunFor: make" >> $(METADATA)
|
||||
@echo "Requires: make coreutils sed diffutils" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: yes" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||
Author: Michal Kolar <mkolar@redhat.com>
|
||||
Summary: GNU make utility v.3.82 shipped with el7 breaks environment vars
|
@ -0,0 +1,2 @@
|
||||
echo "TEST=false"
|
||||
TEST=false
|
@ -0,0 +1,17 @@
|
||||
summary: GNU make utility v.3.82 shipped with el7 breaks
|
||||
description: |
|
||||
Summary: GNU make utility v.3.82 shipped with el7 breaks environment vars
|
||||
contact:
|
||||
- Michal Kolar <mkolar@redhat.com>
|
||||
component:
|
||||
- make
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- make
|
||||
- coreutils
|
||||
- sed
|
||||
- diffutils
|
||||
duration: 2m
|
||||
extra-summary: /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||
extra-task: /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
57
tests/GNU-make-utility-v-3-82-shipped-with-el7-breaks/runtest.sh
Executable file
57
tests/GNU-make-utility-v-3-82-shipped-with-el7-breaks/runtest.sh
Executable file
@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||
# Description: Test for BZ#1323206 (GNU make utility v.3.82 shipped with el7 breaks)
|
||||
# Author: Michal Kolar <mkolar@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2016 Red Hat, Inc.
|
||||
#
|
||||
# This program 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 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# 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 Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
CMD="make"
|
||||
PACKAGE="make"
|
||||
BIN="$(which $CMD)"
|
||||
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlShowRunningKernel
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)"
|
||||
rlRun "cp test.mk golden.output $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "make -f test.mk test TEST=false >stdout"
|
||||
rlRun "sed -i -e '/Entering directory/d' -e '/Leaving directory/d' stdout"
|
||||
rlRun "diff golden.output stdout"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
@ -0,0 +1,5 @@
|
||||
# User makefile
|
||||
|
||||
test: TEST ?= true
|
||||
test:
|
||||
echo "TEST=$(TEST)"
|
63
tests/Use-after-free-when-eval-in-variable/Makefile
Normal file
63
tests/Use-after-free-when-eval-in-variable/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||
# Description: Test for Use-after-free() when eval in variable
|
||||
# Author: Marek Polacek <polacek@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.mk
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Marek Polacek <polacek@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for Use-after-free() when eval in variable)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 2m" >> $(METADATA)
|
||||
@echo "RunFor: make" >> $(METADATA)
|
||||
@echo "Requires: make coreutils" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
3
tests/Use-after-free-when-eval-in-variable/PURPOSE
Normal file
3
tests/Use-after-free-when-eval-in-variable/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||
Author: Marek Polacek <polacek@redhat.com>
|
||||
Summary: Use-after-free() when eval in variable assignments reassigns the same variable
|
15
tests/Use-after-free-when-eval-in-variable/main.fmf
Normal file
15
tests/Use-after-free-when-eval-in-variable/main.fmf
Normal file
@ -0,0 +1,15 @@
|
||||
summary: Test for Use-after-free() when eval in variable)
|
||||
description: |
|
||||
Summary: Use-after-free() when eval in variable assignments reassigns the same variable
|
||||
contact:
|
||||
- Marek Polacek <polacek@redhat.com>
|
||||
component:
|
||||
- make
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- make
|
||||
- coreutils
|
||||
duration: 2m
|
||||
extra-summary: /tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||
extra-task: /tools/make/Regression/Use-after-free-when-eval-in-variable
|
55
tests/Use-after-free-when-eval-in-variable/runtest.sh
Executable file
55
tests/Use-after-free-when-eval-in-variable/runtest.sh
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||
# Description: Test for Use-after-free() when eval in variable
|
||||
# Author: Marek Polacek <polacek@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
CMD="make"
|
||||
BIN="$(which $CMD)"
|
||||
PACKAGE="make"
|
||||
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlShowRunningKernel
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)"
|
||||
rlRun "cp test.mk $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "make -f test.mk"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
2
tests/Use-after-free-when-eval-in-variable/test.mk
Normal file
2
tests/Use-after-free-when-eval-in-variable/test.mk
Normal file
@ -0,0 +1,2 @@
|
||||
VARIABLE = $(eval VARIABLE := $(shell sleep 1; echo echo ahoj))$(VARIABLE)
|
||||
wololo:; $(VARIABLE)
|
63
tests/make-3-79-has-a-parsing-bug/Makefile
Normal file
63
tests/make-3-79-has-a-parsing-bug/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||
# Description: make 3.79 has a parsing bug
|
||||
# Author: Michal Kolar <mkolar@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 Red Hat, Inc.
|
||||
#
|
||||
# This program 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 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.mk
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Michal Kolar <mkolar@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: make 3.79 has a parsing bug" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 1m" >> $(METADATA)
|
||||
@echo "RunFor: make" >> $(METADATA)
|
||||
@echo "Requires: make coreutils" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
3
tests/make-3-79-has-a-parsing-bug/PURPOSE
Normal file
3
tests/make-3-79-has-a-parsing-bug/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||
Description: make 3.79 has a parsing bug
|
||||
Author: Michal Kolar <mkolar@redhat.com>
|
14
tests/make-3-79-has-a-parsing-bug/main.fmf
Normal file
14
tests/make-3-79-has-a-parsing-bug/main.fmf
Normal file
@ -0,0 +1,14 @@
|
||||
summary: make 3.79 has a parsing bug
|
||||
description: ''
|
||||
contact:
|
||||
- Michal Kolar <mkolar@redhat.com>
|
||||
component:
|
||||
- make
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- make
|
||||
- coreutils
|
||||
duration: 1m
|
||||
extra-summary: /tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||
extra-task: /tools/make/Regression/make-3-79-has-a-parsing-bug
|
55
tests/make-3-79-has-a-parsing-bug/runtest.sh
Executable file
55
tests/make-3-79-has-a-parsing-bug/runtest.sh
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||
# Description: make 3.79 has a parsing bug
|
||||
# Author: Michal Kolar <mkolar@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 Red Hat, Inc.
|
||||
#
|
||||
# This program 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 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# 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 Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
CMD="make"
|
||||
BIN="$(which $CMD)"
|
||||
PACKAGE="make"
|
||||
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlShowRunningKernel
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)"
|
||||
rlRun "cp test.mk $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "touch file.l"
|
||||
rlRun "make -f test.mk"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
13
tests/make-3-79-has-a-parsing-bug/test.mk
Normal file
13
tests/make-3-79-has-a-parsing-bug/test.mk
Normal file
@ -0,0 +1,13 @@
|
||||
# Author: Petr Muller <pmuller@redhat.com>
|
||||
|
||||
default: out/file.o
|
||||
%/.exists:
|
||||
-mkdir $(@D)
|
||||
touch $@
|
||||
src/file.c: file.l src/.exists
|
||||
@echo file.l to $@
|
||||
touch $@
|
||||
out/%.o: src/%.c out/.exists
|
||||
@echo -c $< -o $@
|
||||
touch $@
|
||||
|
63
tests/order-only/Makefile
Normal file
63
tests/order-only/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/make/Regression/order-only
|
||||
# Description: Test for make bug
|
||||
# Author: Petr Muller <pmuller@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 Red Hat, Inc.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/make/Regression/order-only
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.mk golden.output
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Petr Muller <pmuller@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for make bug" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 1m" >> $(METADATA)
|
||||
@echo "RunFor: make" >> $(METADATA)
|
||||
@echo "Requires: make coreutils diffutils" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv3" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
4
tests/order-only/PURPOSE
Normal file
4
tests/order-only/PURPOSE
Normal file
@ -0,0 +1,4 @@
|
||||
PURPOSE of /tools/make/Regression/order-only
|
||||
Description: Regression Test for make bug
|
||||
Author: Petr Muller <pmuller@redhat.com>
|
||||
Summary: Test that make doesn't insert bogus values into order-only dependencies
|
9
tests/order-only/golden.output
Normal file
9
tests/order-only/golden.output
Normal file
@ -0,0 +1,9 @@
|
||||
mkdir -p dir/b/.
|
||||
@ [a/b/c]
|
||||
^ []
|
||||
? []
|
||||
mkdir -p a/b/.
|
||||
@ [a]
|
||||
^ []
|
||||
? []
|
||||
rm dir/b/.
|
16
tests/order-only/main.fmf
Normal file
16
tests/order-only/main.fmf
Normal file
@ -0,0 +1,16 @@
|
||||
summary: Test for make bug
|
||||
description: |
|
||||
Summary: Test that make doesn't insert bogus values into order-only dependencies
|
||||
contact:
|
||||
- Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- make
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- make
|
||||
- coreutils
|
||||
- diffutils
|
||||
duration: 1m
|
||||
extra-summary: /tools/make/Regression/order-only
|
||||
extra-task: /tools/make/Regression/order-only
|
55
tests/order-only/runtest.sh
Executable file
55
tests/order-only/runtest.sh
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/make/Regression/order-only
|
||||
# Description: Test for make bug
|
||||
# Author: Petr Muller <pmuller@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 Red Hat, Inc.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# 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 Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
CMD="make"
|
||||
BIN="$(which $CMD)"
|
||||
PACKAGE="make"
|
||||
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlShowRunningKernel
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)"
|
||||
rlRun "cp test.mk golden.output $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "make -f test.mk | grep -v -e 'Entering' -e 'Leaving' >tested.output"
|
||||
rlRun "diff golden.output tested.output"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
17
tests/order-only/test.mk
Normal file
17
tests/order-only/test.mk
Normal file
@ -0,0 +1,17 @@
|
||||
all: ./a/b/c a
|
||||
|
||||
clean:
|
||||
rm -rf a dir
|
||||
|
||||
%/.:
|
||||
mkdir -p $(@)
|
||||
|
||||
a/%/c: | ./dir/%/.
|
||||
@echo "@ [$@]"
|
||||
@echo "^ [$^]"
|
||||
@echo "? [$?]"
|
||||
|
||||
a: | ./a/b/.
|
||||
@echo "@ [$@]"
|
||||
@echo "^ [$^]"
|
||||
@echo "? [$?]"
|
63
tests/smoke-check-make-runs/Makefile
Normal file
63
tests/smoke-check-make-runs/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/make/Sanity/smoke-check-make-runs
|
||||
# Description: Show your version. Build a one-file project.
|
||||
# Author: Vaclav Kadlcik <vkadlcik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2015 Red Hat, Inc.
|
||||
#
|
||||
# This program 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 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/make/Sanity/smoke-check-make-runs
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE hello_world.c smoke.mk
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Vaclav Kadlcik <vkadlcik@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Show your version. Build a one-file project." >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: make" >> $(METADATA)
|
||||
@echo "Requires: make gcc" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
3
tests/smoke-check-make-runs/PURPOSE
Normal file
3
tests/smoke-check-make-runs/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/make/Sanity/smoke-check-make-runs
|
||||
Description: Show your version. Build a one-file project.
|
||||
Author: Vaclav Kadlcik <vkadlcik@redhat.com>
|
8
tests/smoke-check-make-runs/hello_world.c
Normal file
8
tests/smoke-check-make-runs/hello_world.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
if (printf("Hello world!\n") < 0) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
14
tests/smoke-check-make-runs/main.fmf
Normal file
14
tests/smoke-check-make-runs/main.fmf
Normal file
@ -0,0 +1,14 @@
|
||||
summary: Show your version. Build a one-file project.
|
||||
description: ''
|
||||
contact:
|
||||
- Vaclav Kadlcik <vkadlcik@redhat.com>
|
||||
component:
|
||||
- make
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- make
|
||||
- gcc
|
||||
duration: 5m
|
||||
extra-summary: /tools/make/Sanity/smoke-check-make-runs
|
||||
extra-task: /tools/make/Sanity/smoke-check-make-runs
|
61
tests/smoke-check-make-runs/runtest.sh
Executable file
61
tests/smoke-check-make-runs/runtest.sh
Executable file
@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/make/Sanity/smoke-check-make-runs
|
||||
# Description: Show your version. Build a one-file project.
|
||||
# Author: Vaclav Kadlcik <vkadlcik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2015 Red Hat, Inc.
|
||||
#
|
||||
# This program 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 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# 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 Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
MAKE="$(which --skip-alias make)"
|
||||
PACKAGE="make"
|
||||
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $MAKE)}"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "cp hello_world.c $TmpDir"
|
||||
rlRun "cp smoke.mk $TmpDir/Makefile"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -t -s 'make -v'
|
||||
rlAssertNotGrep '^STDERR:' $rlRun_LOG
|
||||
rlAssertGrep '^STDOUT: GNU Make [0-9]' $rlRun_LOG
|
||||
rlAssertNotExists 'hello_world'
|
||||
rlRun 'make'
|
||||
rlAssertExists 'hello_world'
|
||||
rlRun './hello_world'
|
||||
rlRun 'make clean'
|
||||
rlAssertNotExists 'hello_world'
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
9
tests/smoke-check-make-runs/smoke.mk
Normal file
9
tests/smoke-check-make-runs/smoke.mk
Normal file
@ -0,0 +1,9 @@
|
||||
all: hello_world
|
||||
|
||||
hello_world: hello_world.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f hello_world hello_world.o
|
||||
|
||||
.SUFFIXES: .c
|
Loading…
Reference in New Issue
Block a user