Hello ALUGers,
I'm embarrsed to admit that I'm just trying to use make for the first time!
I'm trying to get it to automate some XSLT transformations for me and I've got this so far:
======================================== SAXON=saxon8 FOP=fop
BUILD_DIR=www TEXT_ONLY_BUILD_DIR=www/text
$(BUILD_DIR)/index.html: index.xml meta-data.xml $(SAXON) -o $(BUILD_DIR)/index.html index.xml\ static-site/jounral-front-page2default.xsl ========================================
but it keeps telling me that there's "No rule to make target 'index.xml'". I thought that it was supposed to go like this:
target: source command
and that, in this case, 'source' would be 'index.xml meta-data.xml' and it would make the target if the source files had changed.
Can someone put me right?
Cheers, Richard
On Tue, 2005-01-11 at 17:19 +0000, Richard Lewis wrote:
$(BUILD_DIR)/index.html: index.xml meta-data.xml $(SAXON) -o $(BUILD_DIR)/index.html index.xml\ static-site/jounral-front-page2default.xsl ========================================
but it keeps telling me that there's "No rule to make target 'index.xml'". I thought that it was supposed to go like this:
target: source command
and that, in this case, 'source' would be 'index.xml meta-data.xml' and it would make the target if the source files had changed.
That's mostly right. Strictly it is:
target: dependencies command to build target, usually from the dependency
and yes, if a dependency is a file that exists, and is newer than the target, make rebuilds the target.
But if the dependency doesn't exist (or depends on other things that have been modified), make tries to build it.
That's what happens in this case, so apparently index.xml doesn't exist. Is it hiding in a different directory, or do you have a typo in the name?
-- Martijn
On Tue, 11 Jan 2005 17:34:51 +0000, "Martijn Koster" mak-alug@greenhills.co.uk said:
On Tue, 2005-01-11 at 17:19 +0000, Richard Lewis wrote:
$(BUILD_DIR)/index.html: index.xml meta-data.xml $(SAXON) -o $(BUILD_DIR)/index.html index.xml\ static-site/jounral-front-page2default.xsl ========================================
but it keeps telling me that there's "No rule to make target 'index.xml'". I thought that it was supposed to go like this:
target: source command
and that, in this case, 'source' would be 'index.xml meta-data.xml' and it would make the target if the source files had changed.
That's mostly right. Strictly it is:
target: dependencies command to build target, usually from the dependency
and yes, if a dependency is a file that exists, and is newer than the target, make rebuilds the target.
But if the dependency doesn't exist (or depends on other things that have been modified), make tries to build it.
That's what happens in this case, so apparently index.xml doesn't exist. Is it hiding in a different directory, or do you have a typo in the name?
Woops! Yes, it was a typo in the dependency name!
Thanks for your help, Richard
Hi Richard
Add the target:
index.html: $BUILD_DIR)/index.html
That should fix it..
Regards, Paul.
On Tuesday 11 January 2005 17:19, Richard Lewis wrote:
======================================== SAXON=saxon8 FOP=fop
BUILD_DIR=www TEXT_ONLY_BUILD_DIR=www/text
$(BUILD_DIR)/index.html: index.xml meta-data.xml $(SAXON) -o $(BUILD_DIR)/index.html index.xml\ static-site/jounral-front-page2default.xsl ========================================
but it keeps telling me that there's "No rule to make target 'index.xml'". I thought that it was supposed to go like this: