make 3.60: BS/NL mishandled with non-default SHELL

2006-08-28 Thread Andreas Schwab
The following makefile causes a syntax error, but works correctly when the
first line is commented out.

$ cat Makefile
SHELL = /bin/sh
all:
if :; then \
:; \
fi
$ make
if :; then \
:; \
fi
/bin/sh: -c: line 1: syntax error: unexpected end of file
/bin/sh: line 1::; \: command not found
/bin/sh: -c: line 2: syntax error near unexpected token `fi'
/bin/sh: -c: line 2: `fi'
make: *** [all] Error 2

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
And now for something completely different.


___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


Re: make 3.82 fails on powerpc defconfig update [was: Linux 2.6.35]

2010-08-02 Thread Andreas Schwab
Sam Ravnborg s...@ravnborg.org writes:

 +bootwrapper_install

Missing colon.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
And now for something completely different.

___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


Re: timestamp bug when files are created just before make is run

2012-12-10 Thread Andreas Schwab
Mikulas Patocka miku...@artax.karlin.mff.cuni.cz writes:

 BTW. on Linux, high precision timestamps have really kernel-tick 
 precision, not nanosecond precision.

The precision is as high as what the best hardware timer provides,
independent of the configured value of HZ.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
And now for something completely different.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #45728] .VARIABLES not updated after undefine

2015-08-10 Thread Andreas Schwab
URL:
  http://savannah.gnu.org/bugs/?45728

 Summary: .VARIABLES not updated after undefine
 Project: make
Submitted by: schwab
Submitted on: Mo 10 Aug 2015 15:23:58 CEST
Severity: 3 - Normal
  Item Group: Bug
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: 4.0
Operating System: Any
   Fixed Release: None
   Triage Status: None

___

Details:

This makefile demonstrates a bug in the expansion of .VARIABLES:

$ cat Makefile.variables
MY_one := 1
MY_two := 2
$(foreach v, $(filter MY_%, $(.VARIABLES)), $(eval undefine $v))
MY_foo := foo
MY_bar := bar
all:; @echo MY Variables = $(filter MY_%, $(.VARIABLES))
$ make -f Makefile.variables
MY Variables = MY_one MY_two




___

Reply to this item at:

  http://savannah.gnu.org/bugs/?45728

___
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


.VARIABLES not updated after undefine

2015-07-14 Thread Andreas Schwab
This makefile demonstrates a bug in the expansion of .VARIABLES:

$ cat Makefile.variables
MY_one := 1
MY_two := 2
$(foreach v, $(filter MY_%, $(.VARIABLES)), $(eval undefine $v))
MY_foo := foo
MY_bar := bar
all:
@echo MY Variables = $(filter MY_%, $(.VARIABLES))
$ make -f Makefile.variables
MY Variables = MY_one MY_two

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
And now for something completely different.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #45728] .VARIABLES not updated after undefine

2015-09-03 Thread Andreas Schwab
Additional Item Attachment, bug #45728 (project make):

File name: 0001-SV-45728-Force-recomputing-.VARIABLES-when-a-variabl.patch
Size:2 KB


___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: features/output-sync always times out

2016-05-30 Thread Andreas Schwab
Paul Smith <psm...@gnu.org> writes:

> On Mon, 2016-05-23 at 12:31 +0200, Andreas Schwab wrote:
>> What does it mean that the features/output-sync test always times out?
>
> I don't know.  It never does that for me.  Can you give me more details
> about your system?

It always fails when building in a kvm container, but not in a chroot
environment.  Also, it only fails on x86_64, not on any other
archtecture.

https://build.opensuse.org/package/show/home:Andreas_Schwab:Factory/make

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #45728] .VARIABLES not updated after undefine

2016-03-14 Thread Andreas Schwab
Follow-up Comment #3, bug #45728 (project make):

Why do the two variables have different types?

+static unsigned int variable_changenum;
+  static unsigned long last_changenum = 0;


___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


features/output-sync always times out

2016-05-23 Thread Andreas Schwab
What does it mean that the features/output-sync test always times out?
Here is a typical output:

features/output-sync  
Test timed out after 30 seconds
Error running /home/abuild/rpmbuild/BUILD/make-4.2/tests/../make (expected 0; 
got 14): /home/abuild/rpmbuild/BUILD/make-4.2/tests/../make -f 
work/features/output-sync.mk.1 -j --output-sync=target

