I actually found a way, with a workaround.
The .git folder is explicitly ignore by tup (why ?) here:
https://github.com/gittup/tup/blob/master/src/tup/pel_group.c#L32
But you can fool it using a gitfile
(https://git-scm.com/docs/gitrepository-layout#_description):
$ mv .git .git_folder
$ echo "gitdir: .git_folder" > .git
$ echo ": |> git log -n 3 > %o |> logfile" >> Tupfile
$ tup # updates
$ tup # no update
$ git switch - (or any other operation that changes git state really)
$ tup # re-runs
$ tup # no update, all updated.
This is very elegant and powerful. I think .git and other .<vcs> systems
where ignored for performance reasons, and because they where deemed
irrelevant for a build system. Maybe make a PR to unignore these files
(behind a flag). Or just patch your version of Tup really. Not a big
project, and has a fantastic build system ;-).
Hope it helps,
-- Guillaume.
On 14/10/24 21:10, Ivan Morén wrote:
Hi! :-)
I am generating a file based on the output of `git log`, so it changes
when the repo changes, not when the files change. Is it possible to
"force re-run" it every time (I would then use the ^o flag to stop
everything else from recompiling when nothing changed)
Does anyone know of a way to instruct tup to always re-run a rule?
Best regards!
Ivan
PS. I'm making a small blog using tup and pandoc and having a blast!
The lua scripting of tup is really flexible! <3
--
--
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
---
You received this message because you are subscribed to the Google
Groups "tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tup-users/CAORM-N%2B8e7W%2BLkqYhuyWOjiqMrd426_Z7hO%3D_uLx3KXOZ2F31Q%40mail.gmail.com
<https://groups.google.com/d/msgid/tup-users/CAORM-N%2B8e7W%2BLkqYhuyWOjiqMrd426_Z7hO%3D_uLx3KXOZ2F31Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
--
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
---
You received this message because you are subscribed to the Google Groups "tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tup-users/d2d58620-4ed6-413d-a785-718f658f2c8c%40gmail.com.