相关疑难解决方法(0)

如何强制makefile重建目标

我有一个生成的makefile,然后调用另一个makefile.由于这个makefile调用更多makefile来完成工作,因此它并没有真正改变.因此,它一直认为项目是建立和最新的.

dnetdev11 ~ # make
make: `release' is up to date.
Run Code Online (Sandbox Code Playgroud)

如何强制makefile重建目标?

clean = $(MAKE) -f ~/xxx/xxx_compile.workspace.mak clean


build = svn up ~/xxx                                                       \
        $(clean)                                                                \
        ~/cbp2mak/cbp2mak -C ~/xxx ~/xxx/xxx_compile.workspace        \
        $(MAKE) -f ~/xxx/xxx_compile.workspace.mak $(1)                    \


release:
        $(build )

debug:
        $(build DEBUG=1)

clean:
        $(clean)

install:
        cp ~/xxx/source/xxx_utility/release/xxx_util /usr/local/bin
        cp ~/xxx/source/xxx_utility/release/xxxcore.so /usr/local/lib
Run Code Online (Sandbox Code Playgroud)

注意:删除名称以保护无辜者

编辑:最终修正版:

clean = $(MAKE) -f xxx_compile.workspace.mak clean;


build = svn up;                                         \
        $(clean)                                        \
        ./cbp2mak/cbp2mak -C . xxx_compile.workspace;   \
        $(MAKE) -f xxx_compile.workspace.mak    $(1);   \


.PHONY: release debug clean …
Run Code Online (Sandbox Code Playgroud)

linux makefile

159
推荐指数
9
解决办法
17万
查看次数

标签 统计

linux ×1

makefile ×1