Re: [AD] makefile syntax

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 1/7/06, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> I wanted to just:
>
> MAKE_LIB += new command
>
> but it doesn't put the additional command on a new line. Is there
> anyway to do that?

There is, but it requires a big pile of ugly hacks, each one uglier
than the previous :-)

    NOTHING :=
    SPACE := $(NOTHING) $(NOTHING)
    define NEWLINE
    $(SPACE)
    $(SPACE)
    endef

    MAKELIB = echo foo
    MAKELIB += $(NEWLINE) echo bar

    default:
        $(MAKELIB)

The above makefile prints:

    echo foo
    foo
    echo bar
    bar

Maybe there's another way to do what you want, but I'm too tired to
think right now...

--
Julien Cugnière




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/