[Omake] Re: [PATCH] Added a test case for .SUBDIRS problem

David Kågedal davidk at lysator.liu.se
Wed Jun 6 03:01:18 PDT 2007


David Kågedal <davidk at lysator.liu.se> writes:

> Here is another test case that broke my old omake scripts that used to
> work a year ago or so.
>
> The problem is that the ".SUBDIRS: y" line is interpreted so that y is
> assumed to be inside x for some reason.  It seems that the "current
> directory" is getting exported by "export" or something like that.

After rereading the documentation, it seems that this is the
documented behaviour of export.  But for .SUBDIRS sections, I don't
see much sense in that.

By the way, is there a difference between

    .SUBDIRS: x
        ...

and

    section
        cd x
        ...

?

> diff --git a/tests/simple/Test2/OMakefile b/tests/simple/Test2/OMakefile
> new file mode 100644
> index 0000000..e13f840
> --- /dev/null
> +++ b/tests/simple/Test2/OMakefile
> @@ -0,0 +1,7 @@
> +.SUBDIRS: a
> +    .SUBDIRS: x
> +        X = 1
> +        export
> +    .SUBDIRS: y
> +        Y = 1
> +        export
> diff --git a/tests/simple/Test2/OMakeroot b/tests/simple/Test2/OMakeroot
> new file mode 100644
> index 0000000..a3e9d00
> --- /dev/null
> +++ b/tests/simple/Test2/OMakeroot
> @@ -0,0 +1,2 @@
> +include $(STDROOT)
> +.SUBDIRS: .
> diff --git a/tests/simple/Test2/a/x/.dummy b/tests/simple/Test2/a/x/.dummy
> new file mode 100644
> index 0000000..9c558e3
> --- /dev/null
> +++ b/tests/simple/Test2/a/x/.dummy
> @@ -0,0 +1 @@
> +.
> diff --git a/tests/simple/Test2/a/y/.dummy b/tests/simple/Test2/a/y/.dummy
> new file mode 100644
> index 0000000..9c558e3
> --- /dev/null
> +++ b/tests/simple/Test2/a/y/.dummy
> @@ -0,0 +1 @@
> +.

-- 
David Kågedal



More information about the Omake mailing list