Cannot use make to run programs - Unix

This is a discussion on Cannot use make to run programs - Unix ; I have made this makefile: all: std std: ./std us: ./cph clean: -rm -rf *~ std *~ cph where std and cph are executable files. But they are not executed. I just get: make: Nothing to be done for `all'. ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Cannot use make to run programs

  1. Cannot use make to run programs

    I have made this makefile:


    all: std

    std:
    ./std
    us:
    ./cph

    clean:
    -rm -rf *~ std *~ cph

    where std and cph are executable files. But they are not executed. I
    just get:

    make: Nothing to be done for `all'.

    Is there someway to force make to run these programs?

  2. Re: Cannot use make to run programs

    On Jun 4, 5:28 pm, Johs wrote:
    > I have made this makefile:
    >
    > all: std
    >
    > std:
    > ./std
    > us:
    > ./cph
    >
    > clean:
    > -rm -rf *~ std *~ cph
    >
    > where std and cph are executable files. But they are not executed. I
    > just get:
    >
    > make: Nothing to be done for `all'.
    >
    > Is there someway to force make to run these programs?


    One way is to create a phony dependency for them. So long as the phone
    dependency does not exist, they will be made.

    Like this:

    std: dummy
    ./std

    us: dummy
    ./cph

    dummy:

    Since 'dummy' does not exist, the 'std' and 'us' targets will be
    remade each time.

    DS


  3. Re: Cannot use make to run programs

    On 2007-06-05, Johs wrote:
    > I have made this makefile:
    >
    >
    > all: std
    >
    > std:
    > ./std
    > us:
    > ./cph
    >
    > clean:
    > -rm -rf *~ std *~ cph
    >
    > where std and cph are executable files. But they are not executed. I
    > just get:
    >
    > make: Nothing to be done for `all'.
    >
    > Is there someway to force make to run these programs?


    Try:

    all! std

    .... etc.

    --
    Russell Wood

  4. Re: Cannot use make to run programs

    David Schwartz wrote:

    > One way is to create a phony dependency for them. So long as the phone
    > dependency does not exist, they will be made.

    ....
    > Since 'dummy' does not exist, the 'std' and 'us' targets will be
    > remade each time.


    ....except in most cases "make -t" will "touch dummy" (so one's makefile
    should remove those on a clean-rule).

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

+ Reply to Thread