bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Idea: --only-make-prerequisites


From: Edward Welbourne
Subject: Re: Idea: --only-make-prerequisites
Date: Fri, 18 Jan 2019 10:25:14 +0000

Dan Jacobson (18 January 2019 08:49)
> --only-make-prerequisites is for folks that want to check and get
> things ready first, before the President arrives for the button
> pushing ceremony.

I can see other uses for it ;^>

When I'm hacking on code, and intend to hack some more, it's sometimes
nice to pause and get the compiler to tell me whether what I've done is
all good.  I'm not interested in a link step just yet, as I know the
code is unfinished, but I want to see if what I've written compiles.
(Then again, linking isn't as time-consuming as it used to be.)

This can be implemented in the make-file: just have some intermediate
target that depends on the prerequisites and doesn't do anything; the
actual target then depends on that.  To take your example,

.PHONY: netsift-prereq
netsift-prereq: myconfdir/$J.pre myconfdir/$J.cf
netsift: netsift-prereq
        cat zz > yy
        ln q r /etc

Of course, that doesn't play nicely with $< and friends, so isn't ideal;
but, for that, you could just duplicate the prerequisites,

.PHONY: netsift-prereq
netsift-prereq: myconfdir/$J.pre myconfdir/$J.cf
netsift: myconfdir/$J.pre myconfdir/$J.cf
        cat zz > yy
        ln q r /etc

The command-line option would save the need to edit the make-file to be
ready to be used this way, which would be welcome when the make-files
aren't familiar (especially if they're auto-generated and numerous).

        Eddy.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]