Dru Nelson <
dru...@gmail.com> writes:
> Hi Nils,
>
> Thanks for your reply.
>
> So, for the first question. Can I infer that I am correct. If an 'all.do'
> contains nothing but 'redo-ifchange' commands, then the system will not
> build under a standard run of the command 'redo'.
I believe either you or me misunderstood something here. Please show
example dofiles and document exact behaviour you expect in the case.
> BTW, that makes me wonder. How does redo-ifchange know what 'do' script it
> is being run from?
> In DJB's document, he states:
>
>
https://cr.yp.to/redo/honest-script.html
>
> For example, dhcpd.do can say
>> redo-ifchange cc dhcpd.deps
>> redo-ifchange `cat dhcpd.deps`
>> ./cc -o dhcpd `cat dhcpd.deps`
>> to indicate that dhcpd depends on cc, dhcpd.deps, and the files listed in
>> dhcpd.deps. *You don't have to say redo-ifchange dhcpd.do; that's
>> assumed.*
>
>
> I guess it must record that on the first pass, when building the database.
I have no idea what you mean with “first pass” – maybe first build?
> Maybe via an environment variable. Otherwise, if you run it from the
> command line, how would it know what 'do' script it was run from.
it is known before invocation which file builds a target. Check out
redo-whichdo to see how it is determined & read more documentation.
Take care – if you build dofiles during the build, information from
redo-whichdo might not match what happens, since the dofiles can be
non-existent before the build.
> With regards to the second question, I'm asking a higher level question.
> Why would such a feature be needed if all the dependencies were tracked?
> Hopefully Avery will see this email and chime in.
My opinion is that the “touch” feature is not useful at all. If you want
to force the rebuild of a target, you can either truncate it or invoke a
“redo” command with that target as an argument – then it will be redone.
Consequently, my redo implementation never rebuilds on “just touching” …
> --
> You received this message because you are subscribed to the Google Groups "redo" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
redo-list+...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/redo-list/CALqrBYoM4hW3Sec_a0kiHuf%3Dbe-6CAjmxGAgs8_K7fhFxFa43A%40mail.gmail.com.