Re: [tup] Building o-files, lib-files etc. into separate directories

2017-05-12 Thread Freddie Chopin
On Fri, 2017-05-12 at 02:12 -0700, Vojtech Musil wrote:
> I started to learn tup, however I've stumbled on an issue while
> generating files into different directories. My folder structure
> looks like this:
> 
> tup_test4
> |---newmath
> | |---square.c
> | |---square.h
> | |---Tupfile
> |---hello.c
> |---Tupfile
> 
> 
> My goal is to generate all the object files into objs direcotry, all
> libraries into libs and build the program out of that. Here is how my
> Tupfile looks like:
> 
> newmath: Tupfile
> : foreach *.c |> gcc -c %f -o %o |> ../objs/%B.o
> : ../objs/square.o |> ar crv %0 %f |> ../libs/libnewmath.a
> 
> tup_test4: Tupfile
> : *.c |> gcc -c %f -o %o |> objs/%B.o
> : objs/hello.o objs/square.o |> gcc %f -o %o |> hello
> 
> However I get following error:
> Exlpicityly named file "objs/square.o" can't be listed as an input
> because it was genrated from external directory "newmath" - try
> placing the file in a group instead and using the group as an input.
> 
> What's the issue? I was googling a bit and it appears this is not
> possible to achieve to put all the object files into it's separate
> folder etc...
> 
> Any advices? Is there a way how to put objects, libraries etc. into
> it's own directories?

Yes, this is possible, but you cannot use explicit names - only
"" will allow you to do that.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] newbie questions - migrating from Make to tup

2016-12-07 Thread Freddie Chopin
On Mon, 2016-12-05 at 11:34 -0800, n...@lifeonair.com wrote:
> I saw in the mailing list that in 2015 there was no (easy?) way to
> accomplish it. What’s the recommendation today?

You have to be more clear about your intent, as I really don't
understand your question. Generally tup creates directories when it
needs them, so you don't have to do anything.

> what is an easy way to build both debug and release in one run? (i.e
> multiple targets), alternatively what is the recommended method to
> have something like make DEBUG=1 ?

Building multiple versions of the program in one run will just require
you to have multiple versions of the rules involved, possibly in the
form of a special file with rules, included in two separate directories
with some special flags declared.

> I use git submodule named ‘scream’ and get  “tup warning: Writing to
> hidden file '/Users/noam/w/hp-router/.git/modules/src/scream/index' “
> the files in the submodule are compiled as part of the main (parent)
> project ( i.e. I don’t want to create libraries and link them)

I don't think that this warning is from the compilation - how would
your compilation process mess with git and why? Unless your compilation
includes things like "git submodule update --remote" in every run,
which is not the best idea...

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] My compiler silently writes & caches some internal files ... how do I tell tup it's ok?

2016-12-07 Thread Freddie Chopin
You have to show us the actual rule from your Tupfile. Generally you
can specify more outputs of the single command and that's what you
should do - there are some examples with that on tup's website.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] "legacy" format?

2016-11-30 Thread Freddie Chopin
Hello again Thomas!

I guess there's no distinction into "old" (as in "legacy") and "new"
(as in "shiny") syntax. I think the only distinction is purely
chronological - the "old" syntax is in fact older then the lua syntax.

As to which one of these is better I think it's jus a matter of
preferences. For me the "old" syntax was too restrictive and I was more
than happy to switch to lua the moment it was available. In fact I've
heard that Mike is working on adding Python to tup (;

The syntax of lua may seem a bit strange at the first glance, but you
can do anything that is possible in the "old" syntax. If you have any
questions about tup+lua - just ask.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Rule to run command to only output on screen

2016-11-30 Thread Freddie Chopin
On Tue, 2016-11-29 at 10:46 -0800, Thomas Nilefalk wrote:
> I'm trying out tup on a part of a project of mine, starting with
> building the unitttests. My current build finishes the build by
> running the tests and outputtting the progress and results of them on
> the screen.
> 
> How would one go about to do the same with tup? There seems to be two
> problems to me, the output is not a tty so pretty red/green output
> becomes just black and white, and that there seems to be no way to
> write a "target" to just run the unittests.
> 
> Any suggestions?

I would personally suggest to use some other tool for that.

Tup is great as a _BUILD_ tool. Using it for other things (like running
unittests, doing just one selected "target") is just not worth the
trouble. You can easily wrap tup in a Makefile - doing the build with a
simple "tup" followed by an invocation of produced executables.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Building from a common root

2016-11-30 Thread Freddie Chopin
On Tue, 2016-11-29 at 07:41 -0800, Brian Vandenberg wrote:
> How can I get tup to build from a common root (that is, not switch
> directories to where each tupfile is)?

You cannot do anything more than have a single Tupfile in the common
root. In the subfolders you can however have some special files (with
build description of these subfolders) which can be included manually
by the top-level Tupfile.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] database update on master (version 17)

2016-11-03 Thread Freddie Chopin
Hi!

Works fine in here (; Thx!

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Utility of &-variables

2016-08-22 Thread Freddie Chopin
Hi Eric!

I actually used them only once, because in my scenario somehow $(TOP)
and the node variable referring to top folder of the project are
sometimes different... This only happens when I open a file in
Tuprules.lua for parsing. If the rules are included from different
Tupfile.lua files, then $(TOP) may become "../" or "../../", but
somehow the code that opens the files in lua expects the path to be
relative to the file that has io.open(...) - Tuprules.lua, and the path
should always be "."... I think that this may be some slight bug in lua
support, but the node variable works in this case.

In case you wonder why I did not just hardcode "./" in the path - the
reason is that sometimes I actually include Tuprules.lua from a
different Tuprules.lua file, in which case this gets even stranger,
because the path to opened file still has to be relative to the file
that actually has the io.open() function, even if this file is included
in a different Tuprules.lua...

https://github.com/DISTORTEC/distortos/blob/master/Tuprules.lua

Special use case
https://github.com/DISTORTEC/distortosExamples/blob/master/Tuprules.lua

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Migrating from Make: generated source?

2016-06-19 Thread Freddie Chopin
Hello!

Just read the next chapter - it has the answer to your question.

http://gittup.org/tup/ex_generated_header.html

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] In a rule with multiple output files, put only one of them in a group

2016-04-12 Thread Freddie Chopin
There's also this magic syntax that only adds the file to group. I know
I've seen it on the list (or somewhere on github?), but I really don't
remember what was it exactly... Something like:

: file |> |> 

With this (or something similar) - placed below the actual rule - you
can add each file into its own group. But I'm really not sure about the
exact syntax... I saw it somewhere, but I just don't remember where,
when and how exactly did it look...

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Re: Tup is terrribly broken on Windows

2016-01-18 Thread Freddie Chopin
On pon, 2016-01-18 at 18:33 -0800, Dragoon wrote:
> It is rather unfortunate that our results differ, I think this may be
> differences between Windows editions.

Then you have to find what's different on your side - no one has ever
reported such problems... Have you tried on different PC? You can
always install Virtual Box with any Windows version (Microsoft gives
free Virtual Box images - google for them) and try there. You can try
with any other executable, different than gcc - for example you can try
copying files with cp, using echo or cat.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Re: Run scripts survey

2016-01-12 Thread Freddie Chopin
On wtorek, 12 stycznia 2016 08:56:46 CET Gavin Cannizzaro wrote:
> One question though: the Lua API did not support all of the features of the 
> features that were supported by the native Tup syntax (at least when I last
> used it).  The ^o^ flag, for example.  Also globbing didn't work the same
> way (as I recall, it was done in-place).  And the "pretty print" text.  And
> flags in extra outputs.  It was really welcome to switch to run scripts and
> be able to use those features.

I haven't tried ^o flag, but all the other things you listed work in lua just 
fine:
- globbing works the same way,
- pretty print text works the same way - you embed "^ your text^ in the 
command and that's it,
- extra outputs work as they should.

I guess ^o would probably work too.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Re: new release soon

2016-01-11 Thread Freddie Chopin
On poniedziałek, 11 stycznia 2016 13:33:12 CET Mike Shal wrote:
> Thanks everyone for filing issues for regressions. The latest master
> (64be9780b8a59f5836f4911c8a10f3254ce124fa, or
> http://gittup.org/tup/win32/tup-v0.7.3-129-g75a8db9.zip for Windows) should
> have these regressions fixed. Please give this version a try and let me
> know if there are additional issues, otherwise I'll tag this week.

I've tried the latest version on Linux and on Windows 7 64-bit in VirtualBox 
(which I already wrote on github) - they work fine (;

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup is terrribly broken on Windows

2016-01-10 Thread Freddie Chopin
Hello!

I cannot reproduce this issue... In 32-bit shell:

> MINGW32 ~/tup
> $ tup
> [ tup ] [0.016s] Scanning filesystem...
> [ tup ] [0.016s] Reading in new environment variables...
> [ tup ] [0.031s] Parsing Tupfiles...
> 
>  100% 1) [0.000s] .
> 
> [ tup ] [0.031s] No files to delete.
> [ tup ] [0.031s] Generating .gitignore files...
> [ tup ] [0.031s] Executing Commands...
> 
>  100% 1) [0.047s] g++.exe -c main.cpp -o main.exe
> 
> [ tup ] [0.093s] Updated.

