Re: Compilation error with GCC

2021-12-19 Thread Paul Smith
On Sun, 2021-12-19 at 20:04 +0100, Jouke Witteveen wrote: > The patches "file #52422" and "file #52428" should resolve your > issues. I pushed these changes to Git.

Re: Confusing message when make starts in current directory

2021-12-15 Thread Paul Smith
On Wed, 2021-12-15 at 17:59 +0100, Andrea Monaco wrote: > In my opinion, those messages should always come with a chdir. Well, make can't know whether the previous make started in the same directory or not, at least not reliably. If you do something like the very common, and POSIX-compatible:

Re: .SECONDEXPANSION problems

2021-12-13 Thread Paul Smith
On Sun, 2021-12-12 at 20:35 -0500, Dmitry Goncharov wrote: > On Sun, Dec 12, 2021 at 2:15 PM Paul Smith wrote: > > Did something happen when it stopped working, like you updated to a > > different version of GNU make? > > i bet this make is built from the current git.

Re: .SECONDEXPANSION problems

2021-12-12 Thread Paul Smith
On Thu, 2021-12-09 at 12:25 +0100, Gisle Vanem wrote: > Since some time the cool '.SECONDEXPANSION' feature has stopped > working for me. Did something happen when it stopped working, like you updated to a different version of GNU make? > In a Makefile, I have many rules to link module .DLLs: >

Re: [PATCH] doc: note that $(wildcard) is implemented in terms of glob(3)

2021-12-05 Thread Paul Smith
On Fri, 2021-12-03 at 22:10 +0100, Ævar Arnfjörð Bjarmason wrote: > Would a patch that's updated to note that, and discusses the behavior > in older versions be acceptable for inclusion? I added a note about this to the docs. Thanks for pointing it out!

Re: [PATCH] doc: note that $(wildcard) is implemented in terms of glob(3)

2021-12-03 Thread Paul Smith
On Fri, 2021-12-03 at 11:08 +0100, Ævar Arnfjörð Bjarmason wrote: > The motivation for this patch is that I've seen code like this in the > wild: > > FILES = $(sort $(wildcard t*.sh)) > > I thought that it would be documented that that sort of thing was > redundant, but I didn't find any ment

Re: GPL Interpretation on load [Was: [bug #61594] suggest new $(hash ...) function]

2021-12-01 Thread Paul Smith
On Wed, 2021-12-01 at 09:33 -0500, rsbec...@nexbridge.com wrote: > That is understood. Is this an official GNU Make policy because it is > not specified that way in GPL. Has the GNU Make team modified their > copy of the GPL license because it is not indicated as a modified > version? I'm not sure

Re: [PATCH] Fix type errors in win32.

2021-11-28 Thread Paul Smith
On Mon, 2021-10-25 at 15:32 +0300, Eli Zaretskii wrote: > the default C runtime used by Make doesn't support %llu, at least not > on Windows versions older than Windows 10. Hrm, I just added a new use of sprintf() with %lld into GNU make, to format a long long variable. It worked for me in my tri

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison

2021-11-28 Thread Paul Smith
On Sun, 2021-11-28 at 15:49 +0100, Jouke Witteveen wrote: > I fully agree, but was not aware of the robustness of INTSTR_LENGTH. > It felt a bit fragile when I spotted its definition in makeint.h. The C standard defines the largest unsigned long long value as 18446744073709551615, the largest sign

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison

2021-11-28 Thread Paul Smith
On Sun, 2021-11-28 at 08:24 +0100, Jouke Witteveen wrote: > On the user side, strcmp could now probably be defined something like > $(and $(intcmp $(words $1),$(words $2)),$(findstring x$1x,x$2x)) I don't think this is equivalent since a putative strcmp would also do greater / less than comparison

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison

2021-11-28 Thread Paul Smith
On Sun, 2021-11-28 at 14:57 +0100, Jouke Witteveen wrote: > > Since the two arguments are equal, it doesn't matter which of LHS > > or RHS we return. > > They could differ for instance when one of them contains a '+'-sign. > My reason for using LHS is that we already have a string for it. I don't

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison

2021-11-28 Thread Paul Smith
On Sun, 2021-11-28 at 08:24 +0100, Jouke Witteveen wrote: > Thanks for sending this message, I would have otherwise prepared and > sent an updated patch series today. My plan was to expand to RHS in > the two-argument case if both values are equal. I assume you also > updated the documentation wher

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison

2021-11-27 Thread Paul Smith
On Mon, 2021-11-15 at 20:49 +0100, Jouke Witteveen wrote: > It may be obscure, but how about we implement this as well? Sure, the > two-argument form of $(compare) will be a little inconsistent, but it > may be useful. I applied this three-patch set. I left the argument order as you originally sp

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison

2021-11-14 Thread Paul Smith
On Wed, 2021-11-10 at 18:19 +0100, Jouke Witteveen wrote: > On Mon, Nov 8, 2021 at 4:08 PM Paul Smith wrote: > > > On Fri, 2021-07-16 at 14:04 +0200, Jouke Witteveen wrote: > > > $(compare > > > @var{lhs},@var{rhs},@var{lt-part}[,@var{eq-part}[,@var{gt-part}]]) &g

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison

2021-11-08 Thread Paul Smith
On Fri, 2021-07-16 at 14:04 +0200, Jouke Witteveen wrote: > +@item $(compare > @var{lhs},@var{rhs},@var{lt-part}[,@var{eq-part}[,@var{gt-part}]]) Let me ask this: would it be better to use a format of: $(compare , , [, [, ]]) Then the rule is, if the values are equal we get the part, if lhs

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

2021-10-25 Thread Paul Smith
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, if you remove a file from your tree, an > > old .d file will require

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

2021-10-25 Thread Paul Smith
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 the following: > > V := > $(V).SILENT: Looks good. Som

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

2021-10-25 Thread Paul Smith
On Mon, 2021-10-25 at 10:11 +, Edward Welbourne wrote: > Dmitry Goncharov (17 October 2021 18:33) wrote: > > i think, make should not print a warning when a .d file is missing. > > make should proceed and create the missing file. However, when .d > > is present, but make cannot include it, then

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

2021-10-23 Thread Paul Smith
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 > output, and hide most of the full commands, which would be too > noisy. > > So, ideally, I'd like to have 'MAKEFLAGS += --silent' in the > Makefile. Actua

Re: Make language

2021-10-12 Thread Paul Smith
On Tue, 2021-10-12 at 14:12 +, Bartol Hrg wrote: > I'm really displeased and agitated. I hope that letting us know what you saw helps you feel better!

Re: Compilation error on master branch (Commit c5d4b7b)

2021-10-03 Thread Paul Smith
On Sun, 2021-10-03 at 23:23 +0200, Mohammad Akhlaghi wrote: > I then ran the standard './configure' and 'make' commands to build > it, but the build failed with the attached error messages when > building 'src/guile.c'. These errors appear to be coming from compiling src/read.c, not src/guile.c.

Re: Parallel job instance identifiers?

2021-09-06 Thread Paul Smith
On Fri, 2021-08-13 at 14:14 +0100, Howard Chu via Bug reports and discussion for GNU make wrote: > I'm looking for a way to expose a job ID number to the individual > jobs, in a consecutive range from 1-[number of jobs]. Not just > unique numbers, for that we could just use $$ already. The purpose

Re: Report 3 UBSan integer overflow bugs found by an automatic fuzzer

2021-09-05 Thread Paul Smith
On Wed, 2021-06-30 at 17:34 +, He Jingxuan wrote: > We tested GNU make with an automatic tool (based on the fuzzer AFL). > A number of test cases triggering UBSan integer overflow errors were > generated. We manually checked those test cases and filtered out > benign cases. Finally, we identif

Re: GNU make man page typo

2021-09-05 Thread Paul Smith
On Thu, 2021-09-02 at 20:37 +, John Marshall wrote: > On 2 Sep 2021, at 06:40, Zach Petch wrote: > > The second paragraph under DESCRIPTION reads, > > > > > To prepare to use make, you must write a file called the makefile > > that describes the relationships among files in your program, and >

Re: [bug #60774] make hangs on fcntl lock when using -O and stdout is /dev/null

2021-07-26 Thread Paul Smith
On Sun, 2021-07-25 at 17:29 -0700, David Boyce wrote: > It's simple to detect this on a Unix-like host (see sample script > below) and my contention is that this is "plenty portable enough" Ah. Yes, determining if stdout is /dev/null can be done. I was definitely having an off day yesterday and

Re: [bug #60774] make hangs on fcntl lock when using -O and stdout is /dev/null

2021-07-25 Thread Paul Smith
On Sun, 2021-07-25 at 16:04 -0400, Dmitry Goncharov wrote: > > It's clear that /dev/null is a special case, however, because the > > order in which data is written to it cannot be detected so what's > > the point in preserving any order? > > Maybe Mike can tell us. Based on the bug report I don't

Re: [bug #60774] make hangs on fcntl lock when using -O and stdout is /dev/null

2021-07-25 Thread Paul Smith
On Sun, 2021-07-25 at 15:25 -0400, Paul Smith wrote: > There's no reason that those two disjoint sets of output need to be > synchronized WITH EACH OTHER to meet the goal of the -O option. Given > the choice between allowing output to go to these two different > locatio

Re: [bug #60774] make hangs on fcntl lock when using -O and stdout is /dev/null

2021-07-25 Thread Paul Smith
On Sun, 2021-07-25 at 13:11 -0400, Dmitry Goncharov wrote: > On Sun, Jul 25, 2021 at 10:03 AM Paul Smith wrote: > > Writing to things like /dev/lp0 SHOULD be locked, IMO: you don't > > want multiple concurrent writers to your printers or your terminal! > > The user in

Re: [bug #60774] make hangs on fcntl lock when using -O and stdout is /dev/null

2021-07-25 Thread Paul Smith
On Sat, 2021-07-24 at 20:35 -0400, Dmitry Goncharov wrote: > On Sat, Jul 24, 2021 at 3:02 PM David Boyce > wrote: > > I can’t think of a file other than /dev/null which would > > appropriately be shared with unrelated processes in a “w” (write) > > condition. > > /dev/zero, /dev/lp0, /dev/lp1, /d

Re: [bug #60798] Make does not compile with GCC 11.1.0

2021-06-19 Thread Paul Smith
On Sat, 2021-06-19 at 16:23 +0100, Dmitrii Pasechnik wrote: > > I don't think I understand. > > p[] occupies a continuous memory area, starting from p[0], but p[-1] > is not guaranteed by the standard to be accessible for you (well, > unless you control the memory layout by placing p in a struct,

Re: [bug #60798] Make does not compile with GCC 11.1.0

2021-06-19 Thread Paul Smith
On Sat, 2021-06-19 at 15:31 +0100, Dmitrii Pasechnik wrote: > On Fri, Jun 18, 2021 at 12:53:32PM -0400, Paul D. Smith wrote: > > > Follow-up Comment #1, bug #60798 (project make): > > FWIW, this warning is not valid in this situation. The code is > > correct; p will always be pointing into a vali

Re: shell assignment operator documentation missing 'not'

2021-05-30 Thread Paul Smith
On Tue, 2021-05-25 at 10:33 +, Ronald Hoogenboom wrote: > In the info file documenting the shell assignment operator in section > 3.7 "reading makefiles", there is the phrase: > > "...that variable becomes a simple variable (and will thus be re- > evaluated on each reference)." > > A simple

Re: basename function in 4.3 cygwin

2021-05-21 Thread Paul Smith
On Fri, 2021-05-21 at 08:31 +, Ronald Hoogenboom wrote: > The difference happens when a suffix contains one or more > backslashes. This is sometimes needed to escape special behavior of > meta characters in the shell. The basename function in 3.81 would > return everything up to the last period

Re: basename function in 4.3 cygwin

2021-05-21 Thread Paul Smith
On Fri, 2021-05-21 at 08:31 +, Ronald Hoogenboom wrote: > I have noticed a nasty difference in behavior between 4.3 and 3.81 > versions of gnu-make in cygwin. > > I’m not sure if this qualifies as a bug per-se, but it is a nasty > difference in behavior anyway. At least this should be document

Re: [bug #60538] Environment variable overrides explicit assignment

2021-05-06 Thread Paul Smith
On Thu, 2021-05-06 at 17:11 +, Martin Dorey wrote: > So MAKEOVERRIDES is exported, though perhaps it doesn't need to be, > but isn't expanded before being exported. Oh duh!! I didn't provide any overrides. You're right, it is exported. OK I guess I'll have to go back and look at the code bu

Re: [bug #60538] Environment variable overrides explicit assignment

2021-05-06 Thread Paul Smith
On Thu, 2021-05-06 at 17:11 +, Martin Dorey wrote: > > The manual doesn't actually say that MAKEOVERRIDES is exported like > MAKEFLAGS but I assume it is. > > I was going to just say that MAKEFLAGS would be expanded before being > exported, and indeed it is, but, having tried it, the results a

Re: [bug #60538] Environment variable overrides explicit assignment

2021-05-06 Thread Paul Smith
On Thu, 2021-05-06 at 09:48 -0700, David Boyce wrote: > The manual doesn't actually say that MAKEOVERRIDES is exported like > MAKEFLAGS but I assume it is. No, it's not. The value of MAKEOVERRIDES is used within the makefile itself. Its value is added to the MAKEFLAGS variable when invoking a su

Re: [bug #60538] Environment variable overrides explicit assignment

2021-05-06 Thread Paul Smith
On Thu, 2021-05-06 at 17:27 +0100, Shareef Jalloq wrote: > OK, just to clarify sorry, the issue here is that MAKEFLAGS are > propagated down to any sub-shells from my main command line? So I > can work around this by just clearing MAKEFLAGS in my call to > subprocess.run() when I pass in the env.

Re: Manual: Multiple outputs

2021-05-03 Thread Paul Smith
On Mon, 2021-05-03 at 12:55 +0200, Frank Heckenbach wrote: > The manual ( > https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html > ) > describes various ways to handle commands with multiple outputs. Just to remind, this is the mailing list for GNU make... the above manua

Re: semicolon effects

2021-04-26 Thread Paul Smith
On Tue, 2021-04-27 at 05:10 +0800, 積丹尼 Dan Jacobson wrote: > > > > > > "PS" == Paul Smith writes: > PS> In the second example, the "Z" command is by itself so it's > "simple" so > PS> make uses its fast path solution, which is t

Re: semicolon effects

2021-04-26 Thread Paul Smith
On Mon, 2021-04-26 at 06:25 +0800, Dan Jacobson wrote: > $ make B > :; Z > > /bin/sh: line 1: Z: command not found > make: *** [Makefile:2: B] Error 127 > > $ make C > : > Z > > make: Z: No such file or directory > make: *** [Makefile:5: C] Error 127 > > So we see that "the effect is the s

Re: [bug #47880] Allow updates to .INCLUDE_DIRS to change search path

2021-04-25 Thread Paul Smith
On Sun, 2021-04-25 at 11:21 -0400, Jeffrey Walton wrote: > On Sun, Apr 25, 2021 at 10:51 AM Dmitry Goncharov < > invalid.nore...@gnu.org> wrote: > > Follow-up Comment #9, bug #47880 (project make): > > > But, maybe it's better to grab that bull by the horns. > > From the user's point of view, it ma

Intermediate file removal ... considered harmful??

2021-03-31 Thread Paul Smith
I've been thinking about this for a while and Dmitry's recent Savannah proposal caused me to decide to post it. Is there any point, these days, in automatically removing intermediate files in GNU make? Back in the day when disk was expensive I suppose I can see where automatically removing unnece

Re: Compile errors with MSVC

2021-03-28 Thread Paul Smith
On Thu, 2021-03-18 at 13:51 +0100, Gisle Vanem wrote: > I just checked out a copy and saw this when > building with MSVC and clang-cl. I pushed some changes just now that allowed the Windows port to compile and run tests using Visual Studio. I didn't check with clang-cl. There are still 7 tests

Re: src/job.c patch

2021-03-25 Thread Paul Smith
On Thu, 2020-12-31 at 16:01 -0800, Pete Dietl wrote: > Gnulib added a third argument to this function on 2020-12-14 > > -cmd = (char *)find_in_given_path (argv[0], p, 0); > +cmd = (char *)find_in_given_path (argv[0], p, 0, NULL); >} I applied this, except that the new argument (NULL)

Re: [PATCH] manual: relocate $? example

2021-03-25 Thread Paul Smith
On Thu, 2021-03-25 at 01:18 -0400, Mike Frysinger wrote: > The $? example shows up after all the automatic variables are > discussed. This is weird as it's only relevant to the $? section, > and the content that follows it is relevant to all the automatic > variables. Thanks applied in my repo.

Re: [PATCH] More correctly describe the scope of variables

2021-03-15 Thread Paul Smith
On Wed, 2021-03-03 at 20:47 +0100, Jouke Witteveen wrote: > Another month, another reminder. I pushed these changes yesterday; thanks for the reminders! :)

Re: bug report

2021-03-03 Thread Paul Smith
On Wed, 2021-03-03 at 22:00 +0100, Goran V. wrote: > Am Mittwoch, den 03.03.2021, 15:41 -0500 schrieb Paul Smith: > Yes, that is what I mean with "a feature like that". But I must say > that I'm in no position to propose a patch as make is huge, > http://git.savannah

Re: bug report

2021-03-03 Thread Paul Smith
On Wed, 2021-03-03 at 21:32 +0100, Goran V. wrote: > Maybe I was wrong to call this a bug but would a feature like that > break anything? If by "a feature like that" you mean a way to create multiple pattern rules with a single rule definition in the makefile, then obviously this would require som

Re: bug report

2021-03-03 Thread Paul Smith
On Wed, 2021-03-03 at 17:31 +0100, Goran V. wrote: > $(BUILD)/$(FRONTEND)/%.html \ > $(BUILD)/$(FRONTEND)/%.js \ > $(BUILD)/$(FRONTEND)/%.css \ > $(BUILD)/$(FRONTEND)/%.svg \ > $(BUILD)/$(FRONTEND)/%.ico: > @echo -n "$(FRONTEND) - building $@" > @$(MD) $(BUILD)/$(FRONTEND) >

Re: gmake and ccache conspiring together in creating gremlins

2021-02-08 Thread Paul Smith
On Mon, 2021-02-08 at 10:43 +, Edward Welbourne wrote: > Sounds to me like that's a bug: when the descriptors are closed, the > part of MAKEFLAGS that claims they're make's jobserver file > descriptors should be removed, since that's when the claim stops > being true. I believe there have been

Re: Time for a new release...

2021-01-28 Thread Paul Smith
On Sun, 2020-12-20 at 14:19 -0900, Britton Kerin wrote: > A while back there was talk about making Make a bit smarter about > understanding implicit dependencies make-sphere stuff: > > http://gnu-make.2324884.n4.nabble.com/Idea-Add-COMMANDCHANGE-and-CACHE-td19133.html > > I've come to like the id

Re: Time for a new release...

2021-01-28 Thread Paul Smith
On Sun, 2020-12-20 at 18:09 -0500, Paul Smith wrote: > I'm thinking of putting out a new release of GNU make early in the > new year. Hi all; just an update on this: The company I work for was acquired, so I need to redo my disclaimer with my new benevolent overlords. I've done

Re: GNU Make documentation example error

2021-01-28 Thread Paul Smith
On Thu, 2021-01-28 at 12:34 +, Niko's ProtonMail Account wrote: > I think there may be a mistake in the section “5.8 Defining Canned > Recipes” of the GNU Make manual: > https://www.gnu.org/software/make/manual/make.html#Canned-Recipes. > > The examples show the “define” directive followed by

Re: bug in documentation - eval function

2021-01-13 Thread Paul Smith
On Wed, 2021-01-13 at 09:18 +0100, Piotr Jankowski wrote: > At least on GNU Make 3.81 the one with the equal sign does not work. > It does not cause a visible error but does not work. It works fine for all versions of GNU make 3.82 and above; 3.82 was released in July 2010. The online manual docu

Re: AW: Issue with VPN

2021-01-12 Thread Paul Smith
On Tue, 2021-01-12 at 10:20 -0500, Dmitry Goncharov wrote: > In bash (in recipe lines) you can replace cp with > echo "$(dst If you use this you must set the make variable SHELL to /bin/bash. Also, if running "echo hi" is slow then I assume this would also be slow. > in make you can replace cp w

Re: AW: Issue with VPN

2021-01-11 Thread Paul Smith
Hi Martin; please always reply to the mailing list: this allows everyone else to help. Also, we try to use "inline replies" on the mailing lists, rather than "top-posting" replies. On Fri, 2021-01-08 at 08:59 +, Stühler, Martin wrote: > Dear Paul, > > Thanks for your fast response. I saw, th

Re: Issue with VPN

2021-01-07 Thread Paul Smith
On Thu, 2021-01-07 at 18:01 +, Stühler, Martin wrote: > I have some runtime issue with wingw32-make.exe, when I´m work at > home and connected through VPN to the company. The issue is, that the > mingw32-make.exe always want to connect (TCP) something to any > internal company network and this

bug-make Denial of Service attack

2021-01-05 Thread Paul Smith
Hi all; You are probably not aware but bug-make (and probably other mailing lists) are undergoing a denial of service attack where they are being subscribed to thousands of other mailing lists. Most lists (I hope!!) require confirmation before they will subscribe so the actual subscription will n

Re: detecting if a Makefile is GNU make-ish

2021-01-01 Thread Paul Smith
On Fri, 2021-01-01 at 11:02 -0500, Alfred M. Szmidt wrote: > Is there some way of detecting or specifying that a Makefile is GNU > make specific? I'm kinda thinking of something similar to the > .POSIX directive. > > I'm in a situation where got a bunch of Makefiles, some BSD makefile, > some GNU

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 > > exits 2. Yes. The manual say

Re: Operators '=' ‘:=’ ‘::=’ in manual

2020-12-11 Thread Paul Smith
On Thu, 2020-12-10 at 18:40 +, DUDZIAK Krzysztof wrote: > I don't actually dare to use terms "recursive variable" and "simple > variable" as myself didn't find such in manual. Terms which I found > read variable expanded recursively variable expanded simply I still believe these are poor terms

Re: FW: Manual, ch. 6.2 The Two Flavors of Variables, section simply expanded.. controlled leading whitespace, page 63

2020-12-10 Thread Paul Smith
On Thu, 2020-12-10 at 17:45 +, DUDZIAK Krzysztof wrote: > example > dir := /foo/bar# directory to put the frobs in > vs. > paragraph 1 text > Here the value of the variable dir is '/foo/bar' (with four > trailing spaces) > > Trailing spaces in front of closing quota or behind? I

Re: Operators '=' ‘:=’ ‘::=’ in manual

2020-12-10 Thread Paul Smith
On Thu, 2020-12-10 at 18:19 +, DUDZIAK Krzysztof wrote: > Operators ‘=’ ‘:=’ ‘::=’ seem to have two dimensions these control > things expansion recursiveness (simple vs. recursive expansion) > expansion time (immediate vs. deferred) No, there is only one dimension really. Either the content o

Re: Manual, ch. 6.2 The Two Flavors of Variables, section simply expanded.. controlled leading whitespace, page 63

2020-12-09 Thread Paul Smith
On Wed, 2020-12-09 at 12:42 +, DUDZIAK Krzysztof wrote: > Why is a variable of null-string value used to protect leading space? Stripping of leading space in a variable assignment happens while the makefile is being parsed and BEFORE any part of the line is expanded. So, any non-space charact

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

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

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

2020-12-06 Thread Paul Smith
On Sun, 2020-10-04 at 09:11 +0200, Danny Milosavljevic wrote: > I just got a build failure in lz4. I've isolated it and made a > minimal test case, see below. > > This is on GNU Guix on a x86_64 machine. > > The reason is that apparently one Makefile rule can unwittingly > change how another unr

Re: notes about make docs p 3.5

2020-12-06 Thread Paul Smith
On Thu, 2020-12-03 at 15:04 +0300, Dmitry wrote: > > > It'll be very good to have some examples with explanations in the > > > docs. > > Maybe so. Concrete suggestions are easy to discuss, like: > > I think this example would saved me a lot of time. > > make -f mkfile > > content of mkfile: >

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: .PHONY missing from the manual's index

2020-10-14 Thread Paul Smith
On Wed, 2020-10-14 at 13:18 +0100, Jonathan Wakely wrote: > Shouldn't special targets like .PHONY be listed in the index at > > https://www.gnu.org/savannah-checkouts/gnu/make/manual/html_node/Concept-Index.html#Concept-Index_cp_symbol-9 > > ? > Similarly for .SUFFIXES and others. For some hist

Re: embedded newlines in shell function variable expansion

2020-10-09 Thread Paul Smith
On Fri, 2020-10-09 at 18:00 +, Byrnes, Robert wrote: > [pid 144497] execve("/bin/sh", ["/bin/sh", "-c", "/bin/echo blartzblurfl ; > "], 0x7ffd98ee6bc0 /* 72 vars */) = 0 Hm, interesting. I guess it's possible we are stripping out newlines before invoking the shell. I don't remember that bei

Re: embedded newlines in shell function variable expansion

2020-10-09 Thread Paul Smith
On Fri, 2020-10-09 at 15:03 +, Byrnes, Robert wrote: > Why is the embedded whitespace removed in the first (FOO) case? It > seems related to the semicolon shell metacharacter ... My suspicion is that it's a difference between your /bin/echo command and your shell's builtin echo command. In t

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

2020-10-05 Thread Paul Smith
On Mon, 2020-10-05 at 15:14 -0400, Jeffrey Walton wrote: > > $ CFLAGS=ok make > > I think you need to export CFLAGS. Or that is where I would look. > CFLAGS is set in the first shell, but it is not inherited in child > shells. It should be: the value is set in the environment when make starts and

Re: Form feeds in source code

2020-09-18 Thread Paul Smith
On Fri, 2020-09-18 at 10:59 -0500, Pete Dietl wrote: > Why are there so many form feeds in the source? That was the style that Roland used when the code was written: form feeds were used inside a source file to separate major functions. I guess it hails from a time when it wasn't that unusual to

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

2020-09-13 Thread Paul Smith
On Sun, 2020-09-13 at 15:08 -0400, Paul Smith wrote: > ... : .sentinel ; > > .sentinel: > > @touch $@ Just to be clear, you don't have to use ".sentinel" you can use any target name, and obviously you must use a different name for each &q

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

2020-09-13 Thread Paul Smith
On Sun, 2020-09-13 at 20:55 +0200, Bruno Haible wrote: > How can a rule that generates multiple files be formulated so > that it works with parallel make? > > For example, a rule that invokes bison, or a rule that invokes > a different Makefile. For simplicity, here, use a rule that > creates

Re: Backslash handling not POSIX-compliant

2020-07-28 Thread Paul Smith
On Tue, 2020-07-28 at 08:07 +0300, Ivan Kozlov wrote: > Doubling the backslash suppresses special newline handling in GNU > make. I don’t see anything in the standard that allows this. It > defines an escaped newline as one preceded by a backslash and doesn’t > say anything about backslashes being

Re: [bug #58734] gmake does not check for the existence of a file before complaining it is missing

2020-07-09 Thread Paul Smith
On Thu, 2020-07-09 at 16:00 +, Edward Welbourne wrote: > By the sounds of it, you have four files that are all created by a > single rule, which isn't a scenario make is good at. So work-arounds > are tricky: If you want to use parallel builds you must find a workaround for this issue, or you

Re: export vs $(origin )

2020-07-03 Thread Paul Smith
On Fri, 2020-07-03 at 11:50 +0200, Jan Beulich wrote: > > For example if you change the above makefile: > >export FOO > >$(info FOO: $(origin FOO)) > >all: ; @env | grep FOO > > then you run: > >$ unset FOO; make > >FOO: file > >FOO= > >make: 'all' is up to date. > > you

Re: export vs $(origin )

2020-07-02 Thread Paul Smith
On Thu, 2020-07-02 at 17:16 +0200, Jan Beulich wrote: > > export wom > > introduces the variable to the env and set origin to environment. > > Not according to my observations. The difference is whether the variable already exists in the environment or not. For this makefile: export FOO $(i

Re: make4.3/make4.2.1 - solaris 11 x86 issues

2020-06-30 Thread Paul Smith
On Tue, 2020-06-30 at 07:17 +, Preethi Selvaraju wrote: > Kindly ignore if it has nothing to do with gmake. This is not a GNU make issue.

Re: Where can I get the example C source code in GNU Make Manual ?

2020-06-30 Thread Paul Smith
On Tue, 2020-06-30 at 16:04 +0800, mkckr0 wrote: > I am a newbee programmer from China. Recently I am trying to read the > GNU Make Manual. But I cannot find the C souce code. In Chapter 2, > there is a text editor program as a example including 8 source file > and 3 header file. I cannot find them

Re: make4.3/make4.2.1 - solaris 11 x86 issues

2020-06-29 Thread Paul Smith
On Mon, 2020-06-29 at 11:41 -0400, Dmitry Goncharov wrote: > On Mon, Jun 29, 2020 at 11:20 AM Paul Smith wrote: > > > Unfortunately, Dmitry has been so active with help that I'm not > > able to accept any more of his patches until/unless some sort of > > copyright

Re: make4.3/make4.2.1 - solaris 11 x86 issues

2020-06-29 Thread Paul Smith
On Mon, 2020-06-29 at 15:00 +, Martin Dorey wrote: > I’m pleasantly surprised, as it looked like there were a bunch of > later issues possibly not fixed in jdk8u, including > https://savannah.gnu.org/bugs/index.php?57676, which is still waiting > for Paul to visibly take a stance on, after Dmi

Re: make4.3/make4.2.1 - solaris 11 x86 issues

2020-06-29 Thread Paul Smith
On Mon, 2020-06-29 at 14:17 +, Martin Dorey wrote: > Looks a likely match for: > > http://mail.openjdk.java.net/pipermail/build-dev/2014-November/013597.html > > Fixed in jdk8u in 2014. Surely our OP is using that already... but > he does say jdk8 rather than jdk8u, so maybe not. Why do the

Re: make4.3/make4.2.1 - solaris 11 x86 issues

2020-06-29 Thread Paul Smith
On Mon, 2020-06-29 at 08:56 +, Preethi Selvaraju wrote: > Error: > /usr/bin/gmake: invalid option -- 8 > /usr/bin/gmake: invalid option -- / > /usr/bin/gmake: invalid option -- a > /usr/bin/gmake: invalid option -- / > /usr/bin/gmake: invalid option -- c This are just the error messages. They

Re: Suggestion: Modernization of the include path

2020-06-02 Thread Paul Smith
On Tue, 2020-06-02 at 08:48 -0400, Sam Kendall wrote: > > I suggest that > > a) $HOME/.local/include is effectively added to the > >include_directories ... > > If two users build the same source tree, they will effectively be > building variants of it, each extending it with her own > $HOME/.l

Re: patch: check for c99 support

2020-05-28 Thread Paul Smith
On Fri, 2020-05-29 at 01:10 +, ky...@disroot.org wrote: > as of version 4.3, with the inclusion of gnulib, make now appears to > require c99 support in order to be compiled correctly. > > since this is the case, the configure script should check if flags > are necessary to enable c99 support,

Re: math expressions (was: Re: Tail call elimination)

2020-05-28 Thread Paul Smith
On Thu, 2020-05-28 at 17:07 -0500, Pete Dietl wrote: > Thoughts? I'm fine with these choices, insofar as I can tell. I reserve the right to change my mind after seeing the full scope of the proposal :).

Re: math expressions (was: Re: Tail call elimination)

2020-05-28 Thread Paul Smith
On Thu, 2020-05-28 at 22:07 +0200, Jouke Witteveen wrote: > Here is a thought: The current support for numeric variables is > limited to unsigned numbers. We could choose to stick with that! I'm not sure how this would work... it works today because we have no subtraction and all numbers make can

Re: math expressions (was: Re: Tail call elimination)

2020-05-28 Thread Paul Smith
On Wed, 2020-05-27 at 13:47 -0500, Pete Dietl wrote: > Technically, the C standard allows for machines which don't use 2's > complement. So should we consider our LONG_MIN to be -2^63 + 1? > > Also, signed arithmetic overflow is undefined behavior, so should we > also indicate that we have undefi

Re: UTF8 convert when using make

2020-05-27 Thread Paul Smith
On Wed, 2020-05-27 at 15:44 +0800, Truong Term wrote: > I downloaded this one > http://gnuwin32.sourceforge.net/packages/make.htm That site is not part of the GNU project or the FSF. If you want help using that version please refer to their support lists: http://gnuwin32.sourceforge.net/ http:/

Re: math expressions (was: Re: Tail call elimination)

2020-05-26 Thread Paul Smith
On Mon, 2020-05-25 at 15:44 -0500, Pete Dietl wrote: > As for converting between bases, that could always be a separate > function like `$(convert-base number,radix)` where radix is one of: > 2, 8, 10, or 16 I agree it should be a separate function. Perhaps it would be better to consider a more g

Re: math expressions (was: Re: Tail call elimination)

2020-05-25 Thread Paul Smith
On Mon, 2020-05-25 at 13:28 -0500, Pete Dietl wrote: > Question about 64-bit, what happens when compiling make for a 32-bit > system? I don’t think c90 has `stdint.h`... maybe there’s something > in gnulib. Anyway, would we want to support 64 bit integers even on > 32-bit platforms? 32bit platform

Re: math expressions (was: Re: Tail call elimination)

2020-05-25 Thread Paul Smith
On Mon, 2020-05-25 at 12:07 -0400, Sam Kendall wrote: > I'd like to raise some questions that I think any proposal ought to > answer. I'll assume a straw man proposal: there's one function, and > it takes one of the following forms: > > $(math OPERATOR,VALUE1,VALUE2) > $(math OPERATOR,VALUE1) I b

Re: math expressions (was: Re: Tail call elimination)

2020-05-25 Thread Paul Smith
On Mon, 2020-05-25 at 10:10 +, Edward Welbourne wrote: > > > Mult-base support: should we support only base 10 integer > > > constants in > > > expressions, or also hex/octal constants? > > I vote for decimal, hex, and binary. > > Octal if you really want it. > > A case for octal and bitwise a

Re: Building Documentation

2020-05-24 Thread Paul Smith
On Sun, 2020-05-24 at 21:10 -0500, Pete Dietl wrote: > Does anyone have advice on how to build the web documentation? > I tried running `make gendocs` but I get errors like: > > cvs -d :pserver:anonym...@cvs.sv.gnu.org:/web/www co 'www/server/standards' > > cvs [checkout aborted]: connect to cvs.

Re: math expressions (was: Re: Tail call elimination)

2020-05-24 Thread Paul Smith
On Sun, 2020-05-24 at 14:09 -0500, Pete Dietl wrote: > > I think, as I mentioned before, that someone (I guess that's you > > :)) should write up an actual proposal (maybe, for example, the > > start of a new manual section) that can be examined and commented > > on. > > Challenge accepted! What i

Re: math expressions (was: Re: Tail call elimination)

2020-05-24 Thread Paul Smith
On Sat, 2020-05-23 at 15:43 -0500, Pete Dietl wrote: > > I understand what Tim is saying but I still prefer to have a single > > function. I want to reduce the "namespace leakage" for these > > capabilities. If we decide to add more operations to this in the > > future I don't want it colliding w

<    1   2   3   4   5   6   7   8   9   10   >