Re: ifeq and ifneq not working

2016-04-23 Thread Martin Dorey
TESTSRC depends on $@, an automatic variable set at the time of recipe 
execution.  ifneq by contrast runs earlier.  
https://www.gnu.org/software/make/manual/html_node/Conditionals.html#Conditionals
 explains "Conditionals control what make actually “sees” in the makefile, so 
they cannot be used to control recipes at the time of execution".

On Apr 23, 2016, at 09:12, Sedrubal 
> wrote:

Hi,

I'm not sure but I think I found a bug in ifeq and ifneq:

My project structure is like this:

$ tree
.
├── Makefile
├── subprojA
│   ├── src.cpp
│   ├── Makefile
│   └── test.cpp
└── subprojA
   ├── src.cpp
   ├── Makefile
   └── test.cpp

The upper Makefile should run `make test` for each sub project if "test.cpp" is
in this folder.

My Makefile is like this:

SUBDIRS:= $(wildcard */)
TESTDIRS:= $(SUBDIRS:%=test-%)

.PHONY: test $(SUBDIRS) $(TESTDIRS)

all: $(SUBDIRS)

test: $(TESTDIRS)

$(SUBDIRS):
   CC=$(CC) CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) all -C $@

$(TESTDIRS):
   $(eval TARGETDIR := $(@:test-%=%))
   $(eval TESTSRC := $(TARGETDIR)test.cpp)
   @echo "$(wildcard $(TESTSRC))" # <-- prints subproj{A,B}/test.cpp if it
exists -> this is working
ifneq ("$(wildcard $(TESTSRC))","")
   @#file exists --> but even if the test src exists, this will never be
reached
   CC=$(CC) CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) test -C
$(TARGETDIR)
else
   @echo "[i] $(TARGETDIR) has no tests..."
endif

Can you explain, why this shouldn't work? Is this a bug or only a fail in
Makefile logic?

Best regards and grml,

Sedrubal
___
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


Re: Test harness on VMS working, 58 tests currently failing.

2014-03-02 Thread h.becker
On 03/01/2014 09:50 PM, John E. Malmberg wrote:
 On 2/28/2014 8:07 PM, John E. Malmberg wrote:
 I have the test harness apparently working on VMS.  I need to fix up the
 DCL command procedure that is needed set up a number of foreign
 commands needed by it before submitting a patch.

For which version? I assume for the current development stream from the
git repository, correct?

 If no one else is interested in immediately running the test harness on
 VMS, I can wait on submitting a patch until I determine what is causing
 all the test failures.

 So far running the test harness on VMS will require:
 Perl 5.18.1 or later.
 GNV 2.1.3 or later.
 Bash 4.2.45 or later.
 Coreutils 8.21 or later.