In 64-bit shell:

> MINGW64 ~/tup
> 
> $ tup
> [ tup ] [0.011s] Scanning filesystem...
> [ tup ] [0.011s] Reading in new environment variables...
> [ tup ] [0.011s] Parsing Tupfiles...
> 
>  100% 1) [0.000s] .
> 
> [ tup ] [0.021s] No files to delete.
> [ tup ] [0.021s] Generating .gitignore files...
> [ tup ] [0.021s] Executing Commands...
> 
>  100% 1) [0.032s] g++.exe -c main.cpp -o main.exe
> 
> [ tup ] [0.064s] Updated.

I'm also doing this on virtual machine with Windows 7 64-bit, but I'm pretty 
sure that on "real" Windows 7 it would work the same.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup is terrribly broken on Windows

2016-01-06 Thread Freddie Chopin
On środa, 6 stycznia 2016 04:22:00 CET Dragoon wrote:
> cmd shell gives me garbled output.

This is exactly the same problem as I linked in my first post - https://
github.com/gittup/tup/issues/255 . Mike has already fixed that, but I haven't 
checked it yet. Either try the most recent development version or try the one 
with "...-104-..." in the name.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup is terrribly broken on Windows

2016-01-06 Thread Freddie Chopin
On środa, 6 stycznia 2016 14:31:11 CET you wrote:
> Either try the most recent development version or
> try the one with "...-104-..." in the name.

Small correction - the fix is not yet available in any of the builds, so just 
try this one - tup-v0.7.3-104-g65fdf0f.zip

http://gittup.org/tup/win32/

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup is terrribly broken on Windows

2016-01-04 Thread Freddie Chopin
Hello again!

A very important question first - are you trying to run tup _FROM_ the msys 
shell? Have you tried running tup using regular command line prompt for 
Windows (cmd)? Just add executables from msys to your system's PATH (they are 
located in "\usr\bin") and you can use them without msys 
shell.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] new release soon

2015-12-22 Thread Freddie Chopin
Hi!

I've tried the most recent tup few days ago and I must say that some things 
broke for one of my projects. You may remember my post about a way to parse 
any file with CONFIG_... variables with lua. I know that it's actually a 
violation of "normal" tup's behavior and that I'm circumventing variants, but 
as long as configuration of variants can be placed only in subfolders exactly 
one level below root of project, then they don't really suit my needs... I 
actually don't need variants - I just need a way to select one particular 
configuration and use it as default for tup, as long as the user doesn't 
"reconfigure" the whole project. And I'd really like to avoid any copying, 
because then you have to remember which file to edit (the original or the 
copy) to make any change.

Fortunately it's still possible to parse the CONFIG_... variables directly 
with lua and I hope that it will still be possible, otherwise the build 
procedure of my project get's completely broken. Previously you could actually 
include the file with CONFIG_...="..." lines (only assignments with quoted 
strings worked, but it was enough) and it worked fine. Now it always has to be 
parsed with the function I wrote, so this was not a big change.

Sometimes tup feels a little bit too restrictive... For example this 
restriction that CONFIG_... variables can be set only by tup.config file. As I 
wrote, this can be circumvented in lua and I really hope that this small hole 
for advanced user will _NOT_ be closed (;

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] dot-files and dot-folders

2015-12-02 Thread Freddie Chopin
On Wednesday 02 of December 2015 11:26:20 Mike Shal wrote:
> I started this in commit e5b0b379a. It ignores .tup, .git, and .hg (and
> everything under those directories) where previously it would ignore .*
> 
> I'm sure there will be some other issues with this, and we will probably
> need to add support for ignoring specific files for rules (but there are
> other requests for that already). So, let me know if this helps or if it's
> causing more trouble :)

I've noticed the commits yesterday and I was expecting your message on the 
list (;

Many thanks for implementing it! I'm going to update tup in a moment and test 
it with ".config" files.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] strange ifn?eq

2015-11-20 Thread Freddie Chopin
On Friday 20 of November 2015 07:24:52 Peter Varo wrote:
> Hey everyone,
> 
> I found a very strange behaviour in `ifeq` and `ifneq`. Consider we have
> the following snippet:
> 
> arch = @(TUP_ARCH)
> ARCH = $(CONFIG_TUP_ARCH)
> 
> ifneq ($(arch), $(ARCH))
> error 'arch' and 'ARCH' should be the same
> else
> 
> : |> printf "Config-consts are matching: $(arch), $(ARCH)\n" |>
> 
> endif
> 
> What should the expected output be?
> 
> 1. `@(TUP_ARCH)` and `$(CONFIG_TUP_ARCH)` should be the same
> "In other words, $(CONFIG_FOO) and @(FOO) are interchangeable." -- from
> http://gittup.org/tup/manual.html
> 2. `ifneq` will compare the lval and rval after evaluation and
> string-compare them => if they are the same the execution will jump to the `
> else` clause, if not, it will raise the error.
> 
> So I expect it will print "Config-consts are matching: x86_64, x86_64", but
> instead it will raise the defined error.
> If I switch from `ifneq` to `ifeq`, the executaion will jump to the `else`
> branch, and will print "Config-consts are matching: x86_64, x86_64", which
> is silly, as the `else` should be executed when the lval and rval are not
> the same, however the printed message shows that they are..
> 
> What causes this problem and why? Am I missing something?
> 
> (tup version: 0.7.3)
> 
> Cheers,
> P

You compare "x86_64" with " x86_64" - take a good look at the whitespaces in 
your condition.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tup] dot-files and dot-folders

2015-10-08 Thread Freddie Chopin
Hello Mike!

On Thursday 01 of October 2015 13:10:05 Mike Shal wrote:
> On Thu, Oct 1, 2015 at 12:55 PM, Freddie Chopin <freddie.cho...@gmail.com>
> wrote:
> > There are more restrictions like this one in tup - for example the fact
> > that
> > you cannot use dot-files or dot-folders as input/output (I've wrote about
> > that
> > some time ago).
> 
> Sorry, I haven't had as much time to work on tup as I had hoped :(.
> dot-files/folders have been ignored primarily to skip scanning & tracking
> things in .git and .tup, but it ignores all hidden files, because why would
> you want to build things that are hidden from the developer? Maybe that's a
> dumb idea and you have perfectly good reasons spelled out in the previous
> thread :).

OK, I have another good argument for allowing dot-files and dot-folders to be 
used in tup. Tup has special treatment for tup.config file, which is a renamed 
.config file generated by kconfig tool. The kconfig tool can be used 
standalone in a project to have a nice configuration tool, and this is exactly 
what I do in my RTOS project. The problem is that using any file with 
different name than ".config" in the kconfig tool is a bit cumbersome 
(partially because of its design, partially because of some strange 
bugs/"features"). In my project I use the file generated by this tool both as 
input for tup (I read and parse it manually in lua) and as input to commands 
(to generate a configuration header for C/C++ and to generate linker script 
for the configured chip), but I obviously have to use a different name than 
".config".

I would propose to ignore just .tup folder and allow any other dot-files and 
dot-folders as inputs. If scanning folders such as .git would be a problem for 
performance reasons, I would propose to implement a following restrictions:
1. Tupfile or Tupfile.lua files in dot-folders are ignored;
2. Tupdefault.lua file from some parent folder doesn't work in dot-folders;
3. Only explicit inputs are allowed in dot-folders - no globbing is possible;

If even that would be a problem, for a start I would be very happy if tup 
would just allow dot-files while we discuss what to do with dot-folders.

