Reason for "no rule to make target" with make?
Not a Makefile syntax
target: require_files
cmd...
Why am I having this problem?
Makefile
MXMLC = /opt/flex/bin/mxmlc
MXMLC_RELEASE = $(MXMLC) -debug=false -compiler.optimize=true
release: bin-release/Wrapper.swf, bin-release/Application.swf
bin-release/Application.swf: src/**/*.as, lib/*.swc
$(MXMLC_RELEASE) -output bin-release/Application.swf src/Application.as
@@-rm ../server/public/game/Application.swf
$(CP) bin-release/Application.swf ../server/public/game/Application.swf
bin-release/Wrapper.swf: src/*.as, src/engine/**/*.as, lib/*.swc
$(MXMLC_RELEASE) -output bin-release/Wrapper.swf src/Wrapper.as
@@-rm ../server/public/game/Wrapper.swf
$(CP) bin-release/Wrapper.swf ../server/public/game/Wrapper.swf
$: make bin-release / Application.swf
~ / workspace / project / src / flash [2] 19:20 make: * There is no rule to make target
src/constant/*.as,', needed by
bin-release / Application.swf '. Stop.
+3
source to share
2 answers
Drop the commas
MXMLC = /opt/flex/bin/mxmlc
MXMLC_RELEASE = $(MXMLC) -debug=false -compiler.optimize=true
release: bin-release/Wrapper.swf bin-release/Application.swf
bin-release/Application.swf: src/**/*.as lib/*.swc
$(MXMLC_RELEASE) -output bin-release/Application.swf src/Application.as
@@-rm ../server/public/game/Application.swf
$(CP) bin-release/Application.swf ../server/public/game/Application.swf
bin-release/Wrapper.swf: src/*.as src/engine/**/*.as lib/*.swc
$(MXMLC_RELEASE) -output bin-release/Wrapper.swf src/Wrapper.as
@@-rm ../server/public/game/Wrapper.swf
$(CP) bin-release/Wrapper.swf ../server/public/game/Wrapper.swf
+6
source to share
You can find files using find
for example:
ASFILES = $(shell find src -name "*.as")
SWCFILES = $(shell find lib -name "*.swc")
And then use the list in your rules:
bin-release/Application.swf: $(ASFILES) $(SWCFILES)
$(MXMLC_RELEASE) etc
I assume that you would use the files .as
and .swc
in the recipe (ie, bits $(MXMLC_RELEASE)
), although now you do not.
+2
source to share