Re: [bug #52209] Support for ifeq function

2017-10-13 Thread Tim Murphy
Sorry for "plugging" my work but you can use loadable modules to implement
any function you like and I have done "ifeq" some time ago here:

https://bitbucket.org/tnmurphy/extramake

... except my version is $(equals...)

This is a good way to experiment with what you want from the function
before asking it to be added and of course you can provide a patch.

Regards,

Tim

On 12 October 2017 at 07:26, anonymous  wrote:

> Follow-up Comment #3, bug #52209 (project make):
>
> Thanks Paul for dealing with this so quickly.
>
> For the benefit of clarity (and the poster of comment #1), the parallel
> between what I propose and the existing preprocessor version is deliberate
> as
> I value consistency in design.
>
> There has been an eq function in the source code for a long time, but it is
> disabled behind an experimental flag. I think the problem is that eq
> introduces a fixed idea of a true result as it always returns 1 for true.
> Introducing eq would effectively change the representation of true from
> non-empty to 1 on a conceptual level - and conceptual changes are always
> risky.
>
> The ifeq function proposal is an attempt to allow support for testing
> equality
> without needing to change the concept of true. It also allows the same
> flexibility of the existing $(if..) function where an action could be
> taken on
> the result, for example to generate an error if strings don't match:
>
> $(ifeq $(first),$(second),,$(error something broke))
>
> I will try and contribute a patch, but I don't know when I'll have time
> and I
> wanted to make an enhancement request in the meantime.
>
> To the poster of comment #1. Yes, I posted anonymously for reasons I don't
> need to explain here. It's unfortunate you think that makes me an idiot
> and my
> contribution only worth mocking and I'm very glad that Paul never thinks
> that
> way. I'm not keen on sharing my email address with the world, and your
> response makes me want to do that even less. This is not a point-scoring
> teenage forum and I'm only interested in talking technical, but after
> taking
> your own advice, if you still feel the need to insult me personally my
> name is
> below.
>
> regards,
> Rob.
>
>
> ___
>
> Reply to this item at:
>
>   
>
> ___
>   Message sent via/by Savannah
>   http://savannah.gnu.org/
>
>
> ___
> Bug-make mailing list
> Bug-make@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-make
>
___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


GNU Make 4.1 - NOT Using Recipe

2017-10-13 Thread Elizabeth Thompson
make
NOT using recipe

I have read & read GNU Make and have no answers.

I modified the example on pg 24 of GNU Make
foo : $(objects)
    cc -o foo $(CFLAGS) $(objects)
The example does not even work, the recipe is ignored.
Nothing after is recognized. eg @echo whatever...

I did find a workaround. Which now works but still NO recipe is recognized.
CFLAGS = -fPIC -g -c -o are still automatically added to the implicit recipe
fubar : $(obj_c)

I am trying to make compiling library OBJECTS an automatic process.
The default recipe is fine for other projects but NOT libraries.

additional information:GNU Make 4.1
bug-make@gnu.org
http://savannah.gnu.org/projects/make/
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

 CPU: AMD Athlon(tm) II P360 Dual-Core x 2
 MEM: 3783MB (1009MB used)
SCSI: ATA WDC WD3200BEVT-7 320 GB
  TSSTcorp DVD+-RW TS-L633C
DISP: Resolution 1366x768 pixels
  OpenGL Renderer Gallium 0.4
  AMD RS880 (DRM 2.49.0 / 4.10.0-32-generic,LLVM 4.0.0)
 USR: XXX (X )
Linux Mint 18.2 Sonya
Kernal Linux 4.10.0-33-generic x86_64
MATE 1.18.0

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


Re: GNU Make 4.1 - NOT Using Recipe

2017-10-13 Thread Paul Smith
On Fri, 2017-10-13 at 14:34 +, Elizabeth Thompson wrote:
> make
> NOT using recipe
> 
> I have read & read GNU Make and have no answers.
> 
> I modified the example on pg 24 of GNU Make
> foo : $(objects)
>     cc -o foo $(CFLAGS) $(objects)
> The example does not even work, the recipe is ignored.
> Nothing after is recognized. eg @echo whatever...

Unfortunately there's simply not enough information here for us to help
you.  I assume by "pg 24 of GNU make" you mean page 24 of the GNU make
manual, but most of us don't have a hardcopy of the manual.

The example you're probably talking about is here:
https://www.gnu.org/software/make/manual/make.html#Combine-By-Prerequisite

but perhaps one of the others in that chapter.

In any event, those examples all definitely DO work.  That means that
something about the changes you made caused them to not work, or work
in a way that you didn't expect.

However, you didn't show the full extent of the changes you made, you
didn't show the make command line you invoked, you didn't show the
output make gave to that command (cut and paste please, not
paraphrased), and you didn't explain exactly how that output differed
from what you expected.

Without that information, we can't help.

> additional information:
> GNU Make 4.1
> Linux Mint 18.2 Sonya

Thanks, those are very useful details.

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