From what I see, the tests are coded in perl. Can you give a short
description for what the other stuff is needed?

 Investigation showed two additional VMS specific issues in the test
 harness that were affecting the test run.  After fixing those issues:
 
 69 Tests in 90 Categories Failed (See .diff* files in work dir for
 details) :-(
 
 As there were 126 log files created, this indicates that more tests were
 being run.  I do not know why the category count changed.  Still more
 than 1/2 the tests are failing.
 
 If I determine that a test failure is an actual bug in the VMS port
 instead of a feature of the implementation do you want tickets filed to
 track the issue, or just the the patch to fix it if it is possible to fix?

If you have a patch, then I don't think a ticket is necessary. Otherwise
a ticket is right thing to track the bug.


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


Re: Test harness on VMS working, 58 tests currently failing.

2014-03-02 Thread John E. Malmberg

On 3/2/2014 6:11 AM, h.becker wrote:

On 03/01/2014 09:50 PM, John E. Malmberg wrote:

On 2/28/2014 8:07 PM, John E. Malmberg wrote:

I have the test harness apparently working on VMS.  I need to fix up the
DCL command procedure that is needed set up a number of foreign
commands needed by it before submitting a patch.


For which version? I assume for the current development stream from the
git repository, correct?


This is for master of course.


If no one else is interested in immediately running the test harness on
VMS, I can wait on submitting a patch until I determine what is causing
all the test failures.

So far running the test harness on VMS will require:
 Perl 5.18.1 or later.
 GNV 2.1.3 or later.
 Bash 4.2.45 or later.
 Coreutils 8.21 or later.


 From what I see, the tests are coded in perl. Can you give a short
description for what the other stuff is needed?


The make scripts expect a number of GNU utilities to be present and for 
Perl to use UNIX filename syntax.


The following commands are used by makefiles in the tests.

ar, cat, cc, cp, diff, echo, false, mkdir, rm, sleep, sh, and touch.

GNV provides the ar, and cc commands.  I have not updated them yet.

The bash in GNV is ancient and buggy.  The Bash 4.2.45 is much more 
reliable.


Coreutils supplies the rest of the utilities.  While they are also 
supplied by GNV, the Coreutils kit is more up to date with significant 
bug fixes.  Example: rm -rf actually works.


It appears that GNU make on VMS is attempting to emulate touch.  This is 
showing up in several test failures where the touch command is used in 
the makefile.  So it looks like that emulation needs to be improved.


So I will need to have a DCL procedure set these up as foreign commands 
temporarily before running the run_make_tests.pl.  I have not yet 
finished that script.


My plan get the tests that can be run to pass before merging in the GNV 
fork which runs the Bash shell from GNU Make.


Regards,
-John


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


Re: Test harness on VMS working, 58 tests currently failing.

2014-03-01 Thread John E. Malmberg

On 2/28/2014 8:07 PM, John E. Malmberg wrote:

I have the test harness apparently working on VMS.  I need to fix up the
DCL command procedure that is needed set up a number of foreign
commands needed by it before submitting a patch.

If no one else is interested in immediately running the test harness on
VMS, I can wait on submitting a patch until I determine what is causing
all the test failures.

So far running the test harness on VMS will require:
Perl 5.18.1 or later.
GNV 2.1.3 or later.
Bash 4.2.45 or later.
Coreutils 8.21 or later.

This limits running the test harness on Alpha/VMS 8.3 and 8.4 and IA64
VMS 8.4.

58 Tests in 103 Categories Failed (See .diff* files in work dir for
details) :-(

As there appears to be 111 log files, this is just less than half the
tests passing.


Investigation showed two additional VMS specific issues in the test 
harness that were affecting the test run.  After fixing those issues:


69 Tests in 90 Categories Failed (See .diff* files in work dir for 
details) :-(


As there were 126 log files created, this indicates that more tests were 
being run.  I do not know why the category count changed.  Still more 
than 1/2 the tests are failing.


If I determine that a test failure is an actual bug in the VMS port 
instead of a feature of the implementation do you want tickets filed to 
track the issue, or just the the patch to fix it if it is possible to fix?


Regards,
-John


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


RE: $(and) and $(or) not working

2007-05-16 Thread Dave Korn
On 16 May 2007 16:22, Noel Yap wrote:

 I'm using the following:
 
 yapn:[EMAIL PROTECTED]:~/proj/aoeu make --version
 GNU Make 3.81beta4

  Note the beta tag.

 And the $(and) and $(or) functions always return empty.  Has anyone
 else experienced this?

  Probably means they weren't yet implemented at the time the beta was
released.  To find out for sure, try using the --warn-undefined-variables
option; if the built-ins aren't implemented, those will just look like
variable references to empty vars.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today



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


Re: $(and) and $(or) not working

2007-05-16 Thread Paul Smith
On Wed, 2007-05-16 at 11:21 -0400, Noel Yap wrote:
 I'm using the following:
 
 yapn:[EMAIL PROTECTED]:~/proj/aoeu make --version
 GNU Make 3.81beta4

I've seen a number of messages stating that people are using 3.81beta4;
why are people still using a beta version over a year after the final
version was released (3.81 was released on 01 Apr 2006)?  Did it get
shipped with some distribution or software package?  If so you should
file a bug and request an update to the released version.

Anyway, as others have pointed out, the and and or functions weren't
implemented in beta4.


PS. Please choose one of bug-make or help-make, but not both.  Cheers!

-- 
---
 Paul D. Smith [EMAIL PROTECTED]  Find some GNU make tips at:
 http://www.gnu.org  http://make.paulandlesley.org
 Please remain calm...I may be mad, but I am a professional. --Mad Scientist


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