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

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

Re: [gnulib-tool-py] Dependencies with different conditions


From: Bruno Haible
Subject: Re: [gnulib-tool-py] Dependencies with different conditions
Date: Sun, 08 Jul 2012 19:33:31 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

Hi Dmitriy,

> I've read your message several times and I'd be very glad if you tell me
> that I've understood you correctly.
> 
> For each module A in specified modules (user-defined +cached if not
> --import):
>   1. If module A not in avoids, we add it to self.modulecache and store
> that module is unconditional (set its condition to None; in old gnulib-tool
> we set condition to 'true' in such cases).
>   2. Then we get dependencies of the module, split them into modules and
> conditions and for each module B we do:
>     1). If module is user-defined one or has no conditions, we set
> condition to None.
> ...
>     5) Go to the next module B and repeat from 1).
>   3. Go to the next turn and repeat from 1.

Yes, this is the general algorithm.

>     2). If conddeps and testflags are disabled, we just add user-specified
> modules and the ones which have no conditions.
>     3). If testflags are enabled and conddeps are disabled, we disable
> modules which testflag is disabled.
>     4). If testflags and conddeps are both enabled: if module has
> condition, then we store somewhere that there is a condition from A to B
> and this condition is a string, else we add module as unconditional. We do
> it only if testflag of the module is disabled.

The processing of --with*tests flags is performed at a different level.
For a given module:
  - If there is a -tests module for the module, we add it to the dependencies
    (implicit dependency).
  - If a dependency is a test, we use the --with*tests flags to possibly drop
    it from the dependencies.
  - For the remaining (filtered) list of dependencies, we do the processing
    of conddeps.

These are 3 steps, to be performed in order. Don't mix them - or it makes
both your thinking and the code more complicated.

Bruno




reply via email to

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