Closed b11z closed 6 years ago
Yeah, this is a confusing part of the orignal redo
design. Sources are always just timestamp based. It's simple, and I don't know how you'd specify something different for a source since the only files gup has are "this is how you build a target".
A common solution is to make a phony target which represents "file a's contents has changed", like so:
# b.gup:
gup -u a.stamp
# use a in your actual build
# a.stamp.gup:
gup -u a
gup --contents a
This way, changing a
causes a.stamp
to get built, but since that target uses --contents a
, it isn't considered changed, so b
won't be rebuilt.
It looks like
gup --contents
is the way to hash a target output, but is there any way to ask that source files get hashed? I.e. if I have a non-built dependencies, they are always recorded by timestamp and not content hash, as far as I could see.