[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
two ways of building a target, depending on different prerequisites
From: |
José Romildo Malaquias |
Subject: |
two ways of building a target, depending on different prerequisites |
Date: |
Thu, 27 Oct 2011 08:59:48 -0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hello.
How can I write a make rule to build a target that can be built in two
different ways, depending on which pre-requisite files are available?
For instance, suppose that the target file test.txt can be built in two
different ways, according to the following two rules:
test.txt: file1.txt
command1 $< $@
test.txt: file2.txt
command2 $< $@
If file1.txt exists (or can be built), then the first rule is
used. Otherwise the second rule is used.
Romildo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- two ways of building a target, depending on different prerequisites,
José Romildo Malaquias <=