I could try to prepare some patches/pull-requests, but will you accept them? 
(;

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-10-01 Thread Freddie Chopin
On Thursday 01 of October 2015 10:09:56 Mike Shal wrote:
> - If you don't have such a kernel, your paths have '.tup/mnt/@tupjob-X' in
> them (which messes up things that stuff the current working directory in
> the output file), and updater.full_deps=1 would fail

I hope you don't want to remove this feature completely, as inability to 
easily debug files generated with tup would be a very big problem :(

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-10-01 Thread Freddie Chopin
On Thursday 01 of October 2015 12:55:49 Mike Shal wrote:
> Well I was wondering if it makes sense to only support the normal paths
> where namespacing is enabled, so I could get rid of the ^c flag and suid &
> privilege dropping code.

I hope you won't disable that any time soon (; This is very useful and the 
user namespaces path doesn't seem to be an universal solution...

> Any idea when arch will support the user namespaces?

Reading this - https://bugs.archlinux.org/task/36969 - I think that "never" 
wouldn't be such a big exaggeration...  It seems that user namespaces are a 
big source of security vulnerabilities, see the links posted around the end of 
the discussion.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-10-01 Thread Freddie Chopin
On Thursday 01 of October 2015 14:36:28 Ben Boeckel wrote:
> On Thu, Oct 01, 2015 at 19:03:17 +0200, Freddie Chopin wrote:
> > Reading this - https://bugs.archlinux.org/task/36969 - I think that
> > "never"
> > wouldn't be such a big exaggeration...  It seems that user namespaces are
> > a
> > big source of security vulnerabilities, see the links posted around the
> > end of the discussion.
> 
> Well, there's this:
> 
> https://lwn.net/Articles/657432/
> 
> Comments about it:
> 
> https://lwn.net/Articles/657428/

I posted that info in the ArchLinux feature request that I linked previously.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-09-30 Thread Freddie Chopin
On Wednesday 30 of September 2015 17:18:58 Ben Boeckel wrote:
> Do you have any /proc/config* files?

Just this:

> $ ls /proc/config*
> /proc/config.gz

> Do they have CONFIG_USER_NS in them
> at all?

After extracting:

> # CONFIG_USER_NS is not set

So I guess Arch Linux won't work in this scenario... Is there any way I could 
make my user "privileged"?

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-09-30 Thread Freddie Chopin
On Wednesday 30 of September 2015 17:04:02 Ben Boeckel wrote:
> Your kernel is either too old or doesn't have the option turned on.
> 
> https://lwn.net/Articles/532593/
> 
> > Starting with Linux 3.8 (and unlike the flags used for creating other
> > types of namespaces), no privilege is required to create a user
> > namespace.

Well, it certainly isn't too old, so this leaves the second option...

> $ uname -a
> Linux 4.2.1-1-ARCH #1 SMP PREEMPT Tue Sep 22 06:57:07 CEST 2015
> x86_64 GNU/Linux

Does the thing below have something to do with my problem?

> Due to security concerns, the default Arch kernel does NOT ship with the
> ability to run containers as an unprivileged user;

https://wiki.archlinux.org/index.php/Linux_Containers#Required_software

?

I've tried to run the compilation via "sudo", but this didn't change anything.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Multiple output groups?

2015-09-30 Thread Freddie Chopin
Hello Mike!

On Tuesday 29 of September 2015 16:34:04 Mike Shal wrote:
> I don't think there are any major technical reasons why it couldn't be
> implemented. There was an issue filed on github a while back for this that
> has some more details: https://github.com/gittup/tup/issues/166

Good to know that there are no technical limitations to implementing such 
thing. For now I've solved my problem without need for multiple groups, but 
the solution with multiple groups would look better and be more universal (;

If anyone is interested in what I've done, you can check last few commits that 
mention "tup build", or any tup file (Tuprules.lua, Tupfile.lua) - 
https://github.com/DISTORTEC/distortos

Generally I've managed to (ab)use groups to pass any number of single files 
with their path (archives, generated linker scripts) or any number of normal 
groups (compiled objects) to the function that does linking (link()). All of 
that uses lua's varargs.

> Yeah, they can be handy :). Part of me thinks that we could just use groups
> for inputs/outputs and not list any files manually. Though we'd also have
> to fix the explicit-listing-of-output-files issue for that to work.

This is something (partially) close to what I've done in my project. If I 
archive multiple objects to an archive libsomething.a in output/some/path/ 
then I also put this file in $(TOP)/output/some/path/. By 
passing such group to a function (that generates some rule - for example to do 
the linking) I can get the type of the file from the extension in the group 
name (".a") and I can get the path from the whole string. I actually pass only 
the real path to file to the function, which internally is converted to proper 
group. Lua parser gives you many possibilities, but because not many people 
use it (noone? (; ) most of the "proper ways of doing something" still wait to 
be discovered (;

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-09-30 Thread Freddie Chopin
On Tuesday 29 of September 2015 16:28:33 Mike Shal wrote:
> Well I know it's been a long time, but I was finally able to revisit this.
> I pushed a test patch to the 'unshare' branch on github, which avoids the
> .tup/mnt path issue, even without using the ^c flag and without suid.
> 
> For those who are interested, can you try it out and let me know if there
> are any regressions? The test cases pass on Linux (it probably breaks OSX,
> which is why it's not on master). I've noticed a small degradation in
> performance, but I'm not totally sure yet where it's coming from.

Hi!

First of all - it's good to see you back, I was starting to worry that tup 
would become a dead project... ;(

Anyway - I cloned the repo, checked out your branch and tried to build it, but 
the procedure failed. I think I may be missing something here - I'm not a 
Linux expert, so sorry if this is dumb...

> $ ./bootstrap.sh
> 
>   mkdir build
>   cd build
>   bootstrap CC -g ../src/lua/lapi.c
>   bootstrap CC -g ../src/lua/lauxlib.c
>   bootstrap CC -g ../src/lua/lbaselib.c
>   bootstrap CC -g ../src/lua/lbitlib.c
>   bootstrap CC -g ../src/lua/lcode.c
>   bootstrap CC -g ../src/lua/lcorolib.c
>   bootstrap CC -g ../src/lua/lctype.c
>   bootstrap CC -g ../src/lua/ldblib.c
>   bootstrap CC -g ../src/lua/ldebug.c
>   bootstrap CC -g ../src/lua/ldo.c
>   bootstrap CC -g ../src/lua/ldump.c
>   bootstrap CC -g ../src/lua/lfunc.c
>   bootstrap CC -g ../src/lua/lgc.c
>   bootstrap CC -g ../src/lua/linit.c
>   bootstrap CC -g ../src/lua/liolib.c
>   bootstrap CC -g ../src/lua/llex.c
>   bootstrap CC -g ../src/lua/lmathlib.c
>   bootstrap CC -g ../src/lua/lmem.c
>   bootstrap CC -g ../src/lua/loadlib.c
>   bootstrap CC -g ../src/lua/lobject.c
>   bootstrap CC -g ../src/lua/lopcodes.c
>   bootstrap CC -g ../src/lua/loslib.c
>   bootstrap CC -g ../src/lua/lparser.c
>   bootstrap CC -g ../src/lua/lstate.c
>   bootstrap CC -g ../src/lua/lstring.c
>   bootstrap CC -g ../src/lua/lstrlib.c
>   bootstrap CC -g ../src/lua/ltable.c
>   bootstrap CC -g ../src/lua/ltablib.c
>   bootstrap CC -g ../src/lua/ltm.c
>   bootstrap CC -g ../src/lua/lua.c
>   bootstrap CC -g ../src/lua/luac.c
>   bootstrap CC -g ../src/lua/lundump.c
>   bootstrap CC -g ../src/lua/lvm.c
>   bootstrap CC -g ../src/lua/lzio.c
>   link lua
>   bootstrap CC -g ../src/tup/bin.c
>   bootstrap CC -g ../src/tup/colors.c
>   bootstrap CC -g ../src/tup/config.c
>   bootstrap CC -g ../src/tup/create_name_file.c
>   bootstrap CC -g ../src/tup/db.c
>   bootstrap CC -g ../src/tup/debug.c
>   bootstrap CC -g ../src/tup/delete_name_file.c
>   bootstrap CC -g ../src/tup/dircache.c
>   bootstrap CC -g ../src/tup/entry.c
>   bootstrap CC -g ../src/tup/environ.c
>   bootstrap CC -g ../src/tup/estring.c
>   bootstrap CC -g ../src/tup/file.c
>   bootstrap CC -g ../src/tup/fslurp.c
>   bootstrap CC -g ../src/tup/graph.c
>   bootstrap CC -g ../src/tup/if_stmt.c
>   bootstrap CC -g ../src/tup/init.c
>   bootstrap CC -g ../src/tup/lock.c
>   bootstrap CC -g ../src/tup/luaparser.c
>   bootstrap CC -g ../src/tup/option.c
>   bootstrap CC -g ../src/tup/parser.c
>   bootstrap CC -g ../src/tup/path.c
>   bootstrap CC -g ../src/tup/pel_group.c
>   bootstrap CC -g ../src/tup/platform.c
>   bootstrap CC -g ../src/tup/progress.c
>   bootstrap CC -g ../src/tup/send_event.c
>   bootstrap CC -g ../src/tup/string_tree.c
>   bootstrap CC -g ../src/tup/thread_tree.c
>   bootstrap CC -g ../src/tup/timespan.c
>   bootstrap CC -g ../src/tup/tupid_tree.c
>   bootstrap CC -g ../src/tup/updater.c
>   bootstrap CC -g ../src/tup/vardb.c
>   bootstrap CC -g ../src/tup/vardict.c
>   bootstrap CC -g ../src/tup/variant.c
>   bootstrap CC -g ../src/tup/varsed.c
>   bootstrap CC -g ../src/tup/tup/main.c
>   bootstrap CC -g ../src/tup/monitor/null.c
>   bootstrap CC -g ../src/tup/flock/fcntl.c
>   bootstrap CC -g ../src/tup/server/fuse_fs.c
>   bootstrap CC -g ../src/tup/server/fuse_server.c
>   bootstrap CC -g ../src/tup/server/master_fork.c
>   bootstrap CC -g ../src/inih/ini.c
>   bootstrap CC -g ../src/compat/dummy.c
>   bootstrap CC -g ../src/compat/utimensat_linux.c
>   bootstrap CC -g ../src/sqlite3/sqlite3.c
>   bootstrap LD tup -lm
> 
> .tup repository initialized.
> unshare(CLONE_NEWUSER): Invalid argument
> tup error: Unable to create user namespace for subprocesses.
> [ tup ] [0.007s] Scanning filesystem...
> [ tup ] [0.042s] Reading in new environment variables...
> [ tup ] [0.049s] Parsing Tupfiles...
> 
>  1) [0.003s] src/lua
>  2) [0.001s] src/luabuiltin
>  3) [0.004s] src/tup
>  4) [0.000s] src/tup/flock
>  5) [0.000s] src/tup/monitor
>  6) [0.001s] src/tup/server
>  7) [0.001s] src/sqlite3
>  8) [0.001s] src/inih
>  9) [0.000s] src/compat
>  10) [0.000s] src/tup/tup
>  11) [0.002s] .
>  12) [0.000s] build
>  13) [0.000s] build/luabuiltin
>  14) [0.001s] test
>  15) [0.000s] test/make_v_tup
>  16) [0.000s] src
>  17) [0.000s] src/compat/win32
>  18) [0.000s] src/compat/win32/detect
>  19) [0.000s] 

Re: [tup] Build tool writes logfile

2015-08-16 Thread Freddie Chopin
On Saturday 15 of August 2015 06:55:08 WayneS wrote:
 So one of the tools in my build environment writes a logfile. I can't turn
 off the logfile and it doesn't happen to be in a .hidden directory.
 Since tup doesn't allow me to ignore certain dependencies that are detected
 I can't use it.
 Am I missing something?

Can't you specify this file as output? You could also try to use combined 
command like build-tool ...  rm -rf logfile.log.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Re: tup rules of update

2015-07-13 Thread Freddie Chopin

Doesn't this command:


python.exe -B $(SCRIPTPATH)\Python\CreateAnsiCFile.py %f none .


cause a scan of directory (the dot at the end)?


If you need additional information please let me know.


The best info you could give is the minimal example that we could test 
locally (;


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Does rule order matter?

2015-04-22 Thread Freddie Chopin

On 22.04.2015 09:32, Roman Cheplyaka wrote:
I made a minimal self-contained example, so that you don't need to 
install Haskell and stuff: https://github.com/feuerbach/tup-test If 
you run tup there, it'll fail with the above error. But if you swap 
the lines around in the tupfile, it'll succeed. Roman 


It seems commands in one Tupfile need to be ordered, tup only deals with 
ordering between separate Tupfiles. Order-only inputs are however 
necessary for parallel builds.


I guess the best person to answer your question and tell us whether it 
was a deliberate design decision or just something that is not yet 
implemented is Mike Shal, but - unfortunately - lately he rarely joins 
the discussion...


There is one feature of tup that would allow you to do what you want - 
groups. IMO it's one of the most important features of tup, but it's 
not yet documented... For more info you need to check test/ folder of 
the repository and search for group in the names. For example this one 
does exactly what you want - 
https://github.com/gittup/tup/blob/master/test/t3050-group-ordering.sh


So if you change your Tupfile like this:


: B.hs | A.hi | ./compile B.hs | B.o B.hi
: A.hs| ./compile A.hs | A.o A.hi A.hi


it will work  the way you want it:


Konsole output
$ tup
[ tup ] [0.000s] Scanning filesystem...
tup warning: generated file 'A.o' was deleted outside of tup. This 
file may be re-created on the next update.
tup warning: generated file 'B.hi' was deleted outside of tup. This 
file may be re-created on the next update.

[tup ] [0.088s] Reading in new environment variables...
[tup ] [0.088s] No Tupfiles to parse.
[tup ] [0.088s] No files to delete.
[tup] [0.088s] Executing Commands...
1) [0.005s] ./compile A.hs
2) [0.005s] ./compile B.hs
[] 100%
[tup ] [0.181s] Updated.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Does rule order matter?

2015-04-21 Thread Freddie Chopin

On 21.04.2015 21:00, r...@ro-che.info wrote:

Hi,

I tried writing (actually, generating) a Tupfile, and it is my 
impression that rules that generate files must precede rules that use 
those generated files. Is that correct?


I was a bit surprised by this, since it's usually a build system's 
task to perform topological sorting.


See here - http://gittup.org/tup/ex_generated_header.html

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] How to assign a variable in a Tupfile the output of shell command?

2015-04-12 Thread Freddie Chopin

On 12.04.2015 14:08, e271p314 wrote:
I'd like to assign a variable in a Tupfile the output of the command 
|find . -name *.cpp -exec dirname {} \; | sort -u|. How can I do it?


You cannot do that in tup directly. You can use shell (with `...`) but 
only in commands (the actual command may come from a variable, but it 
has to be part of command in tup rule). If you really need things like 
that, your may want to check tup run scripts. You may also save result 
of such call into a text file and use that later for some other rule.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Build script exporter

2015-04-03 Thread Freddie Chopin

On 03.04.2015 17:23, Spooge wrote:
I added an option to do some debug printing (-v).  Can you check the 
following?
1. Make sure tup will still run - if you ran the output script it 
might mess up the db when tup scans (not sure) because of externally 
generated files.
2. Run with -v and save stdout+stderr - this should have Commands: 
followed by a dump of the internal tree data.
3. If it still doesn't work, can you send me the log and your .tup/db 
one more time?


I probably see where's the problem with your project. In here everything 
works perfectly well if I generate the script while all the outputs 
generated by tup still exist. This sequence works:

1. tup
2. python ~/Downloads/chrome/tup-export-master/tup_export.py script.sh
3. rm -rf output
4. chmod +x script.sh
5. ./script.sh

However - this sequence produces a faulty script which doesn't have any 
mkdir calls, has the order wrong and doesn't list any input files for 
linker (it's the script that I've sent previously):

1. tup
2. rm -rf output
3. python ~/Downloads/chrome/tup-export-master/tup_export.py script.sh
4. chmod +x script.sh
5. ./script.sh

Is this expected? If it is, then your script should detect that and 
report an error. Or at least it should be clearly stated in the help.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Problem with Windows Tup

2015-02-22 Thread Freddie Chopin

On 02/22/2015 08:58 PM, tupomatic wrote:

Any clues what could be going on?


I think that tup's hooks for system calls may be messing with IARs check 
of license...


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Updating Tupfile Without Triggering Triggering a Complete Rebuild

2015-02-06 Thread Freddie Chopin

On 02/06/2015 10:51 PM, Petr Skočík wrote:

Is there a way to do this?


You don't need to do anything - it just works.

Currently, even as little as opening the file for writing ('r+'), not 
making any changes, closing, and restoring timestamps does trigger a 
complete rebuild.

I'm on Linux Mint 17 (~Ubuntu 14.04),  Ext4 if that makes any difference.


I really don't know why you try to restore timestamps... Try this:


Konsole output
[freddie@INFERNUS test]$ tup init
.tup repository initialized.
[freddie@INFERNUS test]$ echo : | echo text  %o | file1.txt  
Tupfile

[freddie@INFERNUS test]$ tup
[ tup ] [0.100s] Scanning filesystem...
[tup ] [0.184s] Reading in new environment variables...
[tup ] [0.320s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.323s] No files to delete.
[tup ] [0.323s] Generating .gitignore files...
[tup] [0.437s] Executing Commands...
1) [0.002s] echo text  file1.txt
[] 100%
[tup ] [0.538s] Updated.
[freddie@INFERNUS test]$ touch Tupfile
[freddie@INFERNUS test]$ cat Tupfile
: | echo text  %o | file1.txt
[freddie@INFERNUS test]$ echo : | echo text  %o | file1.txt  
Tupfile

[freddie@INFERNUS test]$ tup
[ tup ] [0.000s] Scanning filesystem...
[tup ] [0.099s] Reading in new environment variables...
[tup ] [0.099s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.103s] No files to delete.
[tup ] [0.103s] Generating .gitignore files...
[tup] [0.199s] No commands to execute.
[tup ] [0.300s] Updated.
[freddie@INFERNUS test]$ rm Tupfile
[freddie@INFERNUS test]$ echo : | echo text  %o | file1.txt  
Tupfile

[freddie@INFERNUS test]$ tup
[ tup ] [0.000s] Scanning filesystem...
[tup ] [0.092s] Reading in new environment variables...
[tup ] [0.092s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.096s] No files to delete.
[tup ] [0.096s] Generating .gitignore files...
[tup] [0.186s] No commands to execute.
[tup ] [0.311s] Updated.
[freddie@INFERNUS test]$ echo : | echo another text  %o | 
file2.txt  Tupfile

[freddie@INFERNUS test]$ tup
[ tup ] [0.000s] Scanning filesystem...
[tup ] [0.130s] Reading in new environment variables...
[tup ] [0.131s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.136s] No files to delete.
[tup ] [0.136s] Generating .gitignore files...
[tup] [0.223s] Executing Commands...
1) [0.002s] echo another text  file2.txt
[] 100%
[tup ] [0.318s] Updated.
[freddie@INFERNUS test]$ echo : | echo third text  %o | file3.txt 
 Tupfile

[freddie@INFERNUS test]$ tup
[ tup ] [0.000s] Scanning filesystem...
[tup ] [0.085s] Reading in new environment variables...
[tup ] [0.085s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.090s] No files to delete.
[tup ] [0.090s] Generating .gitignore files...
[tup] [0.177s] Executing Commands...
1) [0.002s] echo third text  file3.txt
[] 100%
[tup ] [0.261s] Updated.
[freddie@INFERNUS test]$


As you see I can open, read, overwrite the Tupfile and nothing gets 
rebuilt. I can add new targets and nothing gets rebuilt. I could now 
open the file and maybe change the order of commands - nothing would be 
rebuilt too.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] tup issue on windows

2015-02-04 Thread Freddie Chopin

On 02/05/2015 12:39 AM, Jonathan Marler wrote:
I didn't even involve visual studio, all I'm doing is calling the 32 
bit MSVC compiler directly from the command line (See the github issue 
to be able to reproduce).


Your github issue says:


REM  run from Visual Studio Commandprompt  (to have thecl  program in thepath)


As a starter try to run gcc directly from cmd (normal cmd), without 
anything fancy. I've been using tup on Windows for over 2 years and 
believe me - it works as advertised (; The only Windows limitations that 
I know of are 64-bit tools (solved recently, probably some problems 
still left) and lack of variants.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Improvments

2015-01-30 Thread Freddie Chopin

On 01/30/2015 04:34 PM, Magnus Bodin wrote:


 1. Add a %F flag that gives the whole path /without/ the extension. I
can't count how many times I wanted this flag.
 2. ...
 3. Some lighter versions of string manipulations. Like converting a
string to upper or lower case. Replace a substring etc.



The two above are possible with LUA parser.

4. A way to specify a specific outputfile in rules where we have 
multiple output files. E.g:


This is also possible with LUA parser, because instead of the old syntax 
you can write regular functions which take arguments, so in your 
function you'd have easy access to both outputs if you pass them as 
arguments.


You can look for inspiration here - 
https://github.com/DISTORTEC/distortos/blob/master/Tuprules.lua . The 
functions actually still use %o and most of them don't have multiple 
outputs, but to do what you want just replace uses of %o (or any other 
flag) with the string variable output (or any variable you actually 
need) - from there just extend the functions to use many variables 
(coming from function arguments) in any place you want.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Re: Macports version

2015-01-17 Thread Freddie Chopin

Hi!

Good to see you're still around Mike (;

The main problem with MacPorts package of tup is that Anatol no longer 
maintains this package, so it will not see any updates unless someone 
actually steps-in and takes it over...


https://trac.macports.org/ticket/46416

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Complicated input dependencies

2015-01-17 Thread Freddie Chopin

On 01/17/2015 12:19 AM, Ryan Gonzalez wrote:

Hello,

I have a weird situation. I have a dependency tree like this:

a.myr - a.o a.use
a.use b.myr - b.o b.use
b.use c.myr - c.o c.use

I tried this:

: foreach *.myr | command | %B.o %B.use

but the order isn't correct. I'm not sure how to approach this. Any ideas?


This cannot be done with the simple command you showed, if the naming 
shown above is real, then you'll need to state the rules explicitly 
for each one of the commands.


Explicit way would be to have it like this:

: a.myr | command | %B.o %B.use
: b.myr | a.use | command | %B.o %B.use
: c.myr | b.use | command | %B.o %B.use

It may possibly be a bit easier with lua parser, as you could (maybe) 
write some simple parsing to get from the name of .myr to the name of 
.use that is needed.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tup] Macports version

2015-01-05 Thread Freddie Chopin

Hello!

(I'm also CC'ing this email to Anatol, as he is listed as maintainer)

Is there any reason why tup's version in Macports is still 0.7.1, while 
0.7.3 was released ~5 months ago? I'm developing a project which needs 
0.7.3 to build and today a user of Mac OS X reported that it fails to 
build with the version from Macports, which - obviously - is too old.


I'd be grateful for any help, as I know nothing about Mac OS X (;

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Problem with generated files in another directory

2014-11-14 Thread Freddie Chopin

On 11/14/2014 08:48 PM, d...@daha.best.vwh.net wrote:
Although I didn't mention it in the earlier post, I also tried using 
the  | One.h  in my initial experiments.  I also tried the explicit 
path.  When I try the explicit path, I get:


* 1) [0.001s] build-default/progs/basic/src
tup error: Expected node 'basic' to be in directory 
'build-default/progs/basic/src', but it is not there.
tup error: Failed to find directory ID for dir 
'./basic/libgen/src/One.h' relative to 63

tup error: Error parsing Tupfile line 2
  Line was: ': main.cpp | $(TUP_CWD)/basic/libgen/src/One.h | g++ 
-Wall $(INCFLAGS) -g -c main.cpp | main.o'


Still no luck in making TUP happy with this setup.


OK, I seem to be asleep today (;

In your Tuprules.tup file placed in top folder of your project place this:

TOP = $(TUP_CWD)

Now your rule should look like:

: main.cpp | $(TOP)/basic/libgen/src/One.h | g++ -Wall $(INCFLAGS) -g 
-c main.cpp | main.o


The reason is that TUP_CWD in any tupfile is basically . folder, so 
nothin useful. But if you use it in Tuprules.tup to initialize a 
variable, then this variable will hold the path to top of your project 
anywhere you use it.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] what is role of lua?

2014-11-11 Thread Freddie Chopin

On 11/11/2014 06:00 PM, Spooge wrote:

On 11/11/2014 04:54 PM, Freddie Chopin wrote:
Maybe it's my personal preference, but in my project I use tup.rule() 
exclusively, and when working with examples from the website I wasted 
some time trying to make tup.definerule() do the right thing (; 
tup.rule() is a bit more powerful - it properly expands variables and 
tup %-flags, it's also a bit more compact. I don't even use 
tup.foreach_rule(), as a lua loop works better.
That's a good point.  When I wrote the documentation, I thought that 
using the lower-level tup.definerule would be easier to understand and 
might make the connection to the original parser clearer, but maybe 
that's sufficiently explained through the Lua reference.


Maybe convert the existing examples to tup.rule and remove the extra 
examples at the bottom?


I'm not sure what was the problem when I first tried lua, but I think it 
had something to do with the way variables were expanded... I don't have 
time to test that right now, but there was some problem when you tried 
to concatenate string with a variable that did not exist. In tup.rule() 
you just put the old style variables in the string directly with 
$(name), and for me (personal preference) that's easier (and shorter) 
than concatenations. Also you state the input and/or output only once, 
and use %-flags in the command string.


I guess that the bottom part - where you show that most of the *rule*() 
functions are related - should definitely stay (;


For the record, I use tup.definerule... it's wrapped in other 
functions and I felt the verbosity savings weren't worth the increased 
complexity in my case.


As I already wrote - probably personal preference (; I like
beginning $(name) end
more than
beginning  .. name ..  end


Maybe there could be docs with examples for specific use cases?  Or a 
getting started page that has a more concrete example, with 
everything used together (CFLAGS, tup.rule).


Either will be very nice (;

I took a quick look at your Tupfiles and they seem really clean and 
well organized.  I'm a bit hesitant to write a best-practices style 
document myself, since even with my own Tupfiles I'm not sure they'll 
support the abstraction I need as I use them in more projects.


Yes, indeed... To compile (; best practices we need more users sharing 
their experience, problems and solutions...


Having some sort of example compile, link, etc. functions would 
probably help to illustrate the advantages of Lua.  I'm not really 
sure how that could be worked into the current documentation.


These functions are really strong point of lua, even though in my 
project these are almost 1:1 equivalents of bang macros of tup parser.


BTW - here's another thing to improve in the docs - 
https://github.com/gittup/tup/issues/207
Thanks for pointing that out - I actually didn't realize that was 
merged myself, if it is what I think it is.  I'll definitely take a look


You probably think about run-scripts, but the issue is about 
getrelativedir() function (; Now when you point run-script support in 
lua then it would be another thing to add (;


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] what is role of lua?

2014-11-05 Thread Freddie Chopin

On 11/06/2014 04:34 AM, Spooge wrote:
As far as I can see from the lua parser docs, there is no way to 
achieve the functionality in run-script, since I see no way to run an 
external script.  Is that an intentional limitation?
I think that the run-script ability wasn't included in Lua because 
they were seen as alternatives; if you need to use run-script you 
probably aren't using the Lua parser.  It would probably be possible 
to move run-script into the Lua parser in some form or another.


Well, according to this test case lua parser can run runscripts, so I 
guess that this feature is just undocummented.


https://github.com/gittup/tup/blob/master/test/t2171-lua-run.sh

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] what is role of lua?

2014-11-03 Thread Freddie Chopin
If you'd like to see lua+tup in action, here's a little embedded project 
that uses this combination.


https://github.com/DISTORTEC/distortos

Unfortunately it's meant for microcontrollers, so if you'd like to 
actually build it you will need an arm-none-eabi- toolchain (there's a 
link in README.md).


One thing that lua has and original tup parser doesn't is the 
getrelativedir function, which allows to build input tree into an 
identical output tree, but placed in a subdirectory. Well, you could do 
the same with original parser, but you'd have to state full output path 
in each rule, while in lua you just use this new function and everything 
just works. This ability is used in the project linked above.


Another interesting thing is the ability to open any file read-only and 
generate rules from that - it's like run-script, but without need for 
additional files in different language. This is demonstrated - for 
example - in tup's testcases - 
https://github.com/gittup/tup/blob/master/test/t2157-lua-open-file.sh


It's true that lua's syntax is not as simple as original tup parser's 
syntax, but lua is really powerful (; There are many seemingly trivial 
tasks that cannot be accomplished with tup's parser, but using lua it's 
really simple - imagine every use case for patsubst() from Makefiles, 
like appending -I in front of every string with include directory or 
-D in front of every macro definition - this cannot be done in tup's 
parser (at least I haven't found a way to do that). There are many uses 
for such operation - imagine you have to write your build description so 
that it works on both gcc and 
any-other-compiler-that-has-completely-different-flags. So for one 
configuration you have -Idirectory -Dmacro and for other 
`/include=directory /define=macro`. If you'd like to only give 
directory and macro (without any prefixes/suffixes) to some 
variables and parse that later depending on the configuration, this 
cannot be done without lua (or I don't know how, but I'm pretty certain 
this cannot be done) or runscript.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Rule with unknowable collection of output files

2014-11-02 Thread Freddie Chopin
The thing you ask for is not currently possible with tup - all output 
files have to be stated explicitly and there's nothing you can do to 
change that.


If the files created are not needed, you can delete them in the same tup 
rule and it will work fine. Sth like:


: input.ext | compile %f %o  rm -rf 
files-or-directories-you-don't-need | output.ext


One tup rule is allowed to create any number of files with random names 
as long as all that are _NOT_ stated as output are removed when the 
execution ends.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] would ptrace work?

2014-10-31 Thread Freddie Chopin

On 10/31/2014 02:02 PM, David Roundy wrote:
I've just been struggling with fuse errors on my work computer, where 
I wasn't originally a member of the fuse group, and I'm working on 
nfs... I still haven't figured out which of these caused the most 
errors, but things still aren't working.  I expect that if tup is 
packaged by Debian, many of these pains will go away.


However, I got to wondering if ptrace might serve.  If all you need is 
to trace syscalls, I think this could work on Linux anyhow.  The 
downside is that you'd need to make tup understand all system calls 
that would affect files.  The plus side would be that it would be much 
simpler and more robust in operation, since you wouldn't have to mount 
and unmount a fake filesystem, and it would work with statically 
linked executables (including ones that don't use libc).  The downside 
is that you might not be able to lie about readdir's results to 
convince executables that generated files don't exist.


Anyhow, just a few thoughts, after an hour or so of fruitless attempts 
to make tup work.


David


Here is a post by Mike about different dependency tracking options - 
there's also a chapter about ptrace().


http://gittup.org/blog/2014/05/7-clobber-builds-part-2---fixing-missing-dependencies/

What problems do you have? I've recently switched to Linux and I've 
probably faced the same issues as you did, so maybe I'll be able to 
help. I'm using Arch, so things may be a bit different.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Variant subdirectories

2014-10-31 Thread Freddie Chopin

On 10/31/2014 02:12 PM, David Roundy wrote:
What about explicitly copying the input files to the variant output 
directory? There are programs (that annoy build authors) such as latex 
that explicitly require that the input and output be in the same 
directory.  The current approach of pretending that the input files 
are in the output directory works, but it seems simpler to actually 
copy them there.  Then when you modify the real input files, there 
would be a rule to update the ones in the variant build, and that 
would trigger a rebuild in the variant.  It seems (to my naive self) 
like this implicit set of copy rules (combined with the configuration 
handling in the variant) would be all that is needed for variants to 
work.


David


As simple as it sounds I don't think it's a good solution. Imagine that 
there are 10GB of input files and you have 15 variants - you'd end up 
with 150GB of copies... I know this example is exaggerated, but someday 
someone will come with such problem anyway...


I still think variants could actually be replaced with some clever lua 
scripting, which would also require some (probably minimal) changes to 
tup's behavior...


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Variant subdirectories

2014-10-31 Thread Freddie Chopin

On 10/31/2014 03:07 PM, Lee Winter wrote:

Such links even work on Micros~1 Window~1.


Only when you use sufficiently new version and NTFS file system.

I assume that variants have basically these features:
- they are built into separate directory,
- each variant has it's own tup.config,
- there may be multiple variants at the same time.

So if we'd like to have variants only as a clever script then:
- the first thing can be easily achieved with lua parser (or with tup 
parser if you don't need the hierarchy of folders to be copied),

- the second one would need a change in tup's behavior,
- the last one can be probably achieved right now (someone demonstrated 
this a while ago).


Using scripting is the most generic solution that solves ALL the problems:
- there's no problem with debugger failing to find sources because of 
FUSE or removed symlinks,

- there's no problem of copying,
- there's no problem of each platform requiring different solution,
- you can have any hierarchy of variants you want (currently only flat 
hierarchy is possible - all variants must be in $(TOP)),

- ...

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] would ptrace work?

2014-10-31 Thread Freddie Chopin
 Hmm... I won't help you much with the NFS issue, but for a normal 
workflow I had to enable option user_allow_other in /etc/fuse.conf - 
it was enough to uncomment it. Tup worked without that too, but using 
^c^ flag caused an error.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Variant subdirectories

2014-10-24 Thread Freddie Chopin

On 10/24/2014 09:22 AM, DoUno wrote:

Have a look at this project, it may be of some value:
https://github.com/DISTORTEC/distortos/blob/master/Tuprules.lua


Thanks for mentioning my project (; This may not be a good example, 
because this is a project for ARM Cortex-M3 microcontroller, so it 
cannot be build with regular gcc - you need to have an arm-none-eabi-gcc 
toolchain in your path (there's a link for one in README.md file). 
Anyway - the build files can be easily adapted to any project, so I hope 
they are of some use to anyone seeking example lua-tup files. These are 
not so simple as the original tup parser, but lua is way more powerful!


As for the original question, the idea of variants is just a small 
modification of normal tup behavior. When you are in your folder 
hierarchy you can issue following commands:

- tup - updates everything, no matter where you are,
- tup directory - updates only the outputs from the given directory 
(and everything that is needed by these outputs),
- tup output-file-name.ext - updates only the specified output file 
(and everything that is needed to build that file).


So in case of the distortos project mentioned above, when you are in the 
main hierarchy of the project, you can - for example - issue following 
commands:

- tup,
- tup source - build everything from the source/ subfolder,
- tup test - builds everything from the test/ subfolder,
- tup output/source/scheduler/Scheduler.o - builds only this single file,
- ...

So variants are just directories - you specify the folder and tup 
updates everything in this folder - in case of variants this 
everything is the whole project with it's variant-specific 
configuration (tup.config).


I guess tup command can be treated as having implicit $(TOP_DIR) 
argument (;


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Variant subdirectories

2014-10-24 Thread Freddie Chopin

On 10/24/2014 09:39 PM, Ben Robinson wrote:
Notice the addition of %I.  That's it.  Now variants work on Windows 
too, and FUSE is no longer necessary.  All that is needed it to ditch 
FUSE, and make the %I symbol available to rule authors.  Tup would 
continue to CD into the output directory and execute the rules from 
that directory.


That's not so simple - FUSE is used not only for variants but also (or 
rather - especially) for file access detection. That is the most 
essential part of tup and this cannot be ditched with the change you 
propose.


Something has to be done with FUSE anyway, as - from a recent issue 
report - FUSE no longer works on new OS X. This will probably leave FUSE 
Linux-only.


As for your proposal - today I've thought about that briefly and one 
(not necessarily the only one (; ) thing that is missing for 
implementing variants with lua, groups and stuff like that is the 
ability to have multiple tup.config files in the tree... Currently only 
tup.config in the top dir is used, tup.config one level down must be 
in empty directories and tup.config files in any other location (to 
levels down or below) are simply ignored. You can use any other file 
with configuration assignments, but:

- these cannot be named CONFIG_*,
- these will not produce @-variables,
- these will not work with tup varsed,
- these will not be immutable,
- there will be no way to automatically convert # ... is not defined 
to n,

- there will be no dependency of outputs on each assignment.
There are probably some more (;

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Conditionally build subdirectories

2014-10-23 Thread Freddie Chopin

On 10/23/2014 06:42 PM, Jonatan Olofsson wrote:
Note that, with a Tupfile in each directory, both directories would 
always be built, which is what I want to avoid. Hence, I can't use a 
Tupfile


This is not true. You can do sth like this:

ifeq(@(SOME_VARIABLE),y)
... all the rules ...
...
...
endif

This way the files would be built only if configured. I guess that in 
your case one tupfile would have:

ifeq(@(MCU_SERIES),stm32f1)
and the other one:
ifeq(@(MCU_SERIES),stm32f2)

If you want to stick to your original idea, you can always prefix output 
with @(MCU_SERIES)/, like this:

: input.c | arm-none-eabi-gcc -c %f -o %o ... | @(MCU_SERIES)/%B.o

There are many options, so if you still have problems, just ask - I use 
tup for microcontrollers too (;


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup Dependencies Example Mismatch

2014-10-20 Thread Freddie Chopin


On 10/07/2014 05:24 PM, Ben Robinson wrote:

Hello,

When following the online example here:

http://gittup.org/tup/ex_dependencies.html

The linkage between unused.txt and test.sh is not modeled as explained 
in the example.  I have attached an image showing the way my system 
has modeled the relationship (not at all), instead of the dotted line 
as shown in the example.


Is this a bug, or a change in the program's intended behavior?

Thank you!

Ben


Well, the examples (as well as the manual) are a bit outdated, so I 
guess that's the problem here. Notice that if you change your script to 
actually use the unused file, then everything works as expected - the 
script is re-executed, the nodes on the graph get connected etc.


You may try with older version of tup to confirm that it worked as 
described, but this doesn't make much difference as long as it works 
correctly.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Aw: Re: [tup] mtime issue on Windows

2014-10-01 Thread Freddie Chopin

On 10/01/2014 02:58 PM, tup_r...@gmx.eu wrote:
 Just to make sure this is not an issue of the control program: I
 replaced the control program command by calling the linker executable
 directly (using the same command line the control program would have
 used to call the linker) and I see the exact same behaviour of tup.

Did you try the same with gcc?

BTW - how do you take the info from tup's database?

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] mtime issue on Windows

2014-10-01 Thread Freddie Chopin

On 10/01/2014 03:31 PM, tup_r...@gmx.eu wrote:
 http://sqlitebrowser.org/

 Just open .tup/db and inspect table node.

OK, I'm browsing through my projects and I see a lot of nodes that have 
-1 in mtime column. By a lot I mean about 80% of all the nodes have 
-1 there. These are:

- all system headers,
- all system libraries,
- all tup build files,
- all directories,
- .gch files (precompiled headers - these files are created and deleted 
during compilation),
- some source files that I did not edit for a long time or that were 
created recently and edited (this is actually strange...).


So I guess that's pretty normal to have -1 there... In my case it does 
no harm - no unneccessary rebuilds are done. I'm currently on linux, but 
I had no problems on Windows...


I deleted tup database and outputs of the project, recreated everything 
and in the database some sources still have -1 while others have valid 
timestamp. Strange... However this causes me no trouble (or I didn't 
notice any).


Anyway - I've created a simple test case that uses GCC and mimics your 
test. Just create main.c file:


---8---

int main(void)
{
  return 0;
}

---8---

And a Tupfile:

---8---

: foreach *.c | gcc -c %f -o %o | %B.o
: *.o | g++ -Wl,-Map=%o.map %f -o %o | program | program.map

---8---

When I run tup for the first time in such project: I get:


1102-1-1  .
22101412171036-1main.c
33101412171273-1Tupfile
4415-1-1tup.config
5512-1-1$
6653-1-1PATH
771414121715401main.o
881121-1gcc -c main.c -o main.o
991414121715401program
10101414121715401program.map
11111142-1g++ 
-Wl,-Map=program.map main.o -o program

121215-1-1main.c.gch


This data is identical to what stat gives:


$ stat -t program program.map
program 6819 16 81ed 1000 1000 804 13369998 1 0 0 1412171540 
1412171540 1412171540 0 4096
program.map 17346 40 81a4 1000 1000 804 13369997 1 0 0 1412171540 
1412171540 1412171540 0 4096


There are no rebuilds after that. If I touch main.c to cause a rebuild, 
the dates are updated to what stat gives.


Could you try that example with gcc and see how it works for you?

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] A command is writing to files that you didn't specify in the Tupfile...

2014-09-25 Thread Freddie Chopin


On 09/25/2014 12:21 PM, Laurence McGlashan wrote:
 How do I get tup to recognise this file as an output?

If in your case this line:

: foreach *.cpp | bear -- clang++ -g -O0 -Wall -std=c++11 -c %f -o %o 
| %B.o


produces two outputs - main.o and your_another_file.json, then you need 
to rework it like this:


: foreach *.cpp | bear -- clang++ -g -O0 -Wall -std=c++11 -c %f -o %o 
| %B.o | your_another_file.json


If this created file's name has any relationship to the input or output 
file name, you could use some of %-flags.


If your command creates only ONE output file - compile_commands.json - 
then you just need to state that instead of your current %B.o.


If you have multiple sources and each call to 'bear' appends to your 
compile_commands.json file, then this will not work in tup - each tup's 
command must create a new, unique file, so your only option in that case 
would be to create unique %B.json files, and finally concatenate them in 
a single one.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] FUSE is a problem

2014-09-23 Thread Freddie Chopin

Hello again!

As a mostly-Windows user I haven't yet tried tup on Linux, until today 
(; So I've faced the whole palette of problems that most of you faced 
before:
- I had to set suid in tup binary and modify the tupfiles with ^c^ flag 
to be able to debug the project with GDB,
- I had to change /etc/fuse.conf to allow chrooting into fuse filesystem 
(it's possible that I've done something wrong previously, as I didn't 
find any mentions of this step anywhere) - uncomment user_allow_other,
- the build time incresed by over 100% - from about 25-30s to about 
60-70s, making it much closer to what I have on Windows (about 90s if I 
remember correctly).


Of course all of this is to enable debugging. I use Eclipse and I hoped 
that path mapping would allow me to somehow walk around the problem, 
but it's not possible to configure path mapping with wildcards or 
regexes and entering several hundred entries for each tupjob- seemed 
a bit stupid. I reported a feature request to Eclipse, but I don't have 
high hopes for it... https://bugs.eclipse.org/bugs/show_bug.cgi?id=444816


If only tup could be limited with the IDs to some reasonable number 
(like the number of CPU cores) the path-mapping approch would be feasible.


BTW - can I leave the ^c^ flags in Tupfiles for Windows? Will tup just 
ignore them or maybe report an error and terminate?


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] How about a release? (;

2014-09-22 Thread Freddie Chopin


On 09/21/2014 09:23 PM, Mike Shal wrote:


Ok, I just tagged the most recent as v0.7.3. There aren't any major 
new features, just a number of a small bug fixes. Let me know if there 
are any issues with it!


Great! Last revision from the repository is pretty well tested, so I'm 
pretty sure that the release will be OK too (;


Thanks!

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tup] How about a release? (;

2014-09-20 Thread Freddie Chopin

Hello!

I know that Mike is currently M.I.A. (; , but seeing that he updates his 
blog I hope that he also reads emails from this group (;


Is there any chance for a release? I know that there haven't been many 
new features in tup since the last release in march, but there are 
several things that were improved, so it would be nice to have them in 
Linux distros that use only tagged releases. There are two important 
changes (at least for me):

- fix for a bug in output to different directories,
- support for output to different directories and groups in tup parser.

It would be really great to have a point release, so thanks in advance!

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] FUSE is a problem

2014-09-08 Thread Freddie Chopin

W dniu 2014-09-08 19:38, Steve Atkins pisze:

Being able to take a tup configuration and spit out a shell script
(or, even better, a Makefile) that'd perform the same steps as a full
build would help with all of those cases. Is that possible?


Such feature is implemented since a few months, but actually it's 
another thing that does not work on Windows (;


It's called tup generate, and I believe that the syntax is:
tup generate name of shell script to produce.sh

It's not documented in the manual, but there was some info on the list 
and you can see it in tests:

https://github.com/gittup/tup/blob/master/test/t2175-generate-shell-script.sh
https://github.com/gittup/tup/blob/master/test/t2177-generate-shell-script2.sh

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Unspecified output files in case of dynamic output files

2014-08-13 Thread Freddie Chopin

W dniu 2014-08-13 15:21, Rico Beier pisze:

It is a list of NAME, ID, which is processed by a script which checks
the Name with the online-name-to-the-id and then downloads the file. It
should be possible to allow those kind of dynamic outputs. Think of
uncompressing a compressed file...


Just use Makefile to do this first step. It's much easier to leave tup 
only for compilation. Things like generation of unknown number of files 
with unknown names just don't fit tup and it's compilation model - 
personally I don't see a big problem in it, because - as I said numerous 
times - this can easily be done with Makefile or whatever tool you have 
(doxygen, ...), and these steps don't make much sense in tup anyway... 
This is of course just my personal opinion, you may or may not agree. 
Make has spoiled us with it's features that go far beyond compilation, 
but tup is just for compilation/building - there is no install, 
uninstall, clean, package or whatever (probably some of these steps can 
actually be done with tup).


For example something like that in your Makefile would work:

.do_first_step: list.txt
# complicated step that does the initial download etc.
# ...
# ...
# ...
# ...
# ...
# ...
touch .do_first_step

all: .do_first_step
tup

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] How to print TUP vars in error messages ?

2014-08-12 Thread Freddie Chopin

W dniu 2014-08-12 14:31, BogDan Vatra pisze:

Hi,

I'm using the following code to check if TUP_ARCH is set to my supported
archs:

ifeq (@(TUP_ARCH),x86_64)
 CFLAGS = -m64 -march=core2
else
 ifeq (@(TUP_ARCH),i386)
 CFLAGS = -m32 -march=i686
 else
# The problem is here, I want to print also the TUP_ARCH in the error
message
 error @(TUP_ARCH)  is not a valid architecture

# I tried different combinations but none it seems to work, what am I
doing wrong ?
#error @(TUP_ARCH)  +  is not a valid architecture
#error @(TUP_ARCH)  is not a valid architecture
# etc.
 endif
endif

Cheers,
BogDan.


Maybe it would be possible in lua, but in original tup-parser it's 
probably not possible.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Quickfix mode for tup?

2014-08-11 Thread Freddie Chopin

W dniu 2014-08-11 17:52, stevek pisze:

Well, sort-of. It prints the path to the variant folder, not the source
folder.
I don't see how one can in general tell whether a build variant is being
used or not.
Perhaps changing the output format slightly would be enough.


I haven't used variants, as this does not work on Windows, but without 
variants the path printed is the path from root of project to the 
Tupfile that has the executed command. This path is usually the path to 
the source, as long as you compile the file with no path (so gcc 
main.c, not gcc sub/folder/main.c).


From my point of view this is functionally identical to the way 
recursive make works - instead of looking for these entering/leaving 
messages, you have that info right in front of each command.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup on 64bit Windows

2014-08-08 Thread Freddie Chopin
Just to clarify - standard binaries from the website work on Windows as
long as the application being run is 32-bit. System can be 64-bit. I'm
using tup for over a year on Windows 7 64-bit with gcc.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Quickfix mode for tup?

2014-08-08 Thread Freddie Chopin

W dniu 2014-08-07 13:59, stevek pisze:

Does tup have any editor integration where it allows the editor to jump
to the line with the compile error?
(e.g. type :make from within vim)

Of course, for this to work, tup would have to lose all its pretty
progress bars and colours etc.
But in a perfect world, tup could run with colours etc in another
(persistent) tty while still allowing
the plain console output that editors want.


In Eclipse you can define your own error parser that will catch tup 
error messages and link them to file/line mentioned in the error. I've 
done such error parser but only partially - it just catches all the 
tup output and ignores that. The next step is to actually parse the 
messages that are useful (if that's possible).


https://groups.google.com/forum/#!topic/tup-users/7qNxtgh9Z-s

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Re: Wildcard rules that ignore files with a particular prefix

2014-07-26 Thread Freddie Chopin

W dniu 2014-07-26 20:07, venkatakrishnarao ks pisze:


Hi Mike,
Could you please give an example for using generate source file as
input file from a different directory than
the current compilation via groups?

I've been having tough time implementing this with Lua parser.
My source code is generated by the RMI compiler in
directory cpp/aam/dm/management/idl/
My compilation runs in axcsw/src/aam/dm/management/rndsettings, but this
has to use the IDL generated source file from the above directory,
plus, some source files found in this source directory.

I've a feeling that Tup has a bug in this feature, as it is failing to
recognize %group_name where my group_name is a group from a
different dir.
I've built tup from master as of today.

Regards,
venkrao



Groups are directory-specific, so if in folder a/ you add something to 
group and in folder b/ you require something from group you actually 
have two different containers. That's why you usually reference groups 
from top-level directory, using TUP_CWD.


Here is a good example of what you want:


d:\1\tupls -R
.:
Tuprules.lua  a  b

./a:
Tupfile.lua

./b:
Tupfile.lua

d:\1\tupcat Tuprules.lua
TOP = tup.getcwd()

d:\1\tupcat a/Tupfile.lua
tup.rule({}, echo generate  %o, {generated.txt, TOP .. /generated})

d:\1\tupcat b/Tupfile.lua
tup.rule({TOP .. /generated}, echo %generated  %o, {generated-files.tx
t})

d:\1\tuptup init
.tup repository initialized.

d:\1\tuptup
[ tup ] [0.091s] Scanning filesystem...
[ tup ] [0.239s] Reading in new environment variables...
[ tup ] [0.447s] Parsing Tupfiles...
 1) [0.001s] .
 2) [0.002s] a
 3) [0.002s] b
 [   ] 100%
[ tup ] [0.456s] No files to delete.
[ tup ] [0.457s] Checking circular dependencies among groups...
[ tup ] [0.457s] Generating .gitignore files...
[ tup ] [0.558s] Executing Commands...
 1) [0.021s] a: echo generate  generated.txt
 2) [0.019s] b: echo %generated  generated-files.txt
 [  ] 100%
[ tup ] [0.697s] Updated.

d:\1\tupls -R
.:
Tuprules.lua  a  b

./a:
Tupfile.lua  generated.txt

./b:
Tupfile.lua  generated-files.txt

d:\1\tupcat a/generated.txt
generate

d:\1\tupcat b/generated-files.txt
../a/generated.txt

d:\1\tup


Hope this helps a bit (;

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup scalability and outputs in a large project

2014-06-20 Thread Freddie Chopin

W dniu 2014-06-20 06:35, Evgenii pisze:

*Q2: *Somewhat related question: The outputs must go into the same
directory as the tupfile (I wish it wasn't the case!). To avoid mixing
source and outputs, I am planning to always store tupfile in some
generator subdirectory of the related source files. Then I would need
to copy/move the outputs to the output tree, which is where I actually
want them. Copying 10 GB will take significant time, plus extra disk
space. Moving them would trigger full rebuild by tup upd next time (I
assume). What is the recommended approach to reduce the penalty in this
situation?


Tupfile can both read files from anywhere and write them anywhere.

Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup scalability and outputs in a large project

2014-06-20 Thread Freddie Chopin

W dniu 2014-06-20 23:54, Evgenii pisze:

I would really prefer Python parser. I've never heard of Lua before I
read about Tup. There will be several people working on the project, and
most of them probably never heard of Lua either.


Don't judge so fast. Lua is a popular scripting language (small and fast 
- because it was originally targeted for embedded chips), the fact that 
you did not hear about it doesn't say much about Lua. On the other hand 
- it says a bit about you...



While there are really good introduction examples for using tupfiles,
there's nothing for using Lua other than one page API description.


There are some examples on the page and a lot of info on this list.


On
the other hand, sometimes I would need to run calculation to figure the
list of inputs and outputs, so without a scripting support this could be
tricky.


Then it's good that Lua is a scripting language. If that's not enough 
you can always run external shell script, which can run whatever you 
imagine - as long as it outputs valid tup rules to stdout.



In the face of these uncertainties I might have to go with
SCons, although it is reportedly very slow :( I've already tried Waf and
found it not intuitive at all.


How do you think python would work here? Both SCons and WAF use python, 
both are slow and complex - do you see a pattern here? (;


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Cross-build same source for many hardware variants using tup

2014-06-08 Thread Freddie Chopin

W dniu 2014-06-08 11:50, venkatakrishnarao ks pisze:

1. tup expects that files are produced in the same directory as that of
Tupfile.


This is not true. It worked like that some time ago, but now tup can 
output files anywhere.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Accessing {bin}'s within a command?

2014-05-25 Thread Freddie Chopin

W dniu 2014-05-25 09:17, thegreendroid pisze:

Hi FCh,

Yes I understand that it can be used as an order only input dependency,
however my executables won't link without explicitly specifying the
object files to the linker in that command.


It can be used as a normal dependancy, just NOT directly in the command 
string.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Is it possible to create a generated header which contains the git hash?

2014-05-20 Thread Freddie Chopin
On the other hand - I guess that this 
tup-doesn't-like-dot-directories-and-files is meant for ignoring .tup 
and maybe build directories in fuse filesystem, so maybe it would be 
possible to change tup's behavior to ignore only these directories 
explicitly, instead of ALL hidden directories?


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] failed to process input dependencies

2014-02-13 Thread Freddie Chopin
You should have the library listed in order only inputs. This is 
described in one of the examples on the page.


Regards,
FCh

--
--
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
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 tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.