bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wish: multiple target patterns in a static pattern rule


From: Britton Kerin
Subject: wish: multiple target patterns in a static pattern rule
Date: Tue, 13 Apr 2004 09:27:52 -0800 (AKDT)

I have a program gob2 which does this:

     some_file.gob -> {some_file.c some_file.h some_file-private.h}

So I would like to be able to write this static pattern rule:

     # This rule says how to generate C files from GOB files.
     $($(MN)_GOB_GENERATED_FILES): %.c %.h %-private.h: %.gob
             $($(MN)_GOB2) $<

Implicit rules can handle multiple target patterns, is there any reason
static pattern rules couldn't also?  There could be a simple requirement
that each element of the TARGETS match exactly one of the target patterns.
The workaroud requires me to split up the GOB_GENERATED_FILES variable
into three and write three static pattern rules to get the effect I want,
which is a bit clunky, especially since (with automatic dependency
tracking) I don't have to care about header files much, and don't have any
reason to put them in seperate variables.

Britton Kerin









reply via email to

[Prev in Thread] Current Thread [Next in Thread]