delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/23/18:47:51

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <2C08D4EECBDED41184BB00D0B747334202FB430E@exchanger.cacheflow.com>
From: "Karr, David" <david DOT karr AT cacheflow DOT com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Make: double-colon rules; additive "clean" targets; MAKECMDGOALS
Date: Mon, 23 Apr 2001 15:49:08 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

This probably isn't the right place to ask this, but I'm not aware of a
mailing list where I can ask detailed questions about GNU Make.  I might use
the "gnu.misc.discuss" newsgroup, but I don't have access to news here.

I'm trying to work with a complex Makefile system (on Cygwin).  Each
directory is structured similarly, where there is a Makefile, but underneath
that directory is a set of "target" directories.  Each time a "make" is done
in the directory, it actually figures out the correct "target" subdirectory,
then does something like the following:

	${MAKE} -C <targetdir> -f ../Makefile MAKEFLAGS=${MAKEFLAGS}
${MAKECMDGOALS}

The Makefile has several levels of included ".mk" files which implement this
functionality.

One of the things defined in one of the included "mk" files is a generic
"clean" target.  Since all of the applications are structured similarly,
this normally does everything that's necessary.  However, in a couple of
cases, I need to do a "clean" task specific to the application, in addition
to the generic rule.

From past experience, I thought this was easy.  If I just make the generic
clean rule a "double-colon" rule, and then I create my application-specific
"clean" rule using a double colon, then it should execute both rules.
Unfortunately, it does not.  When I add my specific "clean" rule, that's all
that gets executed.  No errors, it just executes the specific one and
ignores the generic one.  If I comment out the specific one, it executes the
generic one.

I've browsed through the GNU make manual, but I didn't see anything obvious
that would address this.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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