2012-04-05 24 views
3

はないMakefileの構文が、私はこの問題を得たのはなぜmakeで "ターゲットを作るルールがありません"の原因?

target: require_files 
    cmd... 

ありますか?

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 
:ビン・リリースを作る/ Application.swf

〜/ワークスペース/プロジェクト/ SRC /フラッシュ[2] 19時20分メイク:*ませルール ターゲットsrc/constant/*.as,', needed by bin-release/Application.swf 'を作成します。 停止します。

答えて

6

ドロップカンマが

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 
+0

I見つかった別の質問、SRC/**/*。一致していないだろうとのsrc/A/B/Cだけ一致させることができます/ d.as、SRC/A /全ての.asファイルを一致させるどのような方法をb.as 'find' –

+0

使用' $(シェル...) 'の下に.... – sehe

2

あなたは、たとえば、findを使用してファイル検索できます。

ASFILES = $(shell find src -name "*.as") 
SWCFILES = $(shell find lib -name "*.swc") 

をそしてあなたのルールでリストを使用します。

bin-release/Application.swf: $(ASFILES) $(SWCFILES) 
     $(MXMLC_RELEASE) etc 

私はあなたが.asおよび.swcのレシピ(すなわち、 $(MXMLC_RELEASE)ビット)。現在はありません。

+0

おかげでたくさんのようなものでSRC –

関連する問題