Caught signal 14!

Test timed out after 30 seconds
Error running /home/abuild/rpmbuild/BUILD/make-4.2/tests/../make (expected 0; 
got 14): /home/abuild/rpmbuild/BUILD/make-4.2/tests/../make -f 
work/features/output-sync.mk.1 -j --output-sync=target x=

Caught signal 14!
FAILED (13/15 passed)


+ cat tests/work/features/output-sync.diff.1
*** work/features/output-sync.base.1Mon May 23 10:04:59 2016
--- work/features/output-sync.log.1 Mon May 23 10:04:00 2016
***
*** 4,14 
  bar: start
  bar: end
  make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/make-4.2/tests/bar'
- make[1]: Entering directory '/home/abuild/rpmbuild/BUILD/make-4.2/tests/foo'
- foo: start
- foo: end
- make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/make-4.2/tests/foo'
- make[1]: Entering directory '/home/abuild/rpmbuild/BUILD/make-4.2/tests/bar'
- baz: start
- baz: end
- make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/make-4.2/tests/bar'
--- 4,6 
+ cat tests/work/features/output-sync.diff.2
*** work/features/output-sync.base.2Mon May 23 10:05:59 2016
--- work/features/output-sync.log.2 Mon May 23 10:05:00 2016
***
*** 2,8 
  sleep 1 ; /home/abuild/rpmbuild/BUILD/make-4.2/tests/../make -C bar
  bar: start
  bar: end
- foo: start
- foo: end
- baz: start
- baz: end
--- 2,4 



Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: INTERNAL: Exiting with 2 jobserver tokens available; should be 5!

2016-11-10 Thread Andreas Schwab
On Nov 09 2016, Jaak Ristioja <j...@ristioja.ee> wrote:

> Is this some known GNU Make bug on ARM?

Works fine here:

https://build.opensuse.org/project/show/openSUSE:Factory:ARM

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH 3/5] use jhash for STRING_N_HASH

2016-11-03 Thread Andreas Schwab
On Nov 02 2016, Paolo Bonzini <bonz...@gnu.org> wrote:

> +#define sum_get_unaligned_32(r, p)  \
> +  do {  \
> +unsigned int val;   \
> +memcpy(, (p), 4);   \
> +(r) += val; \
> +  } while(0);

That should use a fixed-size type.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: mention if a=b make = make a=b

2017-11-21 Thread Andreas Schwab
On Nov 21 2017, Edward Welbourne <edward.welbou...@qt.io> wrote:

> I can't remember what happens if you use += in the make-file: I'm fairly
> sure it extends whatever you had in the environment, but I can't
> remember whether it extends a value set on the command-line.

It doesn't.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: question about autotools within GNU make itself

2018-01-22 Thread Andreas Schwab
On Jan 16 2018, Paul Smith <psm...@gnu.org> wrote:

> The automake generated makefiles know how to rebuild Makefile.in,
> Makefile, configure, etc. based on the out-of-date-ness of the base
> files such as configure.ac and Makefile.am.  So if those files are
> updated, then the makefile will attempt to re-run those tools and
> regenerate their output.  This fails if you don't have them installed.

If you use AM_MAINTAINER_MODE then this rebuild will only happen when
configured with --enable-maintainer-mode.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: ENOEXEC from exec*() functions...?

2018-07-30 Thread Andreas Schwab
On Jul 30 2018, Paul Smith  wrote:

> Which doesn't sound like something that would be helped by re-running
> as a shell script.  Maybe this is a feature of GNU/Linux and other
> systems use ENOEXEC when there's no #! line?

http://pubs.opengroup.org/onlinepubs/9699919799/functions/execve.html

There are two distinct ways in which the contents of the process
image file may cause the execution to fail, distinguished by the
setting of errno to either [ENOEXEC] or [EINVAL] (see the ERRORS
section). In the cases where the other members of the exec family of
functions would fail and set errno to [ENOEXEC], the execlp() and
execvp() functions shall execute a command interpreter and the
environment of the executed command shall be as if the process
invoked the sh utility using execl() as follows:

execl(, arg0, file, arg1, ..., (char *)0);

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


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

2018-08-21 Thread Andreas Schwab
On Aug 21 2018, Mark Galeck  wrote:

> Then why does the error say "make: ***" ?

Because it's the messenger.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


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

2018-08-20 Thread Andreas Schwab
On Aug 17 2018, Mark Galeck  wrote:

