makefile: execute one target from another target plus additional commands

Posted by cschol on Stack Overflow See other posts from Stack Overflow or by cschol
Published on 2010-03-20T05:22:30Z Indexed on 2010/03/20 5:31 UTC
Read the original article Hit count: 538

Filed under:
|

I have a makefile with something like the following targets:

install:
    do a whole bunch of stuff to build and install

dist: install
    cp README.txt $(INSTALL_DIR)
    zip $(INSTALL_DIR)

I am trying to not repeat the commands from target install and make dist execute install first before executing its own commands.

Calling make dist does indeed execute all commands from target install but then just stops and it does not execute its own commands, e.g. the cp.

Am I missing something?

© Stack Overflow or respective owner

Related posts about makefile

Related posts about make