From 851d301ffa91d539a62ea0325c16e716d29725cc Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 7 Apr 2014 17:25:25 +0200 Subject: [PATCH] make: update to make-4.0 Signed-off-by: Stephan Raue --- packages/devel/make/package.mk | 2 +- .../make/patches/make-3.82-012-j8k.patch | 26 -- .../make/patches/make-3.82-013-getcwd.patch | 14 - .../patches/make-3.82-014-err-reporting.patch | 157 ----------- .../make/patches/make-3.82-017-newlines.patch | 30 --- .../patches/make-3.82-018-jobserver.patch | 19 -- .../make/patches/make-3.82-019-bugfixes.patch | 250 ------------------ .../patches/make-3.82-020-sort-blank.patch | 22 -- .../make-3.82-021-copy-on-expand.patch | 77 ------ .../make-3.82-022-parallel-remake.patch | 30 --- ...ake-3.82-023-warn_undefined_function.patch | 84 ------ .../make/patches/make-3.82-024-trace.patch | 111 -------- .../make-3.82-025-expensive_glob.patch | 116 -------- 13 files changed, 1 insertion(+), 937 deletions(-) delete mode 100644 packages/devel/make/patches/make-3.82-012-j8k.patch delete mode 100644 packages/devel/make/patches/make-3.82-013-getcwd.patch delete mode 100644 packages/devel/make/patches/make-3.82-014-err-reporting.patch delete mode 100644 packages/devel/make/patches/make-3.82-017-newlines.patch delete mode 100644 packages/devel/make/patches/make-3.82-018-jobserver.patch delete mode 100644 packages/devel/make/patches/make-3.82-019-bugfixes.patch delete mode 100644 packages/devel/make/patches/make-3.82-020-sort-blank.patch delete mode 100644 packages/devel/make/patches/make-3.82-021-copy-on-expand.patch delete mode 100644 packages/devel/make/patches/make-3.82-022-parallel-remake.patch delete mode 100644 packages/devel/make/patches/make-3.82-023-warn_undefined_function.patch delete mode 100644 packages/devel/make/patches/make-3.82-024-trace.patch delete mode 100644 packages/devel/make/patches/make-3.82-025-expensive_glob.patch diff --git a/packages/devel/make/package.mk b/packages/devel/make/package.mk index 20d5e48764..8a4765ca2a 100644 --- a/packages/devel/make/package.mk +++ b/packages/devel/make/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="make" -PKG_VERSION="3.82" +PKG_VERSION="4.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/devel/make/patches/make-3.82-012-j8k.patch b/packages/devel/make/patches/make-3.82-012-j8k.patch deleted file mode 100644 index b5fa357777..0000000000 --- a/packages/devel/make/patches/make-3.82-012-j8k.patch +++ /dev/null @@ -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 diff --git a/packages/devel/make/patches/make-3.82-013-getcwd.patch b/packages/devel/make/patches/make-3.82-013-getcwd.patch deleted file mode 100644 index b688732edb..0000000000 --- a/packages/devel/make/patches/make-3.82-013-getcwd.patch +++ /dev/null @@ -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 diff --git a/packages/devel/make/patches/make-3.82-014-err-reporting.patch b/packages/devel/make/patches/make-3.82-014-err-reporting.patch deleted file mode 100644 index 2f5b3c638d..0000000000 --- a/packages/devel/make/patches/make-3.82-014-err-reporting.patch +++ /dev/null @@ -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 diff --git a/packages/devel/make/patches/make-3.82-017-newlines.patch b/packages/devel/make/patches/make-3.82-017-newlines.patch deleted file mode 100644 index d86018ab4e..0000000000 --- a/packages/devel/make/patches/make-3.82-017-newlines.patch +++ /dev/null @@ -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 diff --git a/packages/devel/make/patches/make-3.82-018-jobserver.patch b/packages/devel/make/patches/make-3.82-018-jobserver.patch deleted file mode 100644 index 2a855031dd..0000000000 --- a/packages/devel/make/patches/make-3.82-018-jobserver.patch +++ /dev/null @@ -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 diff --git a/packages/devel/make/patches/make-3.82-019-bugfixes.patch b/packages/devel/make/patches/make-3.82-019-bugfixes.patch deleted file mode 100644 index e89f14e0d5..0000000000 --- a/packages/devel/make/patches/make-3.82-019-bugfixes.patch +++ /dev/null @@ -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 -+ -+ * 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 -+ -+ * main.c (main): Expand MAKEFLAGS before adding it to the -+ environment when re-exec'ing. Fixes Savannah bug #30723. -+ - 2010-07-28 Paul Smith - - 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 -+ -+ * 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 -+ -+ * scripts/features/reinvoke: Ensure command line variable settings -+ are preserved across make re-exec. Tests Savannah bug #30723. -+ - 2010-07-28 Paul Smith - - * 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 . - -+%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; diff --git a/packages/devel/make/patches/make-3.82-020-sort-blank.patch b/packages/devel/make/patches/make-3.82-020-sort-blank.patch deleted file mode 100644 index 7cfbbc079e..0000000000 --- a/packages/devel/make/patches/make-3.82-020-sort-blank.patch +++ /dev/null @@ -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~ diff --git a/packages/devel/make/patches/make-3.82-021-copy-on-expand.patch b/packages/devel/make/patches/make-3.82-021-copy-on-expand.patch deleted file mode 100644 index 55354ea56a..0000000000 --- a/packages/devel/make/patches/make-3.82-021-copy-on-expand.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 2f661dc20617ba6fdeb2d7e243dc898653faafea Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 -+ -+ * expand.c (variable_expand_string): Always copy the string -+ to expand. -+ - 2010-08-13 Paul Smith - - * 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 - diff --git a/packages/devel/make/patches/make-3.82-022-parallel-remake.patch b/packages/devel/make/patches/make-3.82-022-parallel-remake.patch deleted file mode 100644 index ed601fbb5c..0000000000 --- a/packages/devel/make/patches/make-3.82-022-parallel-remake.patch +++ /dev/null @@ -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 ---- a/main.c 18 Sep 2011 23:39:26 -0000 1.247 -+++ b/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); diff --git a/packages/devel/make/patches/make-3.82-023-warn_undefined_function.patch b/packages/devel/make/patches/make-3.82-023-warn_undefined_function.patch deleted file mode 100644 index 37566ce5ed..0000000000 --- a/packages/devel/make/patches/make-3.82-023-warn_undefined_function.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/function.c b/function.c -index e2f6c8c..ff0527f 100644 ---- a/function.c -+++ b/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/main.c b/main.c -index c6989e3..2f545a7 100644 ---- a/main.c -+++ b/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.h b/make.h -index 60ade4c..f2ebb56 100644 ---- a/make.h -+++ b/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/variable.h b/variable.h -index c215867..02713c1 100644 ---- a/variable.h -+++ b/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 diff --git a/packages/devel/make/patches/make-3.82-024-trace.patch b/packages/devel/make/patches/make-3.82-024-trace.patch deleted file mode 100644 index b8cafa97b1..0000000000 --- a/packages/devel/make/patches/make-3.82-024-trace.patch +++ /dev/null @@ -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; diff --git a/packages/devel/make/patches/make-3.82-025-expensive_glob.patch b/packages/devel/make/patches/make-3.82-025-expensive_glob.patch deleted file mode 100644 index 539b2e1f70..0000000000 --- a/packages/devel/make/patches/make-3.82-025-expensive_glob.patch +++ /dev/null @@ -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 ---- a/read.c 29 Apr 2011 15:27:39 -0000 1.198 -+++ b/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 ---- a/tests/scripts/functions/wildcard 13 Jun 2009 21:21:49 -0000 1.6 -+++ b/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;