> For this Makefile:
>
> ROOT := ${shell echo
> /home/mgaleck/ws/mgaleck_build/mgaleck_build_refactor2/target | sed s/t/t/}
> export LD_LIBRARY_PATH := ${ROOT}/usr/lib64:${LD_LIBRARY_PATH}
>
> foobar:
> touch $@
>
>
> and file foobar missing, then on some Linux distributions, I get this:
>
> $ make-4.2.1/make
> touch foobar
> make: *** [Makefile:5: foobar] Segmentation fault (core dumped)

Which means that the executed command has crashed, probably because of
some incompatible libraries in the LD_LIBRARY_PATH as set above.
Nothing to do with make.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #54816] $(wildcard ...) function does not report dangling symlinks

2018-10-10 Thread Andreas Schwab
Follow-up Comment #2, bug #54816 (project make):

See glibc bug 866  which
was only fixed recently.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [Newbie] Getting involved

2018-09-20 Thread Andreas Schwab
On Sep 19 2018,  wrote:

> Måns Ansgariusson writes:
>  > Hello!
>  >
>  > I have an idea of some features I'd like to see in make. I'm no expert at 
> all
>  > regarding make so I hope I don't reinvent the wheel or come with to stupid
>  > ideas.
>  > I'd be happy to implement it but I'm not sure if these are desirable
>  > features or where to start.
>  >
>  > Proposed features:
>  > 1. Saving build information
>
>  
>
>  Make is stateless by design.
>
>  It is possible to do what you want with Gnu Make, already, though.
>  See 'Rebuilding when CPPFLAGS changes' in "Gnu Make Unleashed".

See also how the Linux kernel makefiles do that.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [bug #54703] Incorrection expansion of := accumulator under $(eval …)

2018-09-26 Thread Andreas Schwab
On Sep 25 2018, "Paul D. Smith"  wrote:

> It's a shame that autoconf doesn't give an error when it can't find a macro
> but I guess it doesn't know the difference between a macro and some shell
> commands.

You can use m4_pattern_forbid to make that an error.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: GNU make 4.2.90 release candidate available

2019-08-27 Thread Andreas Schwab
On Aug 26 2019, Paul Smith  wrote:

> On Mon, 2019-08-26 at 10:26 -0700, David Boyce wrote:
>> Does this mean that the autotools config system will select
>> POSIX_SPAWN_USEVFORK? That's not a behavior of GNU make per se.
>
> Yes, autoconf will detect and use it.  I'm not sure I understand the
> comment.

I think that item should be moved to the developer news.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: GNU make 4.2.90 release candidate available

2019-08-28 Thread Andreas Schwab
On Aug 27 2019, Dennis Clarke  wrote:

> (1)  -std=9899:1999This is the same as c99 and it merely means that
> GCC *should* make every reasonable attempt to comply with the C99 code
> specification.

This also disables every extension over C, especially POSIX.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


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 removal of intermediate files was
> specified.

The testsuite obviously is depending on it.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: vpathplus test 2 patch

2019-09-11 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 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: Make error messages

2019-09-11 Thread Andreas Schwab
On Sep 10 2019, Paul Smith  wrote:

> That didn't work, however, because particularly in recursive make the
> makefile name is likely not qualified with a path, but the current
> working directory when the build is invoked is not the same as the one
> where make is invoked--thus "Makefile" is at best ambiguous.

But isn't that the same situation as with any other error message in a
recursive make, which Emacs already handles correctly (with the help of
make --print-directory)?

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH] Add the --nice argument to make

2019-09-17 Thread Andreas Schwab
On Sep 16 2019, Palmer Dabbelt  wrote:

> @@ -1483,6 +1494,15 @@ main (int argc, char **argv, char **envp)
>arg_job_slots = env_slots;
>}
>  
> +  /* Nice ourselves, if requested. */
> +  if (arg_nice)
> +{
> +#ifdef HAVE_UNISTD_H
> +  if (nice(0) == nice(arg_nice))

It is unspecified which operand is evaluated first.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #56875] subst failure for "$" character

2019-09-09 Thread Andreas Schwab
Follow-up Comment #1, bug #56875 (project make):

If you want to quote $ use $$. \$ only matches \$, nothing else.

CVS_BASE_TAG_NAME = $(filter-out ame: ame $$,$(subst -,.,$Name: v1-1-1beta-1
$))


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: patch locale settings

2019-09-16 Thread Andreas Schwab
On Sep 14 2019, Paul Smith  wrote:

> On Sat, 2019-09-14 at 16:19 -0400, Dmitry Goncharov wrote:
>> $ LC_MESSAGES=ru_RU ./run_make_tests -make_path ../l32/make
>
> I'm surprised that even works; on my system if I use a shorthand like
> "de_DE" instead of the full "de_DE.UTF-8", then it isn't recognized and
> I get the default.

ru_RU (or de_DE) is just another locale that you can install (in glibc,
it uses ISO-8859-5 as the codeset, or ISO-8859-1 for the de_DE locale).

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


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 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.
>> 
>> The testsuite obviously is depending on it.
>
> The test suite simply matches output strings, it's not very intelligent
> about stuff like that (unfortunately).
>
> 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 performance of the hash to make it consistent across endianness as
> well.

If the hash implementation is not defined, then the testsuite should
match any order, and not just based on endianess.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: How to disable Guile?

2019-07-22 Thread Andreas Schwab
On Jul 20 2019, Paul Smith  wrote:

> On Wed, 2019-07-17 at 20:55 -0400, Jeffrey Walton wrote:
>> checking whether closedir returns void... no
>> ./configure: line 9660: PKG_PROG_PKG_CONFIG: command not found
>> ./configure: line 9672: syntax error near unexpected token `GUILE,'
>> ./configure: line 9672: `   PKG_CHECK_MODULES(GUILE, guile-2.0,
>> have_guile=yes,'make: *** [config.status] Error 2
>
> The only way this error can happen as far as I can tell, is if your
> configure script was rebuilt (autoconf was re-run to recreate it) and
> you don't have pkg-config installed so those autoconf macros were not
> expanded.

Most likely that happend because of messed-up time stamps.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH] Port functions/shell to Solaris 10

2019-10-14 Thread Andreas Schwab
On Okt 11 2019, Paul Eggert  wrote:

> On 10/10/19 3:28 PM, Paul Smith wrote:
>> Perhaps Perl on Solaris does some magic
>> to convert this non-standard behavior into standard behavior.
>
> Yes, I think it's something along those lines. POSIX doesn't specify how
> signal numbers and exit statuses are shoehorned into the 'int' status
> updated by waitpid; apps are supposed to use WEXITSTATUS etc. to retrieve
> the info from that 'int'. I think that Perl tries to standardize this so
> that Perl apps just one way to shoehorn.

The format is documented in perlvar(1).

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #57781] make broken on MIPS big-endian if posix_spawn() is used

2020-02-10 Thread Andreas Schwab
Follow-up Comment #1, bug #57781 (project make):



___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




Re: [bug #57674] regression in make 4.3 with makefile from stdin

2020-04-01 Thread Andreas Schwab
On Mär 31 2020, Paul D. Smith wrote:

> In GNU make 4.3, for performance reasons we choose to use posix_spawn() if
> it's available on the system.  posix_spawn() doesn't do any path search, so we
> do it ourselves and we don't have this backup default PATH lookup that
> execvp() does.

There is also posix_spawnp.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: export vs $(origin )

2020-07-06 Thread Andreas Schwab
On Jul 03 2020, Paul Smith wrote:

> This would be backward-incompatible, and also it would add some
> complexity: we'd have to add a new state to variable storage to allow a
> variable to be known to make (to hold the flag that says it's
> exportable) but to actually not be considered defined (until/unless it
> was set), so it wouldn't be added to the child's environment.

Note that this is how export works in the shell.  `export FOO' only sets
the export attribute, but keeps the variable unset (and does not appear
in the environment of subsequent commands) if it doesn't have a value
yet.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



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

2021-06-21 Thread Andreas Schwab
On Jun 19 2021, Paul Smith wrote:

> But, as human programmers we can examine this code and understand that
> actually, it's never possible for p to point to the first character of
> the array: we know that eval_strings->idx is never 0, so we know that p
> will always be incremented past the beginning of the memory buffer:
>
>   p = value = alloca (len);
>   for (i = 0; i < eval_strings->idx; ++i)
> {
> ...
>   *(p++) = ' ';
> }
>   p[-1] = '\0';

The crux is of course to tell the compiler that eval_strings->idx is
always > 0, which is pretty hard for the compiler to deduce.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: [bug #60841] misleading statement in the manual

2021-06-28 Thread Andreas Schwab
On Jun 27 2021, Dmitry Goncharov wrote:

> The manual states in 6.10

Title: "Variables from the Environment".

> "When make runs a recipe, variables defined in the makefile are placed into
> the environment of each shell."

Please also read the rest of the paragraph.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



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

2021-12-06 Thread Andreas Schwab
On Nov 28 2021, Paul Smith wrote:

> The C standard defines the largest unsigned long long value
> as 18446744073709551615, the largest signed long long value
> as 9223372036854775807, and the smallest signed long long value as -
> 9223372036854775808.  So, the definition cannot be wrong in any
> standards-conforming implementation of C.

This is wrong.  These are *minimum* limits.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



[bug #62162] patsubst not working in prerequisites under .SECONDEXPANSION

2022-03-10 Thread Andreas Schwab
Follow-up Comment #1, bug #62162 (project make):

The replacement of % by the stem happens before the secondary expansion is
performed.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #64818] patsubst shorthand documentation bug?

2023-10-26 Thread Andreas Schwab
Follow-up Comment #2, bug #64818 (project make):

The difference is that pattern contains a % bug suffix does not.  This is
explained in #Substitution-Refs.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #64818] patsubst shorthand documentation bug?

2023-10-26 Thread Andreas Schwab
Follow-up Comment #4, bug #64818 (project make):

You are missing the %.

$(patsubst %World,Earth,$(STR))


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #63111] Regression. make runs out of file descriptors.

2022-09-27 Thread Andreas Schwab
Follow-up Comment #2, bug #63111 (project make):

Note that dtc has already fixed the problematic pattern rule (see commit
98a0700).


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[PATCH] [SV 63111] Clean up output sync before re-executing

2022-09-27 Thread Andreas Schwab
* src/main.c (main): Call osync_clear before re-executing
ourselves.
---
 src/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main.c b/src/main.c
index 3821089c..57aa1e8b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2727,6 +2727,8 @@ main (int argc, char **argv, char **envp)
   fflush (stdout);
   fflush (stderr);
 
+  osync_clear ();
+
   /* The exec'd "child" will be another make, of course.  */
   jobserver_pre_child(1);
 
-- 
2.37.3


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



[PATCH] [SV 63111] Set osync handle to noinherit

2022-09-27 Thread Andreas Schwab
* src/posixos.c (osync_setup, osync_parse_mutex): Set osync_handle
to noinherit.
---
 src/posixos.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/posixos.c b/src/posixos.c
index d587f9c8..4097ce15 100644
--- a/src/posixos.c
+++ b/src/posixos.c
@@ -628,7 +628,10 @@ osync_setup ()
 {
   osync_handle = get_tmpfd (_tmpfile);
   if (osync_handle >= 0)
-sync_parent = 1;
+{
+  fd_noinherit (osync_handle);
+  sync_parent = 1;
+}
 }
 
 char *
@@ -662,6 +665,8 @@ osync_parse_mutex (const char *mutex)
 OSS (fatal, NILF, _("cannot open output sync mutex %s: %s"),
  osync_tmpfile, strerror (errno));
 
+  fd_noinherit (osync_handle);
+
   return 1;
 }
 
-- 
2.37.3


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Make 4.3.90 breaks makefile of dtc

2022-09-22 Thread Andreas Schwab
-protector-strong -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type 
-flto=auto -g -pie  -MM -MG -MT "dtc-lexer.lex.o dtc-lexer.lex.d" 
dtc-lexer.lex.c > dtc-lexer.lex.d
cc -I libfdt -I . -DFDT_ASSUME_MASK=0 -DNO_VALGRIND -g -Os -fPIC -Werror -Wall 
-Wpointer-arith -Wcast-qual -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wredundant-decls -Wshadow -O2 -Wall -U_FORTIFY_SOURCE 
-D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type 
-flto=auto -g -pie  -MM -MG -MT "dtc-parser.tab.o dtc-parser.tab.d" 
dtc-parser.tab.c > dtc-parser.tab.d
Makefile:253: pipe: Too many open files
set -e; echo '  CHK version_gen.h'; mkdir -p ./;(echo "#define 
DTC_VERSION \"DTC 1.6.1\""; ) < Makefile > version_gen.h.tmp; if [ -r 
version_gen.h ] && cmp -s version_gen.h version_gen.h.tmp; then rm -f 
version_gen.h.tmp; else echo '   UPD version_gen.h'; mv -f 
version_gen.h.tmp version_gen.h; fi;
CHK version_gen.h
bison -b dtc-parser -d dtc-parser.y
bison: cannot create pipe: Too many open files
Makefile:350: pipe: Too many open files
cc -I libfdt -I . -DFDT_ASSUME_MASK=0 -DNO_VALGRIND -g -Os -fPIC -Werror -Wall 
-Wpointer-arith -Wcast-qual -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wredundant-decls -Wshadow -O2 -Wall -U_FORTIFY_SOURCE 
-D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type 
-flto=auto -g -pie  -o util.o -c util.c
Makefile:350: pipe: Too many open files
/var/tmp/rpm-tmp.buBDu0: line 33:  1095 Segmentation fault  /usr/bin/make 
-O -j4 V=1 VERBOSE=1 EXTRA_CFLAGS="-O2 -Wall -U_FORTIFY_SOURCE 
-D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type 
-flto=auto -g -pie" LDFLAGS="-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables 
-fstack-clash-protection -Werror=return-type -flto=auto -g"


There is some misbehaviour that creates an infinite loop trying to run
the bison rule.  Interestingly, this eventually runs out of file
descriptors, because, due to -O, make keeps opening new pipes for
synchronizing the output without closing any.  Without -O, this would
probably go on forever.

With make 4.3 this runs to completion without issues.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: Make 4.3.90 breaks makefile of dtc

2022-09-22 Thread Andreas Schwab
The issue is that the bison rule says it creates a %.output file, but
doesn't actually do that.

%.tab.c %.tab.h %.output: %.y
@$(VECHO) BISON $@
$(BISON) -b $(basename $(basename $@)) -d $<

Note that no target actually depends on any *.output file.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: Make 4.3.90 breaks makefile of dtc

2022-09-26 Thread Andreas Schwab
On Sep 22 2022, Paul Smith wrote:

> Just to be clear when you say "the issue is" do you mean, if you remove
> the unnecessary %.output pattern you don't see the error anymore?

Yes.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: Make 4.3.90 breaks makefile of dtc

2022-09-26 Thread Andreas Schwab
On Sep 23 2022, Dmitry Goncharov wrote:

> The latest make from master (same as 4.3.90) builds dtc-1.6.1

Try building it with make -O -j4 V=1, and watch /tmp filling with Gm*
files, and the make process growing its file table.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: Make 4.3.90 breaks makefile of dtc

2022-09-26 Thread Andreas Schwab
On Sep 22 2022, Dmitry Goncharov wrote:

> On Thu, Sep 22, 2022 at 4:39 AM Andreas Schwab  wrote:
> ...
>> Interestingly, this eventually runs out of file
>> descriptors, because, due to -O, make keeps opening new pipes for
>> synchronizing the output without closing any.  Without -O, this would
>> probably go on forever.
>
> Make used to synchronize output by locking stdout. There was a recent
> change. Make now uses a temp file to synchronize output.
> There was also a change in replacing a pipe with a named pipe for
> jobserver synchronization.
> Can you please tell us how to reproduce?

Just using make -O should trigger this.  The same problem also happens
for other packages:

https://build.opensuse.org/package/live_build_log/Base:System/coreutils/openSUSE_Tumbleweed/x86_64

FAIL: tests/misc/sort-merge-fdlimit
===

sort: open failed: in/1: Too many open files
sort: open failed: in/10: Too many open files
sort: open failed: in/10: Too many open files
FAIL tests/misc/sort-merge-fdlimit.sh (exit status: 1)

FAIL: tests/split/r-chunk
=

./tests/split/r-chunk.sh: pipe error: Too many open files
stat: cannot statx 'x*': No such file or directory
FAIL tests/split/r-chunk.sh (exit status: 1)

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: [bug #63248] Ignore sigpipe.

2022-11-02 Thread Andreas Schwab
On Nov 02 2022, Paul D. Smith wrote:

> Make should not pass the ignore to children; if it does that's a bug in make
> and should be reported.

I don't see anything that unignores SIGPIPE.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



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

2022-11-08 Thread Andreas Schwab
Follow-up Comment #14, bug #63307 (project make):

The SIGPIPE failure only happens when the process actually produces output to
the broken pipe.  But it is equally likely that a recipe doesn't actually
produce any output on stdout.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[PATCH] [SV 63307] Unignore SIGPIPE in spawned children

2022-11-02 Thread Andreas Schwab
* configure.ac: Check for posix_spawnattr_setsigdefault.
* src/job.c (child_execute_job): Set SIGPIPE to default in the
child process.
---
 configure.ac |  2 +-
 src/job.c| 18 ++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 9f688971..30eb2d55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,7 +134,7 @@ AC_CHECK_FUNCS([strtoll strdup strndup stpcpy memrchr 
mempcpy umask mkstemp \
 getgroups seteuid setegid setlinebuf setreuid setregid \
 mkfifo getrlimit setrlimit setvbuf pipe strerror strsignal \
 lstat readlink atexit isatty ttyname pselect posix_spawn \
-posix_spawnattr_setsigmask])
+posix_spawnattr_setsigmask posix_spawnattr_setsigdefault])
 
 # We need to check declarations, not just existence, because on Tru64 this
 # function is not declared without special flags, which themselves cause
diff --git a/src/job.c b/src/job.c
index b78f279c..621ff899 100644
--- a/src/job.c
+++ b/src/job.c
@@ -2305,6 +2305,11 @@ child_execute_job (struct childbase *child, int 
good_stdin, char **argv)
   /* We are the child.  */
   unblock_all_sigs ();
 
+  /* Unignore SIPIPE.  */
+#ifdef SIGPIPE
+  bsd_signal (SIGPIPE, SIG_DFL);
+#endif
+
 #ifdef SET_STACK_SIZE
   /* Reset limits, if necessary.  */
   if (stack_limit.rlim_cur)
@@ -2347,6 +2352,19 @@ child_execute_job (struct childbase *child, int 
good_stdin, char **argv)
   }
 #endif /* have posix_spawnattr_setsigmask() */
 
+  /* Unignore SIGPIPE.  */
+#ifdef HAVE_POSIX_SPAWNATTR_SETSIGDEFAULT
+  {
+sigset_t mask;
+sigemptyset ();
+sigaddset (, SIGPIPE);
+r = posix_spawnattr_setsigdefault (, );
+if (r != 0)
+  goto cleanup;
+flags |= POSIX_SPAWN_SETSIGDEF;
+  }
+#endif
+
   /* USEVFORK can give significant speedup on systems where it's available.  */
 #ifdef POSIX_SPAWN_USEVFORK
   flags |= POSIX_SPAWN_USEVFORK;
-- 
2.38.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



[PATCH] [SV 63307] Reset SIGPIPE in spawned children

2022-11-02 Thread Andreas Schwab
* configure.ac: Check for posix_spawnattr_setsigdefault.
* src/job.c (child_execute_job): Reset SIGPIPE in the child
process.
* src/job.h (sigpipe_ignored): Declare.
* src/main.c (main): Remember if SIGPIPE was inherited as ignored.
---
 configure.ac |  2 +-
 src/job.c| 24 
 src/job.h|  2 ++
 src/main.c   |  2 +-
 4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9f688971..30eb2d55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,7 +134,7 @@ AC_CHECK_FUNCS([strtoll strdup strndup stpcpy memrchr 
mempcpy umask mkstemp \
 getgroups seteuid setegid setlinebuf setreuid setregid \
 mkfifo getrlimit setrlimit setvbuf pipe strerror strsignal \
 lstat readlink atexit isatty ttyname pselect posix_spawn \
-posix_spawnattr_setsigmask])
+posix_spawnattr_setsigmask posix_spawnattr_setsigdefault])
 
 # We need to check declarations, not just existence, because on Tru64 this
 # function is not declared without special flags, which themselves cause
diff --git a/src/job.c b/src/job.c
index b78f279c..4f32f0f7 100644
--- a/src/job.c
+++ b/src/job.c
@@ -261,6 +261,10 @@ unsigned long job_counter = 0;
 /* Number of jobserver tokens this instance is currently using.  */
 
 unsigned int jobserver_tokens = 0;
+
+/* Whether SIGPIPE was ignored on entry.  */
+
+int sigpipe_ignored;
 
 
 #ifdef WINDOWS32
@@ -2305,6 +2309,12 @@ child_execute_job (struct childbase *child, int 
good_stdin, char **argv)
   /* We are the child.  */
   unblock_all_sigs ();
 
+  /* Unignore SIPIPE.  */
+#ifdef SIGPIPE
+  if (!sigpipe_ignored)
+bsd_signal (SIGPIPE, SIG_DFL);
+#endif
+
 #ifdef SET_STACK_SIZE
   /* Reset limits, if necessary.  */
   if (stack_limit.rlim_cur)
@@ -2347,6 +2357,20 @@ child_execute_job (struct childbase *child, int 
good_stdin, char **argv)
   }
 #endif /* have posix_spawnattr_setsigmask() */
 
+  /* Unignore SIGPIPE.  */
+#ifdef HAVE_POSIX_SPAWNATTR_SETSIGDEFAULT
+  if (!sigpipe_ignored)
+{
+  sigset_t mask;
+  sigemptyset ();
+  sigaddset (, SIGPIPE);
+  r = posix_spawnattr_setsigdefault (, );
+  if (r != 0)
+   goto cleanup;
+  flags |= POSIX_SPAWN_SETSIGDEF;
+}
+#endif
+
   /* USEVFORK can give significant speedup on systems where it's available.  */
 #ifdef POSIX_SPAWN_USEVFORK
   flags |= POSIX_SPAWN_USEVFORK;
diff --git a/src/job.h b/src/job.h
index 14a9984d..b0352bd7 100644
--- a/src/job.h
+++ b/src/job.h
@@ -88,5 +88,7 @@ pid_t exec_command (char **argv, char **envp);
 
 void unblock_all_sigs (void);
 
+extern int sigpipe_ignored;
+
 extern unsigned int job_slots_used;
 extern unsigned int jobserver_tokens;
diff --git a/src/main.c b/src/main.c
index eec93656..3b39e9fe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1184,7 +1184,7 @@ main (int argc, char **argv, char **envp)
 
   /* Don't die if our stdout sends us SIGPIPE.  */
 #ifdef SIGPIPE
-  bsd_signal (SIGPIPE, SIG_IGN);
+  sigpipe_ignored = bsd_signal (SIGPIPE, SIG_IGN) == SIG_IGN;
 #endif
 
 #ifdef HAVE_ATEXIT
-- 
2.38.1


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-01 Thread Andreas Schwab
On Feb 28 2023, Satish Balay via Bug reports and discussion for GNU  make wrote:

> On Tue, 28 Feb 2023, Dmitry Goncharov wrote:
>
>> On Tue, Feb 28, 2023 at 8:41 PM Satish Balay via Bug reports and
>> discussion for GNU make  wrote:
>> > $ cat makefile
>> > all:
>> > @MAKEFLAGS="-j1 ${MAKEFLAGS}" ${MAKE} -f makefile hello
>> > hello:
>> > @echo Hello
>> 
>> When you pass --print-directory MAKEFLAGS has the value "w".
>> When this makefile prepends -j1 the value of MAKEFLAGS becomes "-j1 w".
>> Among other changes short options are now in the first word on makeflags.
>> 
>> Well defined MAKEFLAGS has the following format
>> [shortoptions] [-option with arg]... [--long option]... [ -- cli definitions]
>> 
>> -j carries an argument and is supposed to follow short options.
>> 
>> If you change to
>> MAKEFLAGS="${MAKEFLAGS} -j1" $(MAKE) -f makefile hello
>> then it'll work.
>
> For one, the long option '--print-directory' is automatically converted to 
> this short notation - contributing to this issue.
>
> And the reason we use the order '-j8 ${MAKEFLAGS}' is so that we have the 
> following behavior':

You need to write it as MAKEFLAGS="-j1 -${MAKEFLAGS}", so that the short
options at the start of the old value of MAKEFLAGS become a proper
options string.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: wildcard and globstar

2023-07-17 Thread Andreas Schwab
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 := \
>   $(srcdir)/Makefile \
>   $(wildcard $(MAKEFILEDIR)/*.mk $(MAKEFILEDIR)/*/*.mk 
> $(MAKEFILEDIR)/*/*/*.mk)

$(wildcard $(addprefix $(MAKEFILEDIR)/, *.mk */*.mk */*/*.mk))

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: A question about hasing in idutils

2024-03-26 Thread Andreas Schwab
On Mär 25 2024, Dmitry Goncharov wrote:

> The hash table from id utils from imported to gnu make.
> This hash table hashes the same string to different brackets on little
> and big endian.
> Can you please shed some light why there needs to be this difference
> in hashing on little and big endian?

It should be easy to fix: swap the bytes in sum_get_unaligned_32.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."