[Cook] using /* in non-comment parsing

Aryeh M. Friedman aryeh at m-net.arbornet.org
Mon Mar 17 01:30:40 EST 2003


I need to do something like this:

	ls foo/ack/*/bar 

Yes I know I should do ls foo/ack/%/bar of foo/ack/%3/bar but I can't
because % is already assigned by the recipe to be something else namely the
real ls I want to do is:

ls foo/%/*/bar.h

Here is the real recipe with a comment of what I want to do (if you want the
COMPLETE background I whoul be happy to send the aegis tutorial I am writing
[the actual recipe is from a real project but is also an example in the 
tutorial]):

[libsrc_dir]/%/[test_prog]:
        [target].o
{
        echo Building [target];

	/* I need to get a list of all sub-directoris [actually sub-libs]
	   of [libsrc_dir]/% and the way to do that is match_mask OR collect
	   the ls of [libsrc_dir]/%/*/includes.h */

        [CXX] [CXXFLAGS] [target].o
              -l% [addprefix -l [Get_Libs [target].o]]
              [CXXOUTFLAG] [target];

}

Here is the problem even if I set match-mode-regex it still thinks the the
/* is the beginning of a comment.  BUT if I escape it in any way (\. ' or ")
it fails to actually see it as a regex.  How do I get it to not be a comment
and/or not processed as foo/%/\*/includes.h [this being the literal regular
expression not the one passed on the command line].

	--Aryeh



More information about the Cook-users mailing list