[Omake] Newbie: removing quotes for command

Aleksey Nogin anogin at hrl.com
Thu Mar 22 10:49:59 PDT 2007


On 22.03.2007 01:16, Hugo Ferreira wrote:

>> % ls $(addprefix f, *)
>> foo
>> % ls $"$(addprefix f, *)"
>> /bin/ls: f*: No such file or directory
>> - : <exit-code 1> : Int
>> % ls $(addprefix f, $"*")
>> /bin/ls: f*: No such file or directory
>> - : <exit-code 1> : Int
>>
> 
> A parenthesis here: I did these tests above in version 0.9.6.5 and all 3
> options worked. I am assuming this is inconsistent behavior that has
> been corrected in the latest versions.

Right, prior to 0.9.8, the command line would be converted to a string 
and then parsed back (according to the normal shell rules). In the 
process lots of information (such as which symbols were quoted and which 
were not, where the item boundaries were, etc) was lost or garbled. In 
0.9.8 this was changed to converting OMake values directly into argument 
lists (without an intermediate string representation), which made it 
much more consistent and predictable. This is probably the single 
biggest difference since 0.9.6.5.

>> What version of OMake are you currently using? 
> 
> I have 0.9.6.5.
> I can try using the "unstable" version 0.9.6.9 (later versions are not
> available).

That might be an option. Also, I just wrote to Mike Furr (the packager 
of OMake for Debian) asking about 0.9.8.1. If Mike no longer has 
time/interest in this, we can probably try funding another way of 
providing people with the Debian binaries of the latest OMake.

>> Unless you are using something very ancient, it might be easier to try 
>> backporting a newer OCaml.om (at least the relevant parts of it) than 
>> to write one from scratch. An additional benefit of backporting, of 
>> course, is that it should then be easier to switch to a more recent 
>> version of OMake in the future.
>>
> 
> I figure to limit myself to an include and a single target:
> MenhirMulti(libparse, parse.mly, $(MENHIR_FLAGS))
> 
> When I get a new version of OMake I need only:
> 1. Use the flag above as is
> 2. Add the MENHIR_ENABLED (set to true).
> 3. Remove 2 flags currently used by the include not used by the OMake 
> system
> 
Well, to make things work right, OMake needs to know all the 
dependencies. You'd either have to specify all of them manually (very 
painful), try to figure all of them with ocamldep once and then hardcode 
the result (also not very nice) or backport the OCaml.om in order to get 
the .SCANNER rules working (not very trivial for menhir).

Aleksey

-- 
Aleksey Nogin, Research Staff Member
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA


More information about the Omake mailing list