delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/13/23:23:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <41E7491F.1020800@byu.net>
Date: Thu, 13 Jan 2005 21:22:55 -0700
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: Jim Meyering <jim AT meyering DOT net>
CC: bug-coreutils AT gnu DOT org, cygwin AT cygwin DOT com, automake AT gnu DOT org
Subject: make -k fails on cygwin [Was: Test failures in coreutils-5.3.0 on cygwin]
References: <41E3DE88 DOT 300 AT byu DOT net> <851xcruc38 DOT fsf AT pi DOT meyering DOT net> <41E530DD DOT 4000900 AT byu DOT net> <853bx6siik DOT fsf AT pi DOT meyering DOT net>
In-Reply-To: <853bx6siik.fsf@pi.meyering.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[cross-posted to cygwin and automake lists]
I'm not sure if the bug below is with cygwin's mods to make, in automake
for using non-portable Makefile constructs, or in both.

According to Jim Meyering on 1/12/2005 9:45 AM:
>>>If you run `make -k check', it will keep going in spite of failures.
> 
>> Nope, even with `make -k check', my run ends in:
>> ======================================
>> 1 of 5 tests failed
>> Please report to bug-coreutils AT gnu DOT org
>> ======================================
>> make[3]: *** [check-TESTS] Error 1
>> make[3]: Leaving directory `/home/eblake/coreutils-5.3.0/tests/chgrp'
>> make[2]: *** [check-am] Error 2
>> make[2]: Target `check' not remade because of errors.
>> make[2]: Leaving directory `/home/eblake/coreutils-5.3.0/tests/chgrp'
>> make[1]: *** [check-recursive] Error 1
>> make[1]: Target `check' not remade because of errors.
>> make[1]: Leaving directory `/home/eblake/coreutils-5.3.0/tests'
>> make: *** [check-recursive] Error 1
>> make: Target `check' not remade because of errors.
> 
> Then you should use a make program that honors the -k option.
> There must be a GNU make port to cygwin.

It _is_ GNU make, but with cygwin modifications to accept --unix or
- --win32 to determine whether to use /bin/sh or the native DOS shell:
$ make --version
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
$ cat Makefile
all:
	@echo ${MAKEFLAGS}
$ make
- --unix
$ make -k
- --unix -k

Now look at what automake 1.9 sticks in to the Makefiles for recursive
traversal:
$(RECURSIVE_TARGETS):
        @set fnord $$MAKEFLAGS; amf=$$2; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
            local_target="$$target-am"; \
          else \
            local_target="$$target"; \
          fi; \
          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
           || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;;
esac; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"

Whoops - $amf is set to --unix, rather than the desired '' or -k.  The
case statement fails, and the recursive traversal of subdirs halts in
spite of my request to keep going.  As pointed out last month on the
libtool lists,
http://lists.gnu.org/archive/html/libtool-patches/2004-12/msg00091.html,
parsing $MAKEFLAGS is inherently non-portable.  `info make' also has a
page dedicated to "Phony Targets" that discusses the more portable way to
have a recursive target, although I don't know how well it scales to the
more than 15 recursive targets that automake creates.

     SUBDIRS = foo bar baz

     .PHONY: subdirs $(SUBDIRS)

     subdirs: $(SUBDIRS)

     $(SUBDIRS):
             $(MAKE) -C $@

     foo: baz


- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB50kf84KuGfSFAYARAmEdAKCTjFJlAWmPR9lDboMyGi8r2hiQNwCfaeQg
D/EyY+pF1kLs8c2LfOqD5O8=
=Elu+
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019