Hello!
In the original tup parser you can have something like this:
!cc = |> $(CC) $(CFLAGS) $(CFLAGS_%f) -c %f -o %o |> %B.o
And with that you can add special flags for specific files like that:
CFLAGS_my-special-file.c = -DWHATEVER=1
This is not so easy in lua parser... Of course the definition of rule
doesn't change much:
function compile_all(inputs)
tup.foreach_rule(inputs, "$(CXX) $(CXXFLAGS) $(CXXFLAGS_%f) -c %f -o
%o", {'%B.o'})
end
But this won't work, first of all because of the dot which you have in
files:
tup error [string "Tupfile.lua"]:23: attempt to index global
'CFLAGS_my_special_file' (a nil value)
this can probably be easily solved by referring to base name of file
only, but the problem with "strange" characters in file names remain.
For example - in the above example it would first fail because of the
hyphen in the name:
tup error [string "Tupfile.lua"]:23: syntax error near '-'
Is there a cleaver lua alternative to this syntax? I don't know much
about lua syntax, so I'm counting on someone more experienced!
Thx in advance!
Regards,
FCh
--
--
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/d/optout.