help-make
[Top][All Lists]
Advanced

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

targets built to an "output" directory.


From: Ian Dunbar
Subject: targets built to an "output" directory.
Date: Thu, 16 Sep 2004 20:46:31 +0900

Hi all,

I have a problem with a makefile that puts it's targets to an output
directory ${OUTDIR}. Perhaps someone has seen it before or can shed some
light.

What it does is take a file "src/a.txt.conf.lang.arch" and one by one
processes the arch, lang, conf extensions, and eventually puts it to
location ${OUTDIR}/conf/lang/arch/a.txt. It works fine when I do this:
    make -rR "OUTDIR=."

But when I do this:
    make -rR

So that OUTDIR is the default "build", it gives me this message:
    *** No rule to make target `build/conf/lang/arch/a.txt', needed by
`default'.  Stop.

Any ideas why this happens and where I have gone wrong?

make -d has similar logs up to a point, but with "." it continues on to find
the correct pattern rule, but for "build" it it just stops.

Best regards,
Ian

PHONY: default
default:

OUTDIR ?= build
VPATH = src

PRECIOUS: %/.mkdir

${OUTDIR}/lang/%: %.lang ${OUTDIR}/lang/%/../.mkdir
    cp $< $@

${OUTDIR}/conf/%: %.conf ${OUTDIR}/conf/%/../.mkdir
    cp $< $@

${OUTDIR}/arch/%: %.arch ${OUTDIR}/arch/%/../.mkdir
    cp $< $@

# this just calls mkdir -p but with any ".." resolved first
# so that no unrequired directories are created
%/.mkdir:
    ../../../bin/automkdir.pl ${dir address@hidden

default: ${OUTDIR}/conf/lang/arch/a.txt



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.764 / Virus Database: 511 - Release Date: 2004/09/15

Attachment: Makefile
Description: Binary data


reply via email to

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