www.digitalmars.com         C & C++   DMDScript  

c++.command-line - always out-of-date smake target?

reply Larry Brasfield <larry_brasfield snotmail.com> writes:
Hi.

I'm converting a few Makefile's from using Microsoft's
nmake to using smake instead.  This has been a little
smoother than I expected, but one wrinkle has still
got the best of me.

In the Makefile, the "file" CON is used in dependency
lists to cause certain build actions to always occur if
(and only if) their products have further use for the
actual targets specified.

For example:

app.exe : $(OBJLIST) timestamp.obj
	$(LL) ....


	$(TOOLS)\now < timestamp.template > timestamp.c

This does not work with smake, which complains that CON
does not exist and smake does not know how to build it.

Can anybody suggest a good work-around for this?
Thanks in advance.

-- 
-Larry Brasfield
(address munged, s/sn/h/ to reply)
Jul 31 2002
parent "Walter" <walter digitalmars.com> writes:
Just leave off the dependency:

foo : bar
    blah-blah

bar:
    rah-rah

rah-rah should always get executed whenever foo is built.
Jul 31 2002