Re: Target-specific variable in subdirectory problem

2017-08-02 Thread Henrik Carlqvist
> The example in his question makes very clear what he wants: he wants a > pattern-specific variable assignment. Most likely yes. If you look at the subject of this thread it says "Target-specific variable in subdirectory problem" so he probably only wants the variable to be set when the target

[bug #51495] Notice when a rule changed, so target needs rebuilding

2017-07-18 Thread Henrik Carlqvist
Follow-up Comment #1, bug #51495 (project make): The quick and easy way to accomplish this today is of course to also add the Makefile to the prerequisites of targets. If you don't want every target to be rebuilt when only one rule has changed it is also possible to split the Makefile up into

Re: [bug #51309] Determination of a file list from a single folder without changing the working directory

2017-07-02 Thread Henrik Carlqvist
On Sun, 2 Jul 2017 16:14:31 -0400 (EDT) Markus Elfring wrote: > It might matter more under other circumstances. Are you able to provide any example proving how it matters under some more or less rare circumstances? > (The current software can be fast enough to some

Re: Error while running make command

2017-06-21 Thread Henrik Carlqvist
On Wed, 21 Jun 2017 19:48:57 +0530 "PARIMEY DNYANESHWAR PATIL 4-Yr B.Tech. Electrical Engg." wrote: > I am getting this error after running above command in Ubuntu 16.04 lts. > Please tell me what to do to solve? You need to carefully read the instructions that

Re: Checking file generation for a test script

2017-06-19 Thread Henrik Carlqvist
On Mon, 19 Jun 2017 13:20:23 +0200 SF Markus Elfring wrote: > > It would have been generated if you would have called make with a > > command like: > > elfring@Sonne:~/Projekte/Bau> LANG=C make --no-builtin-rules -f > ../rule-check2.make MOTD.log make: *** No rule

Re: [bug #51267] Improve error handling after a special command

2017-06-19 Thread Henrik Carlqvist
On Mon, 19 Jun 2017 12:08:35 -0400 (EDT) Markus Elfring wrote: > The semicolon indicates at the end that the return value is ignored > there. I imagine that further data processing should usually only be > performed if this command succeeded. > Would you like to improve

Re: Improvement suggestion: listen to signals to adjust number of jobs

2017-05-23 Thread Henrik Carlqvist
On Tue, 23 May 2017 22:31:14 +0300 Eli Zaretskii <e...@gnu.org> wrote: > > From: Henrik Carlqvist <hc...@poolhem.se> > > My intention has been to make the patch work with > > both Unix and Windows, but unfortunately I have no Windows machine to > > test with. I

Improvement suggestion: listen to signals to adjust number of jobs

2017-05-23 Thread Henrik Carlqvist
Many times after starting make I have wished that I started it with more parallel jobs than I did. A few time I have also wished that I started make with fewer parallel jobs. The attached patch allows you to send SIGUSR2 to your top level make process to add one more parallel job. Once a SIGUSR2

Re: Are prerequisites made in deterministic order when parallelism is disabled?

2017-06-14 Thread Henrik Carlqvist
On Wed, 14 Jun 2017 11:25:35 -0400 Kyle Rose wrote: > The right answer is always to write your makefiles so the rules execute > in the required order whether run in parallel or not. Relying on > whichever arbitrary ordering GNU make employs, even if that behavior is >

Re: Unlink failure on abort

2017-06-16 Thread Henrik Carlqvist
On Fri, 16 Jun 2017 01:16:09 +0300 Orgad Shaneh wrote: > > On Thu, Jun 15, 2017 at 10:33 PM, Orgad Shaneh > > wrote: > >> mingw32-make[1]: *** Deleting file 'obj/main.o' > >> mingw32-make[1]: unlink: obj/main.o: Permission denied > Another thing I've noticed

Re: Checking application of dependencies from make rules without recipes

2017-06-18 Thread Henrik Carlqvist
On Sun, 18 Jun 2017 19:45:34 +0200 SF Markus Elfring wrote: > A rough approximation for further discussion: > > i_compilation?=echo > o_compilation?=echo > a_generation?=$(o_compilation) 'Checked modules: ' > > parsing_c.cma: ast_c.cmo token_annot.cmo >

Re: Checking file generation for a test script

2017-06-18 Thread Henrik Carlqvist
On Sun, 18 Jun 2017 13:03:10 +0200 SF Markus Elfring wrote: > I have tried the following small script out together with the program > “GNU Make 4.2.1-1.7” on my openSUSE Tumbleweed system. That "script" seems like a makefile to me. > my_compilation?=echo >

[bug #51200] Improvement suggestion: listen to signals to adjust number of jobs

2017-11-19 Thread Henrik Carlqvist
Follow-up Comment #1, bug #51200 (project make): As the directory structure recently changed in git, would you like me to send an updated patch? regards Henrik ___ Reply to this item at:

[bug #54529] [Makefile:5: foobar] Segmentation fault

2018-08-17 Thread Henrik Carlqvist
Follow-up Comment #2, bug #54529 (project make): "Segmentation fault (core dumped)" means that you got a core file to analyze. A first simple step might be to see what generated that core file, it could be done with something like "file core". Next you might want to open the core file in a

Re: No follow up on patches to support newer glibc ?

2018-04-04 Thread Henrik Carlqvist
On Wed, 04 Apr 2018 15:42:51 -0400 Paul Smith wrote: > It does look like we need to make a new release soon. If so, is there anything I can do to get the functionality of my contributed patch in bug #51200 into the upcoming new release? Best regards Henrik

Re: Adjusting jobserver size (was: Re: No follow up on patches to support newer glibc ?)

2018-04-07 Thread Henrik Carlqvist
Thanks for your feedback! > On the other hand, it's a complex change (I'm not convinced that your > implementation is complete: for example, it's not immediately clear to > me how the decrement handles the "free token" concept of the job server > implementation... The variable decrease_jobs is

Re: GNU Make for Java projects

2019-01-18 Thread Henrik Carlqvist
On Fri, 18 Jan 2019 05:42:44 -0600 Blake McBride wrote: > I have found Make very easy to understand and use. Given the amount of > work they do in the background, I have found build tools such as Maven > and Gradle to be very confusing. When I some years ago wrote Android apps I found eclipse

Re: "make -jN" requires mechanical changes to a Makefile

2019-05-12 Thread Henrik Carlqvist
On Mon, 13 May 2019 00:05:59 +0200 Bruno Haible wrote: > Howard Chu wrote: > > >> Example with one rule creating 4 files: > > >> > > >> all : copy1 > > >> > > >> copy1: Makefile > > >> install -c -m 644 Makefile copy1 > > >> install -c -m 644 Makefile copy2 > > >>

Re: What about the name of the second prerequisite?

2019-06-15 Thread Henrik Carlqvist
On Sat, 15 Jun 2019 08:35:13 +0800 Dan Jacobson wrote: > (info "(make) Automatic Variables") has > > '$<' The name of the first prerequisite... > '$?' The names of all the prerequisites that are newer than the > target...'$^' The names of all the prerequisites, with spaces between > them...'$+'

Re: "make -jN" requires mechanical changes to a Makefile

2019-05-10 Thread Henrik Carlqvist
> In the current state, supporting parallel make requires extra work > for the maintainer. > > Or would you recommend that I add this snippet to the top-level > Makefile of all my projects? > > # This package does not support parallel make. > # So, turn off parallel execution (at least in GNU

Re: append assignment operator in target specific variable

2019-05-19 Thread Henrik Carlqvist
> 1. "foo" is simple variable. >so result have to be 100 but is 200 > > foo := > val := 100 > > all : foo += $(val) > all : > @echo foo : $(foo) > > val := 200 > > result is : 200 Yes, the result will become 200 because foo is not expanded until it is usead at the line "@echo foo :

Re: "make -jN" requires mechanical changes to a Makefile

2019-05-12 Thread Henrik Carlqvist
On Sun, 12 May 2019 22:23:12 +0200 Bruno Haible wrote: > Now, when my use-case is: > - one rule that produces N files (N > 1), > - I want "make" to execute the rule only once, not N times, > even with parallel make. > What is the solution? I think that the only good solution is to make

Re: Error In Installing FreeBayes

2020-03-05 Thread Henrik Carlqvist
On Fri, 6 Mar 2020 09:38:19 +0530 Dr Priyanka Jain wrote: > I am trying to clone freebayes from following link : > /usr/bin/gmake: unrecognized option '--jobserver-auth=3,4' It seems as if your project "freebayes" requires a newer version of gnu make than you have installed. You can check

Re: [bug #58056] Forced prerequisite order is not honored with pattern rules

2020-03-30 Thread Henrik Carlqvist
On Mon, 30 Mar 2020 15:35:01 -0400 (EDT) anonymous wrote: > If this behavior is allowed, I think the documentation should clarify > what the order-only prerequisites actually means. Maybe a better name than "order-only-prerequisites" would have been "exist-only-prerequisites". > I still

Re: [bug #58056] Forced prerequisite order is not honored with pattern rules

2020-03-30 Thread Henrik Carlqvist
On Mon, 30 Mar 2020 12:17:24 -0400 (EDT) anonymous wrote: > Wait, so order-only prerequisites does NOT mean serialized make for > these prerequisites? Nope. > "a situation where you want to impose a specific > ordering on the rules to be invoked" ← That's not what this means? Please read

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-14 Thread Henrik Carlqvist
On Mon, 14 Sep 2020 12:15:58 +0200 Bruno Haible wrote: > Henrik Carlqvist wrote: > > 2) Don't mention some of the extra targets: > > === > > all : copy1 > > > > copy1: Makefile > > install -c -m 644 Makefile c

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-13 Thread Henrik Carlqvist
On Sun, 13 Sep 2020 20:07:27 +0100 Bruno Haible wrote: > Continuing this thread from May 2019 > : > The problem was: > > How can a rule that generates multiple files be formulated so > that it works with parallel make? > >

Re: GNU Make 4.3: Makefile rule spooky action at a distance

2020-10-05 Thread Henrik Carlqvist
On Mon, 5 Oct 2020 22:48:56 +0200 Danny Milosavljevic wrote: > Hi, > > On Mon, 05 Oct 2020 15:41:52 -0400 > Paul Smith wrote: > > > It would be interesting to know if adding an explicit export solves the > > problem. > > I tried adding an explicit export at the toplevel makefile right

Re: Adjusting jobserver size (was: Re: No follow up on patches to support newer glibc ?)

2020-07-13 Thread Henrik Carlqvist
00:26 +0200, Henrik Carlqvist wrote: > > On Wed, 04 Apr 2018 15:42:51 -0400 > > Paul Smith wrote: > > > It does look like we need to make a new release soon. > > > > If so, is there anything I can do to get the functionality of my > > contributed patch i

[bug #51200] Improvement suggestion: listen to signals to adjust number of jobs

2020-07-04 Thread Henrik Carlqvist
Additional Item Attachment, bug #51200 (project make): File name: signal_num_jobs5.patch Size:3 KB ___ Reply to this item at:

Re: [bug #57751] Improve POSIX support for SCCS

2020-11-08 Thread Henrik Carlqvist
On Sat, 7 Nov 2020 20:56:37 -0500 (EST) Bruce Lilly wrote: > I've seen it used, e.g. where there are many executables, each built from a > single source file. So, for example: > > > cat date echo ls pwd rm sleep sync test : $@.o > > > suffices to specify (with default rules) everything

Re: make -j does not work on RedHat7.7 VM

2021-12-23 Thread Henrik Carlqvist
On Thu, 23 Dec 2021 12:49:51 + "Zhu, Mason" wrote: > I checked our project make file. Yes, we are using recursive Make, but does > not explicitly set -j options in MAKEFLAGS. > > In GNU Make 3.82, it seems that -j option will be finally added if Make > determines my VM has the parallel build

Re: Invalid use of const pointer?

2022-01-09 Thread Henrik Carlqvist
On Sat, 08 Jan 2022 17:29:33 -0500 Paul Smith wrote: > It turns out to be innocuous because none of the callers care that the > value of the input string is modified if we return a different string, > but it's still wrong and should be fixed. If so, the easy and more correct fix might be to to

Re: Invalid use of const pointer?

2022-01-09 Thread Henrik Carlqvist
On Sun, 09 Jan 2022 10:17:10 -0500 Paul Smith wrote: > In any event, the bug still exists whether you say the argument is > const or not: the expectation when this function is called is that > after it returns the string passed to it has the same content as before > it was called. If so I agree

Re: Invalid use of const pointer?

2022-01-08 Thread Henrik Carlqvist
On Sat, 08 Jan 2022 15:36:46 -0500 Paul Smith wrote: > On Sat, 2022-01-08 at 19:47 +0100, Henrik Carlqvist wrote: > > But now, with both userend and pwent set it seems as if the calling > > function will have its const string modified. If this final case were > > fixe

Re: Invalid use of const pointer?

2022-01-08 Thread Henrik Carlqvist
On Sat, 08 Jan 2022 10:37:17 -0500 Paul Smith wrote: > The const-correct way to write this code would be to allocate a new > string and modify that (or, rework the entire program to use the > equivalent of C++'s std::string_view), but the author of this code > (might be me, might be someone else:

Re: Goodbye to GNU make's "build.sh" ... ?

2022-06-25 Thread Henrik Carlqvist
On Sat, 25 Jun 2022 15:28:52 -0800 Britton Kerin wrote: > On Sat, Jun 25, 2022, 1:48 PM Paul Smith wrote: > > If #2 is chosen, then a bootstrap process would involve first obtaining > > an older version of make, such as GNU make 4.3 or lower, and building > > that with its build.sh, then using

Re: Archive Members as Targets

2022-05-10 Thread Henrik Carlqvist
On Tue, 10 May 2022 22:05:22 -0400 Dmitry Goncharov wrote: > > But not on the Linux boxes there make always rebuild everything. On all > > machines I am using GNU Make. > ... > > Can anyone confirm that? > > i can confirm that for me on linux the latest make from git as well as > make-4.3

Re: [bug #62441] Recursive make & PHONY = targets being rebuilt [feature reques]

2022-05-11 Thread Henrik Carlqvist
> I have two makefiles: > > *Makefile* > > .PHONY: other_file > other_file: > $(MAKE) -f Makefile2 other_file > > my_file: other_file > touch $@ > > > *Makefile2* > > other_file: > touch $@ > > > > When I first run the command, it builds my_file and other_file as

Re: [bug #62840] make --version in pipe return SIGPIPE

2022-07-30 Thread Henrik Carlqvist
On Sat, 30 Jul 2022 13:26:46 -0400 (EDT) Martin Dorey wrote: > Follow-up Comment #2, bug #62840 (project make): > > Just for completeness or academic interest, then, this makes it happen > reliably for me: > > > set -o pipefail; { ruby -we '$stdout.write("x" * 4096)'; make --version; } | >

Re: »Ø¸´£º Implicit rule for linking multiple object files

2022-08-11 Thread Henrik Carlqvist
On Thu, 11 Aug 2022 14:18:29 +0800 "ljh" wrote: > main : c.o b.o a.o d.o main.o > A: note: imports must be built before being imported > A: fatal error: returning to the gate for a mechanical issue > compilation terminated. > make: *** [ 3. ok: with target.o and recipe > > $ rm -fr *.o

Re: please keep up supporting AmigaOS

2022-11-03 Thread Henrik Carlqvist
Thank you for joining the group of Amiga users that now are spamming all the subscribers of the GNU mailing list. May I humbly suggest that any contribution to the GNU Make sources making it work again on Amiga will be rejected until 2 cents have been paid for each of those spams to all Gnu Make

[bug #51200] Improvement suggestion: listen to signals to adjust number of jobs

2023-03-20 Thread Henrik Carlqvist
Additional Item Attachment, bug #51200 (project make): File name: signal_num_jobs6.patch Size:5 KB ___ Reply to this item at:

[bug #51200] Improvement suggestion: listen to signals to adjust number of jobs

2023-03-20 Thread Henrik Carlqvist
Follow-up Comment #3, bug #51200 (project make): My latest patch signal_num_jobs6.patch is almost a complete rewrite to work better with recursive calls to make. Jobs are simply added by putting tokens in the pipe from the signal routine for SIGUSR2. Revoking jobs are slightly more tricky, a

Re: [PATCH] Use UTF-8 active code page for Windows host.

2023-03-21 Thread Henrik Carlqvist
On Tue, 21 Mar 2023 15:08:52 + Costas Argyris wrote: > I am simply re-attaching the patch I originally sent in > this thread, because that was already developed and built on 4.4.1 > tarball which is still the latest AFAICT. Yes, at the time of this writing version 4.4.1 is the latest release

Re: Order-only prerequisites

2023-06-06 Thread Henrik Carlqvist
> Consider this makefile: > > .PHONY: a b > a:; @echo a > b:; @echo b > b: | a Your problem with this Makefile is that it never creates any files a or b. This means that your order only prerequisite on a allways has to be made. > % make b a > a > b > make: Nothing to be done for 'a'. > >

Re: Order-only prerequisites

2023-06-07 Thread Henrik Carlqvist
On Wed, 07 Jun 2023 08:29:15 +0200 > As I said, a way to specify in which order recipes are invoked > (here, a before b) if they are invoked, without influencing whether > they are invoked (only a, only b or a and b, as given on the command > line). So you really don't want any target to depend

Re: new feature idea: ingesting processed rulesets

2023-05-23 Thread Henrik Carlqvist
> > On May 23, 2023, at 5:13 AM, Zoltán Turányi > > wrote: > > I use make with autotools in multiple directories and have observed that > > parallel builds are limited to each directory, as autotools invoked make > > separately for each directory. In my experience, if make is called

Re: [bug #64472] $(CP) is an empty string

2023-07-26 Thread Henrik Carlqvist
On Wed, 26 Jul 2023 01:37:11 -0400 (EDT) > ... I see that rm, which was on the list of directly invokable utilities > with cp, nonetheless has an RM namesake, which contains the very much > conventional, but non-obvious and misleading, -f. AR is there alright but, > had the OP chosen INSTALL as

Re: Segmentation Fault on Exported Resursively Expanded Variable

2024-01-21 Thread Henrik Carlqvist
On Sun, 21 Jan 2024 14:45:00 -0500 Dmitry Goncharov wrote: > i bet, the purpose of having (*ep)[nl] == '=' check before strncmp was > to relieve make from running strncmp unless the variables have the > same length. Yes, that is also my guess. Unfortunately, it could give a segfault if (*ep)[nl]

Re: Segmentation Fault on Exported Resursively Expanded Variable

2024-01-15 Thread Henrik Carlqvist
I was not able to reproduce it with Make 4.1 or Make 4.3. I don't have the original Make 4.4.1, but I had a binary of my fork 4.4.1h2 from https://github.com/henca/Henriks-make and got a segfault in that one which probably means that I have been able to reproduce the report from Miao. Opening a

Re: Segmentation Fault on Exported Resursively Expanded Variable

2024-01-16 Thread Henrik Carlqvist
On Tue, 16 Jan 2024 06:59:30 + MIAOW Miao wrote: > if ((*ep)[nl] == '=' && strncmp (*ep, v->name, nl) == 0) Looking at that line, the rather obvious fix would be to change it to: if (strncmp (*ep, v->name, nl) == 0 && (*ep)[nl] == '=') That way, *ep can be no shorter than having \0 at

Re: Segmentation Fault on Exported Resursively Expanded Variable

2024-01-16 Thread Henrik Carlqvist
On Tue, 16 Jan 2024 20:53:19 +0200 Eli Zaretskii wrote: > From: Henrik Carlqvist > > On Tue, 16 Jan 2024 06:59:30 + > > MIAOW Miao wrote: > > > if ((*ep)[nl] == '=' && strncmp (*ep, v->name, nl) == 0) > > > > Looking at that

Re: Please check about the GIT problem.

2024-04-06 Thread Henrik Carlqvist
On Sat, 6 Apr 2024 16:50:33 +0900 (KST) 12zz12 <12z...@kakao.com> wrote: > root@uk91-Korea:/home/u/다운로드# tar -zxf git-2.38.5.tar.gz > root@uk91-Korea:/home/u/다운로드# ls > git-2.38.5 git-2.38.5.tar.gz google-chrome-stable_current_amd64.deb > root@uk91-Korea:/home/u/다운로드# cd

Re: [PATCH] src/main.c: Add -J to detect number of job slots based on nproc.

2024-04-11 Thread Henrik Carlqvist
On Fri, 12 Apr 2024 02:13:36 +0100 Matt Staveley-Taylor wrote: > Browsing the mailing list I can see that the behaviour of -j with no > arguments has been discussed a few times. Given it would affect > backwards compatability to change how -j works, introducing a new > flag seems appropriate.

Re: [PATCH] src/main.c: Add -J to detect number of job slots based on nproc.

2024-04-12 Thread Henrik Carlqvist
> Isn't nproc or nproc+1 too much? On systems with hyper-threading, > this will try using too many jobs, and might cause the system be > significantly less responsive. Maybe nproc/2 is a better default? There have been many other good suggestions of choices for make -j and the choice depends