Hi Andrew, On Mon, Nov 25, 2013 at 5:31 AM, Andrew Wagner <[email protected]> wrote:
> On Sun, Nov 24, 2013 at 5:05 PM, Mike Shal <[email protected]> wrote: > > On Fri, Nov 22, 2013 at 8:59 AM, Andrew Wagner <[email protected]> > wrote: > >> > >> Is there a way to escape filenames with spaces in a Tupfile? This is > >> for neil's build-shootout. > > > > The default Tupfile parser does not because it was designed for > > compatibility with data-driven Makefiles. > > I'm confused. There is ~no compability with Makefile syntax whatsoever... > By "data-driven Makefiles" I mean Makefiles that just set variables. In some setups you'll have a per-directory Makefile that sets things like CFLAGS, or a list of files to compile, but won't have any actual make rules. The rules are then contained in some other file/directory specific to make. For example, in the linux kernel, a file like fs/ext3/Makefile is parseable by both make and tup. The actual rules that handle that data in make are not useable by tup, but it has the same syntax for variable definitions and if-statements for some minor compatibility. > > As a side note, does the parser support any multi-line syntax for > rules? I often go past one line and it makes my Tupfiles less > readable. There maybe cases where I'd bee too lazy to refactor a rule > into temporary variables, but I might thrown in an escape character... > You should be able to continue long lines with a backslash. > > > The Lua parser should because we can easily create a list of files like: > > > > inputs = {'foo.txt', 'input with spaces.txt'} > > > > However, due to some code re-use between the Lua & regular Tupfile > parsers, > > this is currently broken. This is a bug so I've filed an issue: > > https://github.com/gittup/tup/issues/151 > > I think my guru once told me that this particular bug in make was "too > old to fix." It doesn't seem like it should be ~that hard and you > could just defer to bash on how to escape things, but I'm not a > language designer. > > This issue is now fixed in the Lua parser. The Tupfile parser doesn't have a good way to delimit files with spaces at the moment, but I don't see why it couldn't be added if someone found it necessary. Thanks, -Mike -- -- tup-users mailing list email: [email protected] unsubscribe: [email protected] options: http://groups.google.com/group/tup-users?hl=en --- You received this message because you are subscribed to the Google Groups "tup-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
