Re: "Macro" expansion

Will Partain <[email protected]>
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <[email protected]>
Matt asks:

> 1) Where exactly can I use macro expansion of the form @foo:bar@ ?

It is not as precisely defined as it will need to be, but
the current rough answer is: in values (strings, tables
[both keys and values, after a patch this week], lists, and
code).

I will append my sample1/team.xml, which is the best example
right now.

Currently, the engine wants to see a <param> on the field
before it will do the macro expansion (which may or may not
use the param).

> ... For instance the following would be very nice:
> <dependency type="essential" name="qt" version-spec="== @param:QT_VERSION@"/>

An interesting possibility, but no we don't do that now.


> 2) Currently we can look up into certain tables ...
> . It would be Really Nice if we could do this for any
> arbitrary table field, not just ark-dirs.

You can.  See example below.

> What do you think?

You'll help me write the semantics part of the ARK conf-lang
for this :-?

Will

======================================
<team name="sample1" xml-version="1">
<description>
  A Sidai-style sample Arusha *site*
</description>

<contacts><list>
  <item>[email protected]</item>
</list></contacts>

<!-- *** CONFIGURE-ME *** -->
<!-- test-dir: area where you want ARK to put its dribblings;
     can be removed afterward.
  -->
<test-dir>/workspace/partain/try-ark</test-dir>

<!-- ark-src-dir: where your ARK source is, for all teams
     of interest (including your own).
  -->
<ark-src-dir>/workspace/partain/ark</ark-src-dir>

<!-- open-src-dir: where you keep your stash of
     open-source tarballs
  -->
<open-src-dir>/d/open-src</open-src-dir>

<!-- the single host to use for your sample1 test;
     you will need to prepare a your-team/host/slicker.xml
     (named appropriately) file.
  -->
<solo-host>slicker</solo-host>

<!-- the proto-host that characterizes your single host;
     you will need to prepare a your-team/host/sparc-solaris.xml
     (named appropriately) file.
  -->
<solo-host-type>sparc-solaris</solo-host-type>
<!-- *** END OF: CONFIGURE-ME *** -->

<ark-dirs>
  <param name="TEST_DIR">@team:test-dir@</param>
  <param name="SRC_DIR">@team:ark-src-dir@</param>
  <table>
  <entry name="ARK_SRC"> @param:SRC_DIR@ </entry>
  <entry name="ARK_STATE"> @param:TEST_DIR@/ark-state </entry>
  <entry name="OUR"> @param:TEST_DIR@/our </entry>
  <entry name="OUR_DEPLOY"> @param:TEST_DIR@/ark-deploy-host1 </entry>
  </table>
</ark-dirs>
</team>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.