REQUIRES specification

Norman Feske norman.feske at ...1...
Fri Mar 18 20:23:43 CET 2011

Hi Danial,

> Is it possible to use an OR condition for the "REQUIRES =" tag in a
> specs file?

No. But there are two alternatives use to work well for us. Assume, you
want to express something like

  REQUIRES = versatilepb | pbx

First, you may revisit the reason of why the OS condition is needed -
mostly it's because the two alternatives have something in common. For
example, a certain device accessed by the target, let's say pl0505, is
available on the 'versatilepb' as well as on 'pbx' platforms. So why not
introducing 'pl050' as a new SPEC value? Then the above declaration
would become

  REQUIRES = pl050

To avoid the manual enumeration of all spec details of 'versatilepb' in
'<build-dir>/etc/specs.conf', you can introduce a
'mk/' file that extends the 'SPECS' variable with all
parts that are available on the 'versatilebp' platform. Just take a look
at 'base/mk/' to see how this works.

Second, you can use two '' files, each residing in a different
subdirectory. Each is only extending the 'REQUIRES' variable by its
specific value ('REQUIRES += versatilepb' respectively 'REQUIRES +=
pbx'), and includes a common '' file ('include
$(PRG_DIR)/../') with all of the common parts of both targets.
For an example, you may have a look at 'os/src/ldso/' and

Best regards

Dr.-Ing. Norman Feske
Genode Labs ·

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

More information about the users mailing list