开发者

why does my make process show different behavior when a rule is included versus manually inlined

I have a Makefile which includes these two lines:

yank:
    mkdi开发者_高级运维r yank

and when they are in the Makefile, the entire make process runs. But when I move them to a file included by this Makefile, then only the target 'yank' is made instead of the final target.

Entire makefile follows

include ../../Makefile.include


#VER  :=
AUTHOR := metaperl
PKG  := shell-current-directory
REPO := $(PKG)
GEST := $(PKG).elc
URL  := https://github.com/$(AUTHOR)/$(PKG).git

$(EDAN_EL) : $(WARES)/$(GEST)
    $(APPEND_EDAN) $(PKG) $(EDAN_EL) "`$(FILLIN) init.el --load_path $(WARES) --pkg $(PKG)`"

$(WARES)/$(GEST): yank/$(REPO)/$(PKG).elc
    cp $< $@


yank/$(REPO)/$(PKG).elc: yank/$(REPO)/$(PKG).el

yank/$(REPO)/$(PKG).el: yank/$(REPO)

yank/$(REPO) : yank
    cd yank && git clone $(URL)

yank:
    mkdir yank


$(phony clean):
    $(RM) -rf $(WARES)/gist.el


The target that is run when you simply type

make

is the first target found in the makefile. So if you have a target in your include file, that's going to be selected as the "default" target.

Just add a "dummy"

all: your_default_target_here

at the beginning of your file before the include or something to that effect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