[RFC PATCH v4 2/3] Support per-target .ONESHELL

2024-12-23 Thread Britton Leo Kerin
--- src/commands.c | 206 ++--- src/commands.h | 18 - src/default.c | 3 + src/file.c | 11 +++ src/filedef.h | 2 + src/job.c | 111 +- src/main.c | 9 ++- src/makeint.h | 2 +- src/read.c

[RFC PATCH 2/3] Functioning per-target .ONESHELL...

2024-11-11 Thread Britton Leo Kerin
way, with .ONESHELL: (global) and .NOTONESHELL: targets, but this would mean yet another special target for a minority sport feature. --- src/file.c| 12 src/filedef.h | 2 ++ src/job.c | 28 src/main.c| 5 + src/read.c| 10 ++ sr

[bug #65775] [PATCH 2/2] win32 dir.c eliminate OS specific dir-cache agressive reread vs posix

2024-05-22 Thread Eli Zaretskii
Update of bug #65775 (group make): Assigned to:None => eliz Component Version:None => SCM Triage Status:None => Medium Effort ___

[bug #65775] [PATCH 2/2] win32 dir.c eliminate OS specific dir-cache agressive reread vs posix

2024-05-22 Thread Dan D
URL: <https://savannah.gnu.org/bugs/?65775> Summary: [PATCH 2/2] win32 dir.c eliminate OS specific dir-cache agressive reread vs posix Group: make Submitter: bulk88 Submitted: Thu 23 May 2024 12:15:27

Re: [PATCH] Fix jobserver does not work on OS/2

2024-03-28 Thread Paul Smith
On Wed, 2023-12-13 at 20:05 +0900, KO Myung-Hun wrote: > mkfifo() on OS/2 is a dummy, even it returns a wrong value on error. > > Do not use it on OS/2. I applied this change, thanks! -- Paul D. Smith Find some GNU Make tips at: https://www.gnu.org

armv7l: 2 Tests in 2 Categories Failed

2024-02-24 Thread Frank Heckenbach
I wrote: : make-4.4.1.tar.gz : : Linux lime2 5.15.93-sunxi #23.02.2 SMP Fri Feb 17 23:49:46 UTC 2023 armv7l GNU/Linux : : 2 Tests in 2 Categories Failed (See .diff* files in work dir for details) :-( Same problem on Linux raspberrypi 6.1.0-rpi8-rpi-v6 #1 Raspbian 1:6.1.73-1+rpt1 (2024-01-25

[PATCH] Fix jobserver does not work on OS/2

2023-12-13 Thread KO Myung-Hun
mkfifo() on OS/2 is a dummy, even it returns a wrong value on error. Do not use it on OS/2. * src/makeint.h (JOBSERVER_USE_FIFO): Do not define on OS/2. --- src/makeint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/makeint.h b/src/makeint.h index d55ccb6f

armv7l: 2 Tests in 2 Categories Failed

2023-07-08 Thread Frank Heckenbach
make-4.4.1.tar.gz Linux lime2 5.15.93-sunxi #23.02.2 SMP Fri Feb 17 23:49:46 UTC 2023 armv7l GNU/Linux 2 Tests in 2 Categories Failed (See .diff* files in work dir for details) :-( makeerror-4.4.1-armv7l-unknown-linux-gnueabihf-bxur.tar.gz Description: application/gzip

Re: [PING^2] [PATCH 0/6] Fix compilation errors in maintainer mode

2023-07-04 Thread Paul Smith
On Sat, 2023-07-01 at 10:38 -0400, Paul Smith wrote: > On Sat, 2023-07-01 at 11:50 +0200, Torbjorn SVENSSON wrote: > > Could anyone with write access review these patches and apply them > > for me if there is no comments on them? > > I have them applied locally.  I'll try to get them pushed in the

Re: [PING^2] [PATCH 0/6] Fix compilation errors in maintainer mode

2023-07-01 Thread Paul Smith
On Sat, 2023-07-01 at 11:50 +0200, Torbjorn SVENSSON wrote: > Could anyone with write access review these patches and apply them > for me if there is no comments on them? I have them applied locally. I'll try to get them pushed in the next few days.

[PING^2] [PATCH 0/6] Fix compilation errors in maintainer mode

2023-07-01 Thread Torbjorn SVENSSON
Gentle 2nd ping. Could anyone with write access review these patches and apply them for me if there is no comments on them? Kind regards, Torbjörn On 2023-06-19 09:03, Torbjorn SVENSSON wrote: Ping! Kind regards, Torbjörn On 2023-06-09 16:09, Torbjörn SVENSSON wrote: Hi, This patch serie

[PATCH 2/6] Fix GCC compile warning for "format-security"

2023-06-09 Thread Torbjörn SVENSSON
Contributed by STMicroelectronics Signed-off-by: Torbjörn SVENSSON --- src/job.c| 2 +- src/main.c | 4 ++-- src/w32/subproc/w32err.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/job.c b/src/job.c index 34ef9b80..f7f97010 100644 --- a

[PATCH 2/3] make -p uses same clock as rest of 'make'

2023-05-10 Thread Paul Eggert
Without this patch, the output of 'make -p' would generate output that sometimes incorrectly implied that the clock jumped backwards. * src/main.c (time_now): New function. (print_data_base): Use it. --- src/main.c | 33 +++-- 1 file changed, 31 insert

Re: [PATCH] Implement ttyname() for OS/2

2023-01-17 Thread KO Myung-Hun
Hi/2. KO Myung-Hun wrote: > OS/2 kLIBC has a declaration, but has not implemented. > ... > + if (type == HANDTYPE_DEVICE) > +{ > + if ((attr & 3) == 3) > +return (char *) "/dev/con"; > + > + if ((attr & 4) == 4) > +

[PATCH] Implement ttyname() for OS/2

2023-01-17 Thread KO Myung-Hun
OS/2 kLIBC has a declaration, but has not implemented. * Makefile.am [OS/2]: define OS2ENV. * configure.ac [OS/2]: define os2_SRCS. * src/os2_ttyname.c: Implement ttyname() for OS/2. --- Makefile.am | 6 ++ configure.ac | 9 src/os2_ttyname.c | 53

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-17 Thread KO Myung-Hun
f it has nothing to do with > actually creating a .exe file? GNU Make stops if it cannot find a target like: make: *** No rule to make target 'foo.exe'. Stop. I think, it's possible to use this logic in order to find a `foo.exe' target. And if it fails, check a `foo.exe&

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-16 Thread Paul Smith
On Tue, 2023-01-17 at 01:38 +0900, KO Myung-Hun wrote: > What I meant is checking the existence of a rule for a target not a > real file built for a target. But how do you check for a "rule for a target"? What if the pattern rule is "%e" not "%.exe"? That will still match of course. Or "%xe" or

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-16 Thread KO Myung-Hun
Hi/2. Paul Smith wrote: > On Mon, 2023-01-16 at 22:14 +0900, KO Myung-Hun wrote: >>> But this does not seem like an easy thing to accomplish, at all. >>> What if there is a "%.exe" pattern rule, not an explicit rule for >>> "foo.exe"? >> &

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-16 Thread Paul Smith
On Mon, 2023-01-16 at 22:14 +0900, KO Myung-Hun wrote: > > But this does not seem like an easy thing to accomplish, at all.  > > What if there is a "%.exe" pattern rule, not an explicit rule for > > "foo.exe"? > > I think, it's possible to do so by finding a target as GNU Make finds > dependencies

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-16 Thread KO Myung-Hun
Hi/2. Paul Smith wrote: > On Mon, 2023-01-16 at 00:15 +0900, KO Myung-Hun wrote: >> Then, this patch is acceptable? Or MSYS is a special case ? > > I don't think this patch is a good idea. I said in my initial email: > >> I don't think I like this change.

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-15 Thread Paul Smith
On Mon, 2023-01-16 at 00:15 +0900, KO Myung-Hun wrote: > Then, this patch is acceptable? Or MSYS is a special case ? I don't think this patch is a good idea. I said in my initial email: > I don't think I like this change. I understand its usefulness but in > general make never tries to manipula

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-15 Thread KO Myung-Hun
Hi/2. Eli Zaretskii wrote: >> Date: Sun, 15 Jan 2023 00:57:56 +0900 >> From: KO Myung-Hun >> CC: bug-make@gnu.org >> >>> How do you mean "make of mingw does not require $(EXEEXT)"? AFAICT, >>> if the Makefile defines a target FOO, and t

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-14 Thread Eli Zaretskii
ate wrt its dependencies, the MinGW Make will recompile > > anyway, because it doesn't understand that linking FOO produces > > FOO.exe. > > > > So I think MinGW and OS/2 are in the same wagon here. > > I've tested make v3.81 for i686-pc-msys shipped with msys.

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-14 Thread KO Myung-Hun
Hi/2. Eli Zaretskii wrote: >> Date: Sat, 14 Jan 2023 23:40:57 +0900 >> From: KO Myung-Hun >> CC: bug-make@gnu.org >> >>> Please describe the use case in detail. This situation exists on >>> other platforms, not just of OS/2, and we don't do anythi

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-14 Thread Eli Zaretskii
> Date: Sat, 14 Jan 2023 23:40:57 +0900 > From: KO Myung-Hun > CC: bug-make@gnu.org > > > Please describe the use case in detail. This situation exists on > > other platforms, not just of OS/2, and we don't do anything like that > > for those other targets, A

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-14 Thread KO Myung-Hun
Hi/2. Paul Smith wrote: > On Fri, 2023-01-13 at 22:27 +0900, KO Myung-Hun wrote: >> This pattern is usually used on UNIX. However, on OS/2, gcc creates >> foo.exe not foo when an extension is not present, and Make check foo >> only. Therefore Make tries to build foo whenever

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-14 Thread KO Myung-Hun
Hi/2. Eli Zaretskii wrote: >> From: KO Myung-Hun >> Date: Fri, 13 Jan 2023 22:27:43 +0900 >> >> For example, >> >> foo: foo.c >> gcc $@ $< >> >> This pattern is usually used on UNIX. However, on OS/2, gcc creates >> foo.exe not f

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-13 Thread Paul Smith
On Fri, 2023-01-13 at 22:27 +0900, KO Myung-Hun wrote: > This pattern is usually used on UNIX. However, on OS/2, gcc creates > foo.exe not foo when an extension is not present, and Make check foo > only. Therefore Make tries to build foo whenever called. I don't think I like t

Re: [PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-13 Thread Eli Zaretskii
> From: KO Myung-Hun > Date: Fri, 13 Jan 2023 22:27:43 +0900 > > For example, > > foo: foo.c > gcc $@ $< > > This pattern is usually used on UNIX. However, on OS/2, gcc creates > foo.exe not foo when an extension is not present, and Make check foo > onl

[PATCH] Check .exe as well when a target does not exist on OS/2

2023-01-13 Thread KO Myung-Hun
For example, foo: foo.c gcc $@ $< This pattern is usually used on UNIX. However, on OS/2, gcc creates foo.exe not foo when an extension is not present, and Make check foo only. Therefore Make tries to build foo whenever called. * src/remake.c (f_mtime) [EMX]: Check a target again

Re: [PATCH 0/8] Fix compilation on OS/2

2023-01-12 Thread KO Myung-Hun
Hi/2. Paul Smith wrote: > On Sun, 2022-11-20 at 23:42 +0900, KO Myung-Hun wrote: >> These patches fix compilation on OS/2. > > I have applied some of these patches as-is, and modified others, but I > believe all the changes needed have been pushed to Git. I've confirme

Re: [PATCH 0/8] Fix compilation on OS/2

2023-01-08 Thread Paul Smith
On Sun, 2022-11-20 at 23:42 +0900, KO Myung-Hun wrote: > These patches fix compilation on OS/2. I have applied some of these patches as-is, and modified others, but I believe all the changes needed have been pushed to Git.

[PATCH 6/8] Fix [-Werror=incompatible-pointer-types] on OS/2

2022-11-20 Thread KO Myung-Hun
* src/main.c (main) [__EMX__]: Type cast explicitly. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index eec93656..af3ce702 100644 --- a/src/main.c +++ b/src/main.c @@ -2782,7 +2782,7 @@ main (int argc, char **argv, char **envp

[PATCH 7/8] Fix [-Werror=shadow] on OS/2

2022-11-20 Thread KO Myung-Hun
* src/job.c (construct_command_argv_internal) [__EMX__]: Just reuse variables. --- src/job.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/job.c b/src/job.c index 9f1e4a3b..800f3b30 100644 --- a/src/job.c +++ b/src/job.c @@ -3553,9 +3553,9

[PATCH 3/8] Fix assignment of read-only location error on OS/2

2022-11-20 Thread KO Myung-Hun
* src/job.c (construct_command_argv_internal) [__EMX__]: Use a buffer allocated in a stack. --- src/job.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/job.c b/src/job.c index b78f279c..aa848f0e 100644 --- a/src/job.c +++ b/src/job.c @@ -3226,7 +3226,11 @@ construct_

[PATCH 2/8] Define a HAVE___STRCHRNUL macro properly

2022-11-20 Thread KO Myung-Hun
lib/fnmatch.c tests a HAVE___STRCHRNUL macro to implement an alternative __strchrnul(). Without this, compilation fails on OS/2 kLIBC due to duplicated declarations of __strchrnul() like this: - gcc -DHAVE_CONFIG_H -I. -I../src -D__ST_MT_ERRNO__ -Wno-cast-qual -Wno-conversion -Wno-float

[PATCH 5/8] Fix [-Werror=discarded-qualifiers] on OS/2

2022-11-20 Thread KO Myung-Hun
* src/dir.c (dir_contents_file_exists_p) [__EMX__]: Use a buffer allocated in a stack. * src/job.c (exec_command) [__EMX__]: Type cast explicitly. --- src/dir.c | 6 +- src/job.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dir.c b/src/dir.c index b47e94fe

[PATCH 4/8] Fix [-Werror=unused-variable] on OS/2

2022-11-20 Thread KO Myung-Hun
* src/getopt.c (_getopt_initialize): Use statements without any effect. * src/posixos.c (set_blocking): Declare parameters with UNUSED. * src/remake.c (f_mtime) [__EMX__]: Declare adjustment with UNUSED. --- src/getopt.c | 3 +++ src/posixos.c | 2 +- src/remake.c | 1 + 3 files changed, 5

[PATCH 0/8] Fix compilation on OS/2

2022-11-20 Thread KO Myung-Hun
Hi/2. These patches fix compilation on OS/2. And these are based on git repo. Review, please...

[PATCH 8/8] Fix [-Werror=dangling-else] on OS/2

2022-11-20 Thread KO Myung-Hun
* src/getopt.c (_getopt_internal): Insert explicit braces. --- src/getopt.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/getopt.c b/src/getopt.c index fc7cead4..1535a3d5 100644 --- a/src/getopt.c +++ b/src/getopt.c @@ -680,16 +680,18 @@ _getopt_i

Re: [PATCH 1/2] Fix duplicated __strchrnul() declaration error on OS/2 kLIBC

2022-11-14 Thread KO Myung-Hun
Hi/2. Paul Smith wrote: > On Wed, 2022-11-09 at 22:45 +0900, KO Myung-Hun wrote: >> OS/2 kLIBC has __strchrnul(). But HAVE___STRCHRNUL is undefined. >> 'static' declarion of __strchrnul() causes an error with gcc4 because >> OS/2 kLIBC declares __strchrnul() as p

Re: [PATCH 1/2] Fix duplicated __strchrnul() declaration error on OS/2 kLIBC

2022-11-13 Thread Paul Smith
On Wed, 2022-11-09 at 22:45 +0900, KO Myung-Hun wrote: > OS/2 kLIBC has __strchrnul(). But HAVE___STRCHRNUL is undefined. > 'static' declarion of __strchrnul() causes an error with gcc4 because > OS/2 kLIBC declares __strchrnul() as public. I assume kLIBC is a libc implementa

[PATCH 1/2] Fix duplicated __strchrnul() declaration error on OS/2 kLIBC

2022-11-09 Thread KO Myung-Hun
OS/2 kLIBC has __strchrnul(). But HAVE___STRCHRNUL is undefined. 'static' declarion of __strchrnul() causes an error with gcc4 because OS/2 kLIBC declares __strchrnul() as public. - gcc -DHAVE_CONFIG_H -I. -I../src -D__ST_MT_ERRNO__ -Wno-cast-qual -Wno-conversion -Wno-float-

[PATCH 2/2] Fix assignment of read-only location error OS/2

2022-11-09 Thread KO Myung-Hun
- gcc -DHAVE_CONFIG_H -Isrc -I./src -Ilib -I./lib -DLIBDIR=\"/usr/local/lib\" -DLOCALEDIR=\"/usr/local/share/locale\" -D__ST_MT_ERRNO__ -O2 -Zomf -Zmt -MT src/job.o -MD -MP -MF $depbase.Tpo -c -o src/job.o src/job.c &&\ mv -f $depbase.Tpo $depbase.Po src/job.c: In function '

Re: Bug with collect2.exe: error: ld returned 1 exit status make: *** [Makefile:2: all] Error 1

2022-08-09 Thread Paul Smith
On Tue, 2022-08-09 at 17:38 +0200, Ibrahim Salma wrote: > Hi, i am having problem with makefile or make command can you please > help me it's giving me an error message like this: > > collect2.exe: error: ld returned 1 exit status > make: *** [Makefile:2: all] Error 1 T

Bug with collect2.exe: error: ld returned 1 exit status make: *** [Makefile:2: all] Error 1

2022-08-09 Thread Ibrahim Salma
Hi, i am having problem with makefile or make command can you please help me it's giving me an error message like this: collect2.exe: error: ld returned 1 exit status make: *** [Makefile:2: all] Error 1 This is the code in the Makefile: all: g++ -I src/include -L src/lib -o main mai

Re: [PATCH v1 2/2] misc: Replace strcmp with memcmp when it obviously works

2022-04-24 Thread Paul Smith
I applied both of these patches, thanks!

[PATCH v1 2/2] misc: Replace strcmp with memcmp when it obviously works

2022-04-21 Thread Noah Goldstein
ete ... No Failures :-) = Regression PASSED: GNU Make 4.3.90 (x86_64-pc-linux-gnu) built with gcc = ``` --- src/commands.c | 2 +- src/function.c | 9 + src/main.c | 2 +- src/read.c | 2 +-

[PATCH v1 1/2] hash: Remove unnecessary `isupper` check before `tolower`

2022-04-21 Thread Noah Goldstein
Regression PASSED: GNU Make 4.3.90 (x86_64-pc-linux-gnu) built with gcc = ``` --- src/hash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hash.h b/src/hash.h index 667d65

[PATCH 2/3] Use strtol instead of atoi

2021-07-16 Thread Jouke Witteveen
strtol is part of C89 and a fallback is provided by gnulib * src/function.c (func_word, func_wordlist): Use strtol instead of atoi * test/scripts/functions/word: Add out-of-range verification testing --- bootstrap.conf | 1 + src/function.c | 51 ++

Re: 4.3: -p: exit status is 2

2020-12-19 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20201219002850.u0mml%stef...@sdaoden.eu>: |Paul Smith wrote in | <898afb17671ea69f18ae7a4ed22a57aa35eb87e0.ca...@gnu.org>: ||On Sat, 2020-12-19 at 00:04 +0100, Steffen Nurpmeso wrote: ||> While finding a way to truly detect whether being run by BSD make ||> (which c

Re: 4.3: -p: exit status is 2

2020-12-18 Thread Steffen Nurpmeso
t; to |> monitors its childs) i stumbled upon the fact that |> |> $ make -p |> |> exits 2. | |Yes. The manual says specifically: | |> Print the data base (rules and variable values) that results from |> reading the makefiles; then EXECUTE AS USUAL OR AS OTHERWISE |

Re: 4.3: -p: exit status is 2

2020-12-18 Thread Paul Smith
On Sat, 2020-12-19 at 00:04 +0100, Steffen Nurpmeso wrote: > While finding a way to truly detect whether being run by BSD make > (which cannot supervise a shell script that turns on "set -m" to > monitors its childs) i stumbled upon the fact that > > $ make -p >

4.3: -p: exit status is 2

2020-12-18 Thread Steffen Nurpmeso
Hello! While finding a way to truly detect whether being run by BSD make (which cannot supervise a shell script that turns on "set -m" to monitors its childs) i stumbled upon the fact that $ make -p exits 2. Even if i follow the manual advice $ make -p -f /dev/null i get comp

Re: [PATCH 1/2] * src/function.c: Introduce the 'let' built-in function

2020-12-06 Thread Paul Smith
On Fri, 2020-10-23 at 09:14 -0400, Paul Smith wrote: > On Fri, 2020-10-09 at 16:36 +0200, Jouke Witteveen wrote: > > > This was sent before at the end of last year. Meanwhile, the > > copyright of my contributions is assigned to the FSF, so I picked > > this up again and added some documentation (

Re: [PATCH 2/2 V2] * doc/make.texi: Document the let function

2020-12-06 Thread Paul Smith
On Sat, 2020-10-10 at 17:50 -0500, Pete Dietl wrote: > Also, I ran ‘’make html”, but it doesn’t look like it does on he > website. Does anyone know how I can build the docs to look like the > website locally? It's not so easy to do unfortunately. It requires a bunch of prerequisites, that are ne

[PATCH 1/2 V2] [SV 51286] Support for lexically scoped variables

2020-11-01 Thread Jouke Witteveen
* src/function.c: Introduce the 'let' built-in function * tests/scripts/functions/let: Tests for the 'let' built-in function --- This replaces: > [PATCH 1/2] * src/function.c: Introduce the 'let' built-in function and goes together with: > [PATCH 2/2 V

Re: [PATCH 1/2] * src/function.c: Introduce the 'let' built-in function

2020-10-23 Thread Paul Smith
On Fri, 2020-10-09 at 16:36 +0200, Jouke Witteveen wrote: > This was sent before at the end of last year. Meanwhile, the > copyright of my contributions is assigned to the FSF, so I picked > this up again and added some documentation (next patch). Sorry for the delay. I have been super-busy (you'

Re: [PATCH 1/2] * src/function.c: Introduce the 'let' built-in function

2020-10-23 Thread Jouke Witteveen
On Fri, Oct 9, 2020 at 4:36 PM Jouke Witteveen wrote: > > --- > This was sent before at the end of last year. Meanwhile, the copyright of my > contributions is assigned to the FSF, so I picked this up again and added some > documentation (next patch). > > The previous discussion was titled "[RFC]

Re: [PATCH 2/2 V2] * doc/make.texi: Document the let function

2020-10-10 Thread Pete Dietl
This whole section is called “Functions for Transforming Text,” but is this really an accurate title anymore? Maybe we should just rename it to “Functions.” Also, I ran ‘’make html”, but it doesn’t look like it does on he website. Does anyone know how I can build the docs to look like the website

[PATCH 2/2 V2] * doc/make.texi: Document the let function

2020-10-10 Thread Jouke Witteveen
--- Thanks to Martin Dorey for spotting a typo in the first version of this patch. I fixed a few others typos too in this revision. This revision is sent just so that the previous version does not get applied accidentally. There may still be parts that could be improved. The first patch in this

[PATCH 2/2] * doc/make.text: Document the let function

2020-10-09 Thread Jouke Witteveen
--- I think this covers the let function, but comments/suggestions are welcome in case I missed something. Regards, - Jouke doc/make.texi | 87 --- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/doc/make.texi b/doc/make.texi index

[PATCH 1/2] * src/function.c: Introduce the 'let' built-in function

2020-10-09 Thread Jouke Witteveen
me UNUSED) return o; } +static char * +func_let (char *o, char **argv, const char *funcname UNUSED) +{ + /* expand only the first two. */ + char *varnames = expand_argument (argv[0], NULL); + char *list = expand_argument (argv[1], NULL); + const char *body = argv[2]; + + const char *list_itera

Re: [PATCH 2/2] compare function

2020-06-09 Thread Edward Welbourne
ng in an $(if). Fair enough, you make a compelling case. > Indeed, the proposals for sum and product make sense, but those for > subtraction and division cannot be made to work, since the operations > are not associative. That doesn't preclude the "put op between each pair of

Re: [PATCH 2/2] compare function

2020-06-09 Thread Jouke Witteveen
On Tue, Jun 9, 2020 at 10:53 AM Edward Welbourne wrote: > > Jouke Witteveen (8 June 2020 22:20) > > It differs from his original proposal in that it behaves differently > > when given 4 or 5 arguments. In short, it's signature is > > > > $(compare lhs,rhs,less-than[,greater-or-equal]) > > $(comp

Re: [PATCH 2/2] compare function

2020-06-09 Thread Edward Welbourne
Jouke Witteveen (8 June 2020 22:20) > This is an implementation of a $(compare) function as proposed by > Edward Welbourne. Yay ;^> Looks promising in general. As ever, review consists mostly of criticism, so let me just say I approve of the general plan, before I start in on that ... > It differ

[PATCH 1/2] Use strtol instead of atoi

2020-06-08 Thread Jouke Witteveen
strtol is part of C89 and a fallback is provided by gnulib * src/function.c (func_word, func_wordlist): Use strtol instead of atoi * test/scripts/functions/word: Add out-of-range verification testing --- Here is a proposal to start a more thorough support of numerical values. While earlier discus

[PATCH 2/2] compare function

2020-06-08 Thread Jouke Witteveen
hat $(compare) on its own (without any mathematical operators in make) can be very useful. --- src/function.c | 47 +++ tests/scripts/functions/compare | 57 +++++ 2 files changed, 104 insertions(+) create mode 100644 tests/script

Re: [PATCH v2 2/3] [SV 54161] Fix second expansion of $*

2019-12-18 Thread Jouke Witteveen
On Wed, Dec 18, 2019 at 4:19 PM Paul Smith wrote: > > On Wed, 2019-12-18 at 16:02 +0100, Jouke Witteveen wrote: > > Your se_implicit test case got left out of your commit. I guess this > > was unintentional. > > I'm not sure what you mean? It's there...? My mistake. I must have done something wr

Re: [PATCH v2 2/3] [SV 54161] Fix second expansion of $*

2019-12-18 Thread Paul Smith
On Wed, 2019-12-18 at 16:02 +0100, Jouke Witteveen wrote: > Your se_implicit test case got left out of your commit. I guess this > was unintentional. I'm not sure what you mean? It's there...? > Presumably, the test case was based on [SV 54161]. The bug can now be > closed. Yes, will do that la

Re: [PATCH v2 2/3] [SV 54161] Fix second expansion of $*

2019-12-18 Thread Jouke Witteveen
On Wed, Dec 18, 2019 at 3:11 PM Paul Smith wrote: > I applied your changes although updates were needed. > > For the future, please note that (a) changes should contain updates to the > regression tests to show the error and ensure the fix works, (b) commit > messages need to be formatted properly

Re: [PATCH v2 2/3] [SV 54161] Fix second expansion of $*

2019-12-18 Thread Paul Smith
On Sat, 2019-11-23 at 12:22 +0100, Jouke Witteveen wrote: > Is there anything I can do to further review and/or acceptance of this > patch I sent last month? I applied your changes although updates were needed. For the future, please note that (a) changes should contain updates to the regression

Re: [PATCH v2 2/3] [SV 54161] Fix second expansion of $*

2019-11-23 Thread Jouke Witteveen
On Sat, Oct 26, 2019 at 12:24 PM Jouke Witteveen wrote: > > Make sure the second expansion of $* in the prerequisites matches that of > $* in the recipe. This means that if we would add the dir of the stem to > the prerequisites, we should replace % by $(*F) in the first expansion. > Otherwise, w

[PATCH v2 2/3] [SV 54161] Fix second expansion of $*

2019-10-26 Thread Jouke Witteveen
he stem. */ p = lindex (nptr, nptr + len, '%'); if (p == 0) @@ -606,13 +619,22 @@ pattern_search (struct file *file, int archive, else { size_t i = p - nptr; - memcp

Re: [PATCH 2/2] [SV 54161] Fix second expansion of $*

2019-10-12 Thread Jouke Witteveen
On Sat, Oct 12, 2019 at 3:08 PM Jouke Witteveen wrote: > > On Sat, Oct 12, 2019 at 2:50 PM Paul Smith wrote: > > > > On Sat, 2019-10-12 at 13:11 +0200, Jouke Witteveen wrote: > > > Before, this was only expanded to $(*F) in prerequisites. > > > > Sorry b

Re: [PATCH 2/2] [SV 54161] Fix second expansion of $*

2019-10-12 Thread Jouke Witteveen
On Sat, Oct 12, 2019 at 2:50 PM Paul Smith wrote: > > On Sat, 2019-10-12 at 13:11 +0200, Jouke Witteveen wrote: > > Before, this was only expanded to $(*F) in prerequisites. > > Sorry but I need more information than this; I can't understand this > change. > > The

Re: [PATCH 2/2] [SV 54161] Fix second expansion of $*

2019-10-12 Thread Paul Smith
On Sat, 2019-10-12 at 13:11 +0200, Jouke Witteveen wrote: > Before, this was only expanded to $(*F) in prerequisites. Sorry but I need more information than this; I can't understand this change. The bug in Savannah, as I understand it, is that directory prefixes which should be present are missin

[PATCH 1/2] Get rid of superfluous variables in stem tracking

2019-10-12 Thread Jouke Witteveen
--- Some minor things I came across when working on a fix for [SV 54161], which I'll send next. Sure, the comments say that we should get rid of stem_str, but the reality is that this variable is probably here to stay. Using it for constructing the stem makes the kinship to another place where the

[PATCH 2/2] [SV 54161] Fix second expansion of $*

2019-10-12 Thread Jouke Witteveen
the stem. */ p = lindex (nptr, nptr + len, '%'); @@ -607,9 +620,9 @@ pattern_search (struct file *file, int archive, { size_t i = p - nptr; memcpy (depname, nptr, i); - memcpy (d

Re: vpathplus test 2 patch

2019-09-22 Thread Paul Smith
On Mon, 2019-09-16 at 15:07 +0200, Andreas Schwab wrote: > > I didn't apply this change because I'm not exactly sure where I want to > > go with this yet. I'm not excited about tweaking the test suite based > > on the endianness of the underlying system but it seems silly to reduce > > the perform

Re: vpathplus test 2 patch

2019-09-16 Thread Andreas Schwab
On Sep 16 2019, Paul Smith wrote: > On Thu, 2019-09-12 at 09:33 +0200, Andreas Schwab wrote: >> On Sep 11 2019, Dmitry Goncharov wrote: >> > On Wed, Sep 11, 2019 at 2:51 AM Andreas Schwab wrote: >> > > > The new hashing mechanism hashes differently

Re: vpathplus test 2 patch

2019-09-16 Thread Paul Smith
On Thu, 2019-09-12 at 09:33 +0200, Andreas Schwab wrote: > On Sep 11 2019, Dmitry Goncharov wrote: > > On Wed, Sep 11, 2019 at 2:51 AM Andreas Schwab wrote: > > > > The new hashing mechanism hashes differently on big vs little > > > > endian. > > >

Re: vpathplus test 2 patch

2019-09-12 Thread Andreas Schwab
On Sep 11 2019, Dmitry Goncharov wrote: > On Wed, Sep 11, 2019 at 2:51 AM Andreas Schwab wrote: >> >> > The new hashing mechanism hashes differently on big vs little endian. >> >> Should this be considered as a bug? > > I don't think the order or remo

Re: vpathplus test 2 patch

2019-09-11 Thread Dmitry Goncharov via Bug reports and discussion for GNU make
On Wed, Sep 11, 2019 at 2:51 AM Andreas Schwab wrote: > > > The new hashing mechanism hashes differently on big vs little endian. > > Should this be considered as a bug? I don't think the order or removal of intermediate files was specified. Do you have a specific use c

Re: vpathplus test 2 patch

2019-09-10 Thread Andreas Schwab
On Sep 10 2019, Dmitry Goncharov via Bug reports and discussion for GNU make wrote: > The new hashing mechanism hashes differently on big vs little endian. Should this be considered as a bug? Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4B

vpathplus test 2 patch

2019-09-10 Thread Dmitry Goncharov via Bug reports and discussion for GNU make
The new hashing mechanism hashes differently on big vs little endian. This makes vpathplus test 2 fail, because the order of intermediate files inter.b and inter.c is now dependent on endiannes. regards, Dmitry diff --git a/tests/scripts/features/vpathplus b/tests/scripts/features/vpathplus

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-08-06 Thread Barath Aron
On 08/05/2018 02:50 PM, Paul Smith wrote: I pushed these changes to Git yesterday. Please verify it works in your environment. Commit that I used: a1bb739165a944769cbb4a6e4f027ac9c2587122 Threos libc does not support the write of 'environ'. Thus, I had to add minor changes. Some part of it

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-08-05 Thread Paul Smith
On Mon, 2018-07-30 at 12:30 +0200, Barath Aron wrote: > > I also added a configure --disable-posix-spawn option for those who > > want to continue to use fork()/vfork() even when posix_spawn() is > > available. > > Perfect. I can't wait to try it. :) I pushed these changes to Git yesterday. Plea

[bug #54428] make can block after being killed (2)

2018-08-02 Thread Koen Van Hoof
URL: <http://savannah.gnu.org/bugs/?54428> Summary: make can block after being killed (2) Project: make Submitted by: kvho Submitted on: Thu 02 Aug 2018 01:19:56 PM CEST Severity: 3 - Normal Item Grou

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-07-30 Thread Barath Aron
On 07/30/2018 12:21 PM, Paul Smith wrote: This weekend I reworked the handling of failures in child_execute_job() so that it behaves properly even when the child failure happens in the current process (e.g., the fork() or posix_spawn()). It needs a bit of cleanup--in particular writing a test is

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-07-30 Thread Paul Smith
On Mon, 2018-07-23 at 07:10 +0200, Barath Aron wrote: > On 07/22/2018 09:58 PM, Paul Smith wrote: > > On Mon, 2018-07-09 at 09:05 +0200, Aron Barath wrote: > > > --- > > > > Thanks for the work you put into this! > > You're welcome! :) > > Unfortunately this change reveals some deeper problems th

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-07-22 Thread Barath Aron
problem we get, consider a make recipe that is marked to be ignored, and the command does not exist: all: -barbbler echo hi With current make we get correct behavior in that the non-existent command failure is ignored, and the "hi" is still echo'd: barbbler /

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-07-22 Thread Paul Smith
: all: -barbbler echo hi With current make we get correct behavior in that the non-existent command failure is ignored, and the "hi" is still echo'd: barbbler /tmp/x1.mk:2: recipe for target 'all' failed make: [all] Error 127 (ignored) echo hi hi w

[PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-07-09 Thread Aron Barath
--- src/job.c | 166 ++ 1 file changed, 166 insertions(+) diff --git a/src/job.c b/src/job.c index 47ce73d..1c94d4a 100644 --- a/src/job.c +++ b/src/job.c @@ -137,6 +137,10 @@ extern int wait3 (); # endif /* Have wait3. */ #endif /* Have wait

[PATCH 1/2] Add posix_spawnattr_setsigmask() detection to configure.ac

2018-07-09 Thread Aron Barath
--- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 13507d4..6155db7 100644 --- a/configure.ac +++ b/configure.ac @@ -142,7 +142,8 @@ AC_CHECK_FUNCS([strdup strndup umask mkstemp mktemp fdopen \ dup dup2 getcwd

[PATCH 1/2] Use pid_t to store PIDs instead of int.

2018-07-05 Thread Aron Barath
--- src/commands.c | 2 +- src/job.c | 15 --- src/job.h | 4 ++-- src/main.c | 2 +- src/makeint.h | 2 +- src/remote-cstms.c | 4 ++-- src/remote-stub.c | 2 +- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/commands.c

[PATCH 2/2] Add and posix_spawn(3) to configure.ac

2018-07-05 Thread Aron Barath
--- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1d91c36..13507d4 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,7 @@ AC_HEADER_STAT AC_HEADER_TIME AC_CHECK_HEADERS([stdlib.h locale.h unistd.h limits.h fcntl.h

Re: [PATCH v2 1/2] posix: Add compat glob symbol to not follow dangling symbols

2017-09-26 Thread Adhemerval Zanella
g/ml/libc-alpha/2017-09/msg00972.html Besides update GNU make glob implementation I think it should also update its configure.ac to accept not only _GNU_GLOB_INTERFACE_VERSION equal to 1, but also _GNU_GLOB_INTERFACE_VERSION to 2 now that your suggestion [1] has been fixed. [1] http://lists.gnu.org/archive/html/bug-make/

Re: [PATCH v2 1/2] posix: Add compat glob symbol to not follow dangling symbols

2017-09-26 Thread Paul Eggert
eefa5b430ec8b23e71b5f150c6a7d8aacb50 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 26 Sep 2017 11:02:26 -0700 Subject: [PATCH] glob: remove bogus extern decl * lib/glob.c (__glob_pattern_type): Remove now-spurious extern declaration. Problem reported by Adhemerval Zanella in: https://sou

[PATCH 2/6] use strchr for simple case of find_char_unquote

2017-08-11 Thread Paolo Bonzini
default) while (colonp && (colonp[1] == '/' || colonp[1] == '\\') && colonp > p2 && isalpha ((unsigned char)colonp[-1]) && (colonp == p2 + 1 || strchr (" \t(", colonp[-2]) != 0)) -

  1   2   3   >