Re: makeerror-4.4-x86_64-pc-linux-gnu-xc2u.tar.gz

2024-09-02 Thread Paul Smith
On Tue, 2024-05-14 at 06:33 +, linha...@163.com wrote:
> os: wsl centos7
> 
> make step:
> 
> wget https://ftp.gnu.org/pub/gnu/make/make-4.4.1.tar.gz
> tar zxf make-4.4.1.tar.gz
> cd make-4.4.1
> ./configure --prefix=/usr
> type make
> make check

The failure is that instead of proceeding normally, make gives this
error in one of the tests:

   make: *** gta: Is a directory.  Stop.

This means that somehow "gta" is being considered a directory by the
operating system instead of a file.  This can't be a bug in the test
suite, else everyone would see it (and when I check the test it does
indeed create a file not a directory).

I can only assume it's a bug in the version of WSL you're using.  Are
you using WSL1 or WSL2?

-- 
Paul D. Smith Find some GNU Make tips at:
https://www.gnu.org   http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist






[bug #65908] Make fails with 'Makefile:3857: *** missing 'endif'. Stop.

2024-09-02 Thread Paul D. Smith
Update of bug #65908 (group make):

  Item Group: Bug => Enhancement

___

Follow-up Comment #4:


> it would be better that make provides the infos about that line not
mis-matched `endif'.

Sorry but I don't understand what you mean by "that line".  Which line is it
that make should provide info about?


___

Reply to this item at:

  

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


signature.asc
Description: PGP signature


Re: The man and Info pages say different things about make -p

2024-09-02 Thread Paul Smith
On Tue, 2024-06-25 at 05:49 +0800, Dan Jacobson wrote:
> The man and Info pages say different things:

> To print the data base without trying to remake any files, use 'make
> -qp'.
> 
> To print the data base without trying to remake any files, use make -
> p -f/dev/null.

This was already fixed as part of SV 64571.

make.1 says:

   To print the built-in data base only, use "make -p -f/dev/null".

make Info says:

   To print the data base without trying to remake any files, use 'make
   -qp'.  To print the data base of predefined rules and variables, use
   'make -p -f/dev/null'.

> Also they should mention how to print the database in non-jumbled
> order.

There is no way to print the database in a "non-jumbled" order; make's
internal database is stored in a hash table and so all ordering that
existed in the makefiles is lost when the makefiles are parsed.  The
output from --print-directory generates its content in hash table
order.

-- 
Paul D. Smith Find some GNU Make tips at:
https://www.gnu.org   http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist






Re: set $*, $@ upon reaching the colon

2024-09-02 Thread Paul Smith
On Thu, 2024-06-13 at 07:55 +0800, Dan Jacobson wrote:
> %.all.kmz: $(addsuffix .kml, $(addsuffix .$*.lines,0 1) $(addsuffix 
> .$*.labels,0 1))
>   ls $*
> $ make nnn.all.kmz
> 
> Here, upon reaching the colon, the make program already has all the
> information it needs to set $* to "nnn".

That is not true.

In fact, make has NO IDEA what $@ or any other automatic variable will
be _when it is parsing the makefile and expanding the prerequisites_.

A pattern rule is a template that is applied not when the makefile is
being parsed, but rather when make is walking the dependency graph
trying to figure out which targets to build and how to build them.  At
the time make is parsing this rule it has no idea what target will
match it, so it certainly cannot know that $@ will be nnn.all.kmz (for
example).

If you examine the content here:
https://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html
you will see in what order expansion happens.

If you want to defer expansion until later, you can use:
https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html

-- 
Paul D. Smith Find some GNU Make tips at:
https://www.gnu.org   http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist