Re: GNU make troubleshooting

2023-09-02 Thread Alejandro Colomar
Hi Paul, On 2023-08-26 18:48, Paul Smith wrote: > I added a new appendix to the GNU make manual for troubleshooting help; > I haven't pushed it yet. See below. Comments welcome. > > I think the outline you provided earlier, Bruno, has the problem that a > lot of it isn't really about

[bug #64664] what could cause make to stop with "make[3]: *** wait: No such file or directory. Stop."

2023-09-13 Thread Alejandro Colomar
Follow-up Comment #1, bug #64664 (project make): Hi Andreas, [comment #0 original submission:] > This is not so much a bug report as a call for help... > > I'm trying to get Gentoo ported onto riscv32 using qemu usermode. Something is wrong... my chroot is ~90% functional, but a few programs

Re: Static pattern rules with more than one '%'

2023-08-30 Thread Alejandro Colomar
Hi Dmitry, On 2023-08-30 22:20, Dmitry Goncharov wrote: > On Tuesday, August 29, 2023, Alejandro Colomar wrote: > >> Hi Paul, >> >> On 2023-08-29 14:45, Paul Smith wrote: >>> On Tue, 2023-08-29 at 11:32 +0200, Alejandro Colomar wrote: >>>> Am I missi

Metaprogramming Make (was: Static pattern rules with more than one '%')

2023-08-31 Thread Alejandro Colomar
Hi Paul, On 2023-08-31 02:42, Paul Smith wrote: > On Thu, 2023-08-31 at 00:08 +0200, Alejandro Colomar wrote: >> I ended up using $(foreach ... $(eval ...)).  I didn't know about >> $(eval) before reading Paul's troubleshooting guide, and it was mind >> opening.  It solves a

Re: GNU make troubleshooting

2023-08-27 Thread Alejandro Colomar
On 2023-08-27 15:35, Alejandro Colomar wrote: > On 2023-08-27 15:33, Paul Smith wrote: >> On Sun, 2023-08-27 at 09:26 -0400, Paul Smith wrote: >>> Yes, that's a good idea to mention .SILENT. >> >> Actually I think I will simply recomment using --debug=print instead a

Re: GNU make troubleshooting

2023-08-27 Thread Alejandro Colomar
ybe mention that removing .SILENT: would be necessary, if it is defined. Here's what the Linux man-pages makefiles do. Cheers, Alex $ cat share/mk/verbose.mk # Copyright 2022, Alejandro Colomar # SPDX-

Re: GNU make troubleshooting

2023-08-27 Thread Alejandro Colomar
On 2023-08-27 15:33, Paul Smith wrote: > On Sun, 2023-08-27 at 09:26 -0400, Paul Smith wrote: >> Yes, that's a good idea to mention .SILENT. > > Actually I think I will simply recomment using --debug=print instead as > that's simpler. LGTM. That's much better, as you don't modify the Makefile,

Re: GNU make troubleshooting

2023-08-27 Thread Alejandro Colomar
Hi Paul, On 2023-08-27 15:52, Paul Smith wrote: > On Sun, 2023-08-27 at 15:47 +0200, Alejandro Colomar wrote: >> In fact, I'm going to define .SILENT always in the Linux man-pages, >> since V=1 is just an unnecessary duplicate for --degub=print. >> I'll make V=1

Re: GNU make troubleshooting

2023-08-27 Thread Alejandro Colomar
Hi Paul, On 2023-08-26 18:48, Paul Smith wrote: > I added a new appendix to the GNU make manual for troubleshooting help; > I haven't pushed it yet. See below. Comments welcome. > > I think the outline you provided earlier, Bruno, has the problem that a > lot of it isn't really about

Re: Static pattern rules with more than one '%'

2023-08-29 Thread Alejandro Colomar
Hi Paul, On 2023-08-29 14:45, Paul Smith wrote: > On Tue, 2023-08-29 at 11:32 +0200, Alejandro Colomar wrote: >> Am I missing something?  Is something like that allowed anyhow? > > Multiple "%" are allowed, in that they won't throw an error. But, only > the first

Static pattern rules with more than one '%'

2023-08-29 Thread Alejandro Colomar
Hi! The documentation of static pattern rules says that each pattern *normally* contains the character '%' just once. That wording seems to allow the case of several of those. I experimented to see if it is really

Re: Potential Bug: `.PHONY` targets and order-only prerequisites

2022-05-21 Thread Alejandro Colomar
Hi Paul and Jacob, On 5/21/22 18:24, Paul Smith wrote: On Wed, 2022-05-18 at 14:36 -0700, Jacob Kopczynski wrote: The thing that the docs refer to as "impose order" is not a single thing, but two. I would characterize a normal prerequisite as doing three things rather than two: -

Re: Missing [/usr/local]/var/lib and [/usr/local]/tmp

2022-07-18 Thread Alejandro Colomar
On 7/18/22 13:41, Bruno Haible wrote: Alejandro Colomar wrote: I used the following: tmpdir := $(prefix)/tmp Writing it like this has two drawbacks: 1) The user cannot force a specific temporary directory by setting the TMPDIR environment variable. This may be blocking

Re: Missing [/usr/local]/var/lib and [/usr/local]/tmp

2022-07-18 Thread Alejandro Colomar
Hi Eddy, On 7/18/22 14:17, Edward Welbourne wrote: Alejandro Colomar (Monday, July 18, 2022 14:07) MacOS seems to be setting TMPDIR (or at least some script run at startup seems to be setting it in my system), and it's set to something really weird that I don't trust will exist after reboot

Re: Missing [/usr/local]/var/lib and [/usr/local]/tmp

2022-07-18 Thread Alejandro Colomar
ard. Yup, I replied to Bruno's message, which was more or less like this. Thanks, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_signature Description: OpenPGP digital signature

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alejandro Colomar
ading, and say: [ This should normally be /usr/local/var/run, but write it as $(localstatedir)/run ] Makes sense? I don't see why we would like to mention /var/run here if we don't mention for example /etc (we mention /usr/local/etc). Thanks, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_signature Description: OpenPGP digital signature

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alejandro Colomar
r/run (or /run) at compile time". If so, I think it needs some more words about it. Cheers, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_signature Description: OpenPGP digital signature

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alejandro Colomar
faults are there so that I don't need to do it as long as I want to use the defaults. The thing is the defaults are broken. Or am I wrong in assuming that the wording "should normally be" means that that is the default value for GNU Makefiles? I don't think so.

Missing [/usr/local]/var/lib and [/usr/local]/tmp

2022-07-18 Thread Alejandro Colomar
$libstatedir for symmetry with $runstatedir, which is also a child of $localstatedir, with the first part of the name as the name of the child dir. Would you mind adding those to your directory variables? Thanks, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_sig

Re: Missing [/usr/local]/var/lib and [/usr/local]/tmp

2022-07-19 Thread Alejandro Colomar
d it doesn't make sense to share it, as it represents the state of the running instance of unitd. Sharing it would probably break other instances of the process when one of the instances modifies it. Ok, then something under /var would make sense. Cheers, Alex -- Alejandro Colomar

Re: New feature: Post-requisites

2022-07-25 Thread Alejandro Colomar
ow is an error, I'd just throw an error if a post-requisite creates a dependency loop. Cheers, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_signature Description: OpenPGP digital signature

[BUG] inconsistency in $localstatedir and $runstatedir

2022-07-14 Thread Alejandro Colomar
standards. Cheers, Alex Link: <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html> Link: <https://www.gnu.org/software/make/manual/html_node/Directory-Variables.html> -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_signature Description: OpenPGP digital signature

New feature: Post-requisites

2022-07-22 Thread Alejandro Colomar
local/share/man/man3/foo.3` would install foo.3, and after it, it would run mandb(8). Does that make sense to you? Cheers, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_signature Description: OpenPGP digital signature

Re: New feature: Post-requisites

2022-07-22 Thread Alejandro Colomar
Hi Edward, thutt, On 7/22/22 15:36, Edward Welbourne wrote: Alejandro Colomar (Friday, July 22, 2022 14:05) > I'd like to suggest a new feature: post-requisites. > > As the word suggests, as pre-requisites are satisfied before a given > target, post-requisites would be satis

Re: New feature: Post-requisites

2022-07-22 Thread Alejandro Colomar
Hi Paul, On 7/22/22 16:20, Paul Smith wrote: On Fri, 2022-07-22 at 14:05 +0200, Alejandro Colomar wrote: As the word suggests, as pre-requisites are satisfied before a given target, post-requisites would be satisfied _after_ a given target. The way I can see this being implemented without

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alejandro Colomar
(= $prefix/var/run) (= /usr/local/var/run) (!= /var/run; NOK) Do you realize the bug now? Cheers, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_signature Description: OpenPGP digital signature

Re: False positive "doesn't match the target pattern" error

2022-08-21 Thread Alejandro Colomar
Hi David, On 8/22/22 04:45, David A. Wheeler wrote: On Aug 20, 2022, at 11:35 AM, Alejandro Colomar wrote: I'd say there is: make(1) treats file names as text strings, not really file names, for most of its operations. As an example, foo/ and foo/. are different targets. I don't see

Re: False positive "doesn't match the target pattern" error

2022-08-20 Thread Alejandro Colomar
in various directories? In this case i'd look for vpath. regards, Dmitry Cheers, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/> OpenPGP_signature Description: OpenPGP digital signature

Re: False positive "doesn't match the target pattern" error

2022-08-22 Thread Alejandro Colomar
Hi David, Ingo, For others starting to read this thread now, it started here: <https://lists.gnu.org/archive/html/bug-make/2022-08/msg00059.html> On 8/22/22 16:46, David A. Wheeler wrote: On Aug 22, 2022, at 12:02 AM, Alejandro Colomar wrote: Hi David, On 8/22/22 04:45, David A. W

Re: False positive "doesn't match the target pattern" error

2022-08-21 Thread Alejandro Colomar
everything as text strings, and let users make sure they use the correct string. And if that bug may be useful to workaround some weird situation by having two rules foo and foo/., let's call it a feature! =) Cheers, Alex -- Alejandro Colomar <http://www.alejandro-colomar

Doubts about .WAIT and .NOTPARALLEL (was: GNU Make 4.4 released!)

2022-10-31 Thread Alejandro Colomar
Hi Paul, On 10/31/22 08:01, Paul Smith wrote: * New feature: The .WAIT special target If the .WAIT target appears between two prerequisites of a target, then GNU Make will wait for all of the targets to the left of .WAIT in the list to complete before starting any of the targets to

Re: Doubts about .WAIT and .NOTPARALLEL (was: GNU Make 4.4 released!)

2022-10-31 Thread Alejandro Colomar
Hi Eddy, On 10/31/22 13:42, Edward Welbourne wrote: Alejandro Colomar (Monday, October 31, 2022 11:06) replied: I'm curious: what is .WAIT made for?  Isn't it just a workaround for broken dependencies? No. I mean, considering the following example: all: one two .WAIT three one

Re: Doubts about .WAIT and .NOTPARALLEL (was: GNU Make 4.4 released!)

2022-10-31 Thread Alejandro Colomar
targets depend on three, they're likewise changed by the second makefile, compared to the first, Alejandro Colomar (Monday, October 31, 2022 13:46) replied: Ahh, sure, that's right. However, I don't see why this would be beneficial.  Why would A need to be built before B, if there's no dependency

[bug #63070] posix_spawn fails to run a child process.

2022-09-21 Thread Alejandro Colomar
Follow-up Comment #14, bug #63070 (project make): [comment #10 comment #10:] > In glibc-2.17 posix_spawn returns 0 whether POSIX_SPAWN_USEVFORK is set or not. > When POSIX_SPAWN_USEVFORK is not set posix_spawn returns 0 and errno is 0. > When POSIX_SPAWN_USEVFORK is set posix_spawn returns 0 and

Re: Making makefiles with primarily phony targets more friendly

2022-08-10 Thread Alejandro Colomar
Hi, On 8/10/22 22:19, Jean-Baptiste Poittevin wrote: By using a lot of PHONY targets, I think you're closing a door to one make greatest feature : not redoing those things that are already up to date. If you consider that every rule can generate a useful file (file containing container

Re: [doc] MAKEOVERRIDES is undocumented

2022-12-19 Thread Alejandro Colomar
Hi Dmitry, On 12/19/22 20:35, Dmitry Goncharov wrote: On Mon, Dec 19, 2022 at 2:33 PM Jeffrey Walton wrote: Yep, that's why we track both includedir and pc_includedir. You don't have to resort to if statements to initialize either of the variables. regards, Dmitry Let me try to explain:

Re: [doc] MAKEOVERRIDES is undocumented

2022-12-19 Thread Alejandro Colomar
Hi Paul, On 12/19/22 20:48, Paul Smith wrote: On Mon, 2022-12-19 at 17:25 +0100, Alejandro Colomar wrote: And another variable (and this one is not mentioned at all in the manual): MAKEFLAGS. Maybe I misunderstood, but MAKEFLAGS is discussed extensively in the manual. Yeah, maybe I wrote

Re: [doc] MAKEOVERRIDES is undocumented

2022-12-19 Thread Alejandro Colomar
Hi Dmitry, On 12/19/22 19:18, Dmitry Goncharov wrote: On Mon, Dec 19, 2022 at 11:24 AM Jeffrey Walton wrote: For the *.pc file, we need '$(prefix)' to survive unexpanded. What about includedir:=$${prefix}/include myconfig.pc:; @echo 'includedir=$(includedir)' >> myconfig.pc ? That would

[doc] MAKEOVERRIDES is undocumented

2022-12-19 Thread Alejandro Colomar
Hi! I needed to use MAKEOVERRIDES for updating a pkgconf (.pc) file. I want it to have the correct directory variables as used when building/installing the library, so if the user specifies 'includedir=/foo/bar' in the command line, the .pc file should be updated with that info. The rule I

Re: [doc] MAKEOVERRIDES is undocumented

2022-12-19 Thread Alejandro Colomar
Hi Jeffrey, On 12/19/22 16:57, Jeffrey Walton wrote: On Mon, Dec 19, 2022 at 10:45 AM Alejandro Colomar wrote: I needed to use MAKEOVERRIDES for updating a pkgconf (.pc) file. I want it to have the correct directory variables as used when building/installing the library, so if the user

Re: [doc] MAKEOVERRIDES is undocumented

2022-12-19 Thread Alejandro Colomar
Hi Paul, On 12/19/22 17:16, Paul Smith wrote: On Mon, 2022-12-19 at 16:45 +0100, Alejandro Colomar wrote: I had to search some related things in stackoverflow to find this.  I think you should document this (and a few others) in 'Other Special Variables' <https://www.gnu.org/software/m

Re: [doc] MAKEOVERRIDES is undocumented

2022-12-19 Thread Alejandro Colomar
Hi Paul, On 12/19/22 17:22, Paul Smith wrote: On Mon, 2022-12-19 at 10:57 -0500, Jeffrey Walton wrote:    ifeq ($(includedir),) includedir := $(prefix)/include PC_INCLUDEDIR = $${prefix}/include    else PC_INCLUDEDIR = $(includedir)    endif Maybe I'm misunderstanding

Re: [bug #63307] make 4.4 passes ignored SIGPIPE on to children

2022-11-09 Thread Alejandro Colomar
On 11/9/22 21:36, Paul D. Smith wrote: Follow-up Comment #18, bug #63307 (project make): I can see an argument for both sides ("give up immediately" and "run to completion"). Most likely it's one of those things where different people legitimately want different behaviors. But I think that

make -t and directories

2023-03-10 Thread Alejandro Colomar
Hi! Let's say I have a build tree that has directories which are created during build. The build system has some linters in a `lint` target, which touches files when it succeeds. When I want to lint only a specific file, it's interesting to convince make(1) to touch all files, and then touch

Re: make -t and directories

2023-03-11 Thread Alejandro Colomar
Hi Dmitry, On 3/11/23 14:36, Dmitry Goncharov wrote: > On Fri, Mar 10, 2023 at 7:55 PM Alejandro Colomar > wrote: >> How about using `mkdir -p` instead of touch(1) for nonexistent files? > > mkdir -p would create a directory where a file is supposed to be. > Let's

Re: make -t and directories

2023-03-11 Thread Alejandro Colomar
Hi Paul, On 3/11/23 15:20, Paul Smith wrote: > On Sat, 2023-03-11 at 01:54 +0100, Alejandro Colomar wrote: >> Let's say I have a build tree that has directories which are created >> during build.  The build system has some linters in a `lint` target, >> which touches files wh

Re: Warnings on '$\\'

2023-04-17 Thread Alejandro Colomar
Hi Dmitry, I've written some test to see what works and what doesn't: $ cat Makefile foo.h: FORCE $(file > $@,$(foo)) @: single:=\ double:=\\ empty:= space:= # define foo Aa \\ Ba \$(single) Bb \$(single)\ Bc $(single)\ Bd $(single)$(single) Ca \$(double) Cb \$(double)\ Cc

Colons in targets (and prerequisites)

2023-04-25 Thread Alejandro Colomar
Hi! I found a lot of manual pages have '::' in them, and would like to be able to work with them with Makefiles. I've been testing a little bit, and I think I got some consistent mental model of how GNU Make handles colons in pathnames. I'd like you to confirm if this is solid, and I can rely

[PATCH] *.mk: Handle files with ':' in their pathnames

2023-04-25 Thread Alejandro Colomar
the ':'s again, but since we don't we can skip that. The trick to make this work is to second-expand these variables. Link: <https://stackoverflow.com/a/76096683/6872717> Cc: GNU Make Signed-off-by: Alejandro Colomar --- Hi! Some man pages use ':' (or to be more precise, th

Re: [PATCH v7 4/8] regex.3: Improve REG_STARTEND

2023-04-21 Thread Alejandro Colomar
Hi Jakub, On 4/21/23 12:44, Jakub Wilk wrote: > * Alejandro Colomar , 2023-04-21 12:22: >> -SHELL := /bin/bash -Eeuo pipefail >> +SHELL := /usr/bin/env bash -Eeuo pipefail >> >> >> MAKEFLAGS += --no-print-directory >> >> >> This helps in syst

Re: `make check -j` fails when building GNU Make from source

2023-04-03 Thread Alejandro Colomar
Hi Paul, On 4/3/23 14:26, Paul Smith wrote: > On Sun, 2023-04-02 at 18:14 +0200, Alejandro Colomar wrote: >> I wonder if you could use the Makefile to run the tests, rather >> than calling a script from a .PHONY target that runs them all the >> time.  Why not run them only

Re: `make check -j` fails when building GNU Make from source

2023-04-02 Thread Alejandro Colomar
On 4/2/23 16:15, Paul Smith wrote: > On Sun, 2023-04-02 at 16:13 +0200, Alejandro Colomar wrote: >> I can reproduce it by running `make check`, interrupting it >> at this specific point, and then running again `make check` >> (no -j needed): > > This is a known limitat

Usefulness of make -t

2023-04-02 Thread Alejandro Colomar
Hi Paul, Yesterday I found another use of make's -t flag: It helps make sure that the logic in the Makefile is correct. You could run the target without -t, but then you risk seeing warnings and errors from the commands run by the target before make's own ones, which would hide Makefile

`make check -j` fails when building GNU Make from source

2023-04-02 Thread Alejandro Colomar
Hi, If I build make from source and run the checks in parallel, some fail. Is this expected, or is it a bug in the Makefile? Cheers, Alex -- GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5 makeerror-4.4.1-x86_64-pc-linux-gnu-t3wj.tar.gz

Re: Usefulness of make -t

2023-04-02 Thread Alejandro Colomar
On 4/2/23 14:20, Alejandro Colomar wrote: > Hi Paul, > > Yesterday I found another use of make's -t flag: It helps make sure > that the logic in the Makefile is correct. You could run the target > without -t, but then you risk seeing warnings and errors from the > commands

Re: `make check -j` fails when building GNU Make from source

2023-04-02 Thread Alejandro Colomar
Hi Paul, On 4/2/23 16:04, Paul Smith wrote: > On Sun, 2023-04-02 at 14:52 +0200, Alejandro Colomar wrote: >> If I build make from source and run the checks in parallel, some >> fail. Is this expected, or is it a bug in the Makefile? > > The test suite is invoked as a sing

Re: disabling the built-in rules

2023-07-17 Thread Alejandro Colomar
Hi Paul, On 2023-07-17 20:35, Paul Smith wrote: > On Mon, 2023-07-17 at 19:31 +0200, Bruno Haible wrote: >> Except possibly that POSIX does not allow this? Then we would need a >> pseudo-target the turns off only the non-standardized part of the >> built-in database, say, .NO_GNU_BUILTINS. And

Re: GNU make troubleshooting

2023-07-11 Thread Alejandro Colomar
Hi Jeff, On 2023-07-11 16:01, Jeffrey Walton wrote: >> But, what about this do you want to know? > > I want to see an output for the evaluation of each statement, like > what I would see with 'set -x'. I need to know where something goes > sideways when shell'ing out in a pipe. Could you show

Re: GNU make troubleshooting

2023-07-16 Thread Alejandro Colomar
Hi Dmitry! On 2023-07-15 17:28, Dmitry Goncharov wrote: [...] > > $ make -d |tail +7 |head > Reading makefiles... > Reading makefile 'makefile'... > Updating makefiles > Considering target file 'makefile'. > Looking for an implicit rule for 'makefile'. >Trying pattern rule '%: %.o'

wildcard and globstar (was: GNU make troubleshooting)

2023-07-16 Thread Alejandro Colomar
On 2023-07-16 16:17, Dmitry Goncharov wrote: > Como estas, Alex? Muy bien, y tu? =) > > On Sun, Jul 16, 2023 at 9:59 AM Alejandro Colomar wrote: >> I applied the following patch > >> <https://git.kernel.org/pub/scm/docs/man-pag

Re: wildcard and globstar (was: GNU make troubleshooting)

2023-07-16 Thread Alejandro Colomar
Hi! On 2023-07-16 18:31, Dmitry Goncharov wrote: > On Sun, Jul 16, 2023 at 10:49 AM Alejandro Colomar wrote: >> I guess I'd need some kind of globstar support in GNU Make to be able >> to use that > > Do you mean you need to find .mk files in subdirectories at different

Re: GNU make troubleshooting

2023-07-16 Thread Alejandro Colomar
On 2023-07-16 22:14, Philip Guenther wrote: > I just put this at the very end of top makefile: > > ${MAKEFILE_LIST}: ; Hmm, that's giving me another good idea. Luckily, I haven't pushed the changes I had done yet. Thanks! Alex > > Philip Guenther -- GPG

Re: wildcard and globstar

2023-07-17 Thread Alejandro Colomar
On 2023-07-17 09:34, Andreas Schwab wrote: > On Jul 16 2023, Alejandro Colomar wrote: > >> However, after the suggestion from Torbjörn, I've picked this workaround >> to reduce the code. It ended up being as small as this: >> >> MK := \ >> $(s

Re: GNU make troubleshooting

2023-07-10 Thread Alejandro Colomar
Hi Bruno, Paul, On 7/10/23 21:41, Bruno Haible wrote: Paul Smith wrote: Showing the "macroexpanded make sources" is difficult because make doesn't just expand an entire line then parse it. Makefile syntax is context-sensitive so you can't know how or if to expand parts of a line until you've

Re: enhancement: better clarification of search side effects

2023-06-01 Thread Alejandro Colomar
Hi Peter, On 6/1/23 21:42, Peter Radisson wrote: > > > Am 01.06.23 um 03:39 schrieb Dmitry Goncharov: >> On Wed, May 31, 2023 at 12:40 PM wrote: >>> today i had a strange problem with a long used makefile (GNU Make 4.3). >>> It found a file called "all.sh" and did a "cat all". >> >> That's not

Re: New conditional assignment facility

2024-01-11 Thread Alejandro Colomar
Hi Paul, On 1/11/24 14:38, Paul Smith wrote: On Thu, 2024-01-11 at 14:28 +0100, Alejandro Colomar wrote:   alx@debian:~/tmp$ cat Makefile   var ?= foo   var ?+= bar   $(info $(var))   alx@debian:~/tmp$ make-9000   foo bar   make: *** No targets.  Stop

Re: New conditional assignment facility

2024-01-11 Thread Alejandro Colomar
Hi Paul! On Thu, Jan 11, 2024 at 01:44:19AM -0500, Paul Smith wrote: > I've implemented a new capability for conditional assignments (not > pushed yet). > > After these changes, a "?" can precede any type of assignment > operation, not just "=", and make it conditional (that is, it only > takes

Re: New conditional assignment facility

2024-01-11 Thread Alejandro Colomar
On Thu, Jan 11, 2024 at 02:22:19PM +0100, Alejandro Colomar wrote: > Hi Paul! > > On Thu, Jan 11, 2024 at 01:44:19AM -0500, Paul Smith wrote: > > I've implemented a new capability for conditional assignments (not > > pushed yet). > > > > After these ch

Re: New conditional assignment facility

2024-01-11 Thread Alejandro Colomar
On Thu, Jan 11, 2024 at 02:25:25PM +0100, Alejandro Colomar wrote: > On Thu, Jan 11, 2024 at 02:22:19PM +0100, Alejandro Colomar wrote: > > Hi Paul! > > > > On Thu, Jan 11, 2024 at 01:44:19AM -0500, Paul Smith wrote: > > > I've implemented a new capabili

[bug #65600] `--silent` option should also silence `$(info ...)`

2024-04-17 Thread Alejandro Colomar
Follow-up Comment #2, bug #65600 (group make): [comment #0 original submission:] > Currently `--silent` option only silences the output of the executed commands. No. --silent (and .SILENT) don't silence the output of any command. Where did you get that from? > Some users of make use `echo`

[bug #65600] `--silent` option should also silence `$(info ...)`

2024-04-20 Thread Alejandro Colomar
Follow-up Comment #7, bug #65600 (group make): [comment #5 comment #5:] > > [comment #4 comment #4:] > > > Hmmm, I still disagree, because $(info) is a replacement for echo(1). In fact, I use .SILENCE to not show any commands, and then $(info) shows pretty versions of them (e.g., CC file.o,

[bug #65600] `--silent` option should also silence `$(info ...)`

2024-04-20 Thread Alejandro Colomar
Follow-up Comment #9, bug #65600 (group make): [comment #8 comment #8:] > > [comment #7 comment #7:] > > > You can check the build system of the Linux man-pages, which I wrote in the last few years, if you're interested. It's quite complex, though, so it may be scary. :) > > > >

[bug #65600] `--silent` option should also silence `$(info ...)`

2024-04-19 Thread Alejandro Colomar
Follow-up Comment #4, bug #65600 (group make): Hi Gökçe, [comment #3 comment #3:] > > [comment #2 comment #2:] > > No. --silent (and .SILENT) don't silence the output of any command. Where did you get that from? > > No. `@` is to not print the command before executing it. For silencing the

[bug #65600] `--silent` option should also silence `$(info ...)`

2024-04-21 Thread Alejandro Colomar
Follow-up Comment #11, bug #65600 (group make): [comment #10 comment #10:] > You might consider checking this blog post; it describes a "common" way to utilize silent / verbose rules. I haven't checked the details of the Linux man pages build system to know how much overlap etc. there is (or

Re: [bug] Sibling submakes: wait for other submakes before failing

2021-06-16 Thread Alejandro Colomar (man-pages)
Hi Philip & David, On 6/14/21 5:42 AM, Philip Guenther wrote: On Sun, Jun 13, 2021 at 6:29 PM David A. Wheeler <mailto:dwhee...@dwheeler.com>> wrote: > On Jun 13, 2021, at 5:44 PM, Alejandro Colomar (man-pages) mailto:alx.manpa...@gmail.com>> wrote: >

[bug] Sibling submakes: wait for other submakes before failing

2021-06-13 Thread Alejandro Colomar (man-pages)
to change too much? Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/

Re: [bug #61226] A regression prevents generation of missing included dependency files.

2021-10-26 Thread Alejandro Colomar (man-pages)
On 10/26/21 3:20 PM, Alejandro Colomar (man-pages) wrote: Hi Paul and Dmitry, On 10/26/21 1:16 AM, Paul Smith wrote: On Mon, 2021-10-25 at 17:51 -0400, Dmitry Goncharov via Bug reports and discussion for GNU make wrote: On Monday, October 25, 2021, Alejandro Colomar (man-pages) < alx.ma

Re: [bug #61226] A regression prevents generation of missing included dependency files.

2021-10-26 Thread Alejandro Colomar (man-pages)
Hi Paul and Dmitry, On 10/26/21 1:16 AM, Paul Smith wrote: On Mon, 2021-10-25 at 17:51 -0400, Dmitry Goncharov via Bug reports and discussion for GNU make wrote: On Monday, October 25, 2021, Alejandro Colomar (man-pages) < alx.manpa...@gmail.com> wrote: Why do I do this? Because,

-V, --verbose, as opposite of -s, --silent, --quiet

2021-10-22 Thread Alejandro Colomar (man-pages)
you please consider adding such an option to GNU Make? Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/

Re: -V, --verbose, as opposite of -s, --silent, --quiet

2021-10-25 Thread Alejandro Colomar (man-pages)
Hello Paul, Dmitry, and David! > On Sat, Oct 23, 2021 at 6:06 AM Paul Smith <mailto:psm...@gnu.org>> wrote: > > On Sat, 2021-10-23 at 03:01 +0200, Alejandro Colomar (man-pages) wrote: > > I'd like a project to use '--silent' by default, to have readable >

Re: [bug #61226] A regression prevents generation of missing included dependency files.

2021-10-25 Thread Alejandro Colomar (man-pages)
) $(CXXFLAGS) -I $(INCLUDEDIR) -M -MT $(builddir_)/$*.i -MF $@ $< [...] include $(UNITS_d) -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/

Re: -V, --verbose, as opposite of -s, --silent, --quiet

2021-10-25 Thread Alejandro Colomar (man-pages)
Hi Paul! On 10/25/21 10:32 PM, Paul Smith wrote: On Mon, 2021-10-25 at 22:28 +0200, Alejandro Colomar (man-pages) wrote: Since I use '--warn-undefined-variables', and also to help readability to someone who may not know about this usage and may wonder what does that $(V) mean, I used

Re: Segafult while running make(1) from /lib/init/rc with -j

2022-01-12 Thread Alejandro Colomar (man-pages)
Hi Paul, On 1/8/22 21:43, Paul Smith wrote: On Sat, 2022-01-08 at 21:37 +0100, Alejandro Colomar (man-pages) wrote: Hi Dmitry, On 1/7/22 17:48, Dmitry Goncharov wrote: On Thu, Jan 6, 2022 at 2:13 PM Alejandro Colomar (man-pages) wrote: I could try to write a simpler Makefile That would

[BUG] --warn-undefined-variable is not triggered in prerequisites

2022-01-27 Thread Alejandro Colomar (man-pages)
should have warned me. Isn't this supposed to trigger the warning? Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/

Re: [PATCH] RFC: add --shuffle[=seed] argument support

2022-02-05 Thread Alejandro Colomar (man-pages)
up to standard. > > What do you think? I like the concept. When debugging Makefiles, make -j may not run randomly enough to trigger some corner cases. This will allow to debug Makefiles much more easily. Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/

Re: [BUG] --warn-undefined-variable is not triggered in prerequisites

2022-01-28 Thread Alejandro Colomar (man-pages)
Hi Paul, On 1/28/22 23:49, Paul Smith wrote: > On Fri, 2022-01-28 at 01:09 +0100, Alejandro Colomar (man-pages) wrote: >> I'd like make to warn about this. It took me a while to debug >> a Makefile bug, which I thought was not happening, since make should >> have warned me.

Re: [BUG] --warn-undefined-variable is not triggered in prerequisites

2022-01-28 Thread Alejandro Colomar (man-pages)
akefile:4: warning: undefined variable 'foo' a -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/

Segafult while running make(1) from /lib/init/rc with -j

2022-01-06 Thread Alejandro Colomar (man-pages)
89 4c 24 48 64 48 8b 04 25 28 00 00 00 48 89 84 24 08 make: *** [Makefile:66: S] Segmentation fault Does it make any sense? Thanks, Alex -- Alejandro Colomar Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/

Re: Segafult while running make(1) from /lib/init/rc with -j

2022-01-08 Thread Alejandro Colomar (man-pages)
On 1/8/22 21:40, Alejandro Colomar (man-pages) wrote: On 1/8/22 21:37, Alejandro Colomar (man-pages) wrote: Hi Dmitry, On 1/7/22 17:48, Dmitry Goncharov wrote: On Thu, Jan 6, 2022 at 2:13 PM Alejandro Colomar (man-pages) wrote:   I could try to write a simpler Makefile That would

Re: Segafult while running make(1) from /lib/init/rc with -j

2022-01-08 Thread Alejandro Colomar (man-pages)
Hi Dmitry, On 1/7/22 17:48, Dmitry Goncharov wrote: On Thu, Jan 6, 2022 at 2:13 PM Alejandro Colomar (man-pages) wrote: I could try to write a simpler Makefile That would be good. We need to be able to reproduce the crash. I couldn't reproduce it with a simple Makefile with a few

Re: Segafult while running make(1) from /lib/init/rc with -j

2022-01-08 Thread Alejandro Colomar (man-pages)
On 1/8/22 21:37, Alejandro Colomar (man-pages) wrote: Hi Dmitry, On 1/7/22 17:48, Dmitry Goncharov wrote: On Thu, Jan 6, 2022 at 2:13 PM Alejandro Colomar (man-pages) wrote:   I could try to write a simpler Makefile That would be good. We need to be able to reproduce the crash. I

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-15 Thread Alejandro Colomar (man-pages)
Hi Paul, On 7/14/22 18:11, Paul Smith wrote: On Thu, 2022-07-14 at 14:16 +0200, Alejandro Colomar wrote: How can $localstatedir be $prefix/var and at the same time $runstatedir be /var/run (notice no prefix) if it is defined as $localstatedir/run. This I don't know about: it might

Re: New feature: Post-requisites

2022-07-31 Thread Alejandro Colomar (man-pages)
post-requisite "bar" does NOT say that make will guarantee that "bar" is always built after "foo". What it ensures is that if "foo" is built, then "bar" will also be tried afterwards. It's possible that make could be taught to detect a situation like

Re: New feature: Post-requisites

2022-07-31 Thread Alejandro Colomar (man-pages)
Hi Paul On 7/31/22 14:36, Paul Smith wrote: On Sun, 2022-07-31 at 11:45 +0200, Alejandro Colomar (man-pages) wrote: If some new post-requisite "baz" was found while building either "foo" or "bar", it would be built after those and be as if the user had invoked &qu