gnulib-tool-py
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnulib-tool-py] Getting cached values of variables


From: Bruno Haible
Subject: Re: [gnulib-tool-py] Getting cached values of variables
Date: Fri, 18 May 2012 01:33:58 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

Dmitriy Selyutin wrote:
> Am I correct that the structure of gl_MODULES is always the same?
> 
> gl_MODULES([
>   module1
>   module2
>   module3
> ])
> 
> If yes, we can simply get all what is inside the parenthesis and then
> delete the spaces in the beginning for each module. Am I right?

Yes. This is what the 'sed' program

      /gl_MODULES(/ {
        ta
        :a
          s/)/)/
          tb
          N
          ba
        :b
        s,^.*gl_MODULES([[ ]*\([^]"$`\\)]*\).*$,cached_specified_modules="\1",p
      }

is doing. Find a nice way to do this in Python, and you got this part
done. The other parts (gl_LOCAL_DIR etc.) are even simpler, because
once you have found the line, all processing takes place in a single line.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]