run-script on Windows

115 views
Skip to first unread message

Evgeny Andreeshchev

unread,
Apr 18, 2013, 11:25:50 AM4/18/13
to tup-...@googlegroups.com
Hello,

In case anything rude follows, please excuse my ignorance, as my new to Tup...

Meanwhile I'm trying to get run-scripts working on Windows. I have the easiest part done and working: creation of child process and reading its stdout, but I just realized, that to use it properly I need to dllinject run-script process to gather input dependencies of run-script. Othwerise run-script is never called again, and in my case I use it to extract dependencies hidden within file.

Before I dive deeper: are there any known limitations that held people from implementing run-script feature on Windows before?

Thank you
Evgeny

Mike Shal

unread,
May 7, 2013, 11:12:29 AM5/7/13
to tup-...@googlegroups.com

Hi Evgeny,

Unfortunately I don't remember if there are any specific issues that would prevent run-scripts from being implemented on Windows, other than I haven't had time. But, it would definitely need to dllinject so tup could track dependencies. Have you tried that and run into any problems?

Also we are getting closer to having lua support in tup, so it might be worth checking out that branch to see if that might solve your problems without using run-scripts. It's not finalized yet though, so it is still subject to change.

-Mike

Evgeny Andreeshchev

unread,
Jun 27, 2013, 6:56:19 PM6/27/13
to tup-...@googlegroups.com
Hello,
Pardon me for late reply.

I've got it running but was unable to properly add script dependencies on the first attempt. I.e. I would need the run-script to be rerun every time I change the configuration of my script. Sadly haven't put enough time into this yet.

Since you're mentioning this - where can I find lua-branch?

Thanks
Evgeny

Rendaw

unread,
Jul 9, 2013, 1:49:21 AM7/9/13
to tup-...@googlegroups.com
You can get the lua branch here: https://github.com/gittup/tup/tree/lua if you don't mind compiling it yourself.  I make Windows binaries from time to time here: http://sourceforge.net/projects/tup-lua/files/ - I'll try to update them with the new updates later today.  No documentation yet, unfortunately, but the basics are:
tup.definerule{inputs = {}, outputs = {}, command = ''}
tup.getconfig('VARIABLE')
tup.include('file.lua')

There are some helpers like
frule{inputs = {}, outputs = {}, command = ''} which supports the tup % and $ substitutions in input/output/command strings.
rule(inputs, outputs, command)

Put the rules in Tuprules.lua or Tupfile.lua.

Mike Shal

unread,
Jul 14, 2013, 11:45:05 AM7/14/13
to tup-...@googlegroups.com
On Thu, Jun 27, 2013 at 6:56 PM, Evgeny Andreeshchev <eugene.an...@gmail.com> wrote:
Hello,

Pardon me for late reply.

I've got it running but was unable to properly add script dependencies on the first attempt. I.e. I would need the run-script to be rerun every time I change the configuration of my script. Sadly haven't put enough time into this yet.

Since you're mentioning this - where can I find lua-branch?


The lua branch is now merged to master, so the Windows binary on the tup website should have this support (if not, let me know :)

-Mike
Reply all
Reply to author
Forward
0 new messages