Skip to content

Conversation

@iguessthislldo
Copy link
Member

@iguessthislldo iguessthislldo commented Aug 5, 2019

Modified the file_manipulation command:

If the tag isn't self closing, all WHOLE lines between the <command> and </command> tags will be treated as an almost raw output option. It's almost raw because like in standard XML and HTML, you should replace > with &gt;, < with &lt;, and & with &amp;.

As an example, a line from one of our configs:

  <command name="file_manipulation"  options="type=create file=setenv.sh output='ACE_ROOT=\x22${ACE_WORKSPACE}/ATCD/ACE\x22; export ACE_ROOT\nCIAO_ROOT=\x22${ACE_WORKSPACE}/ATCD/CIAO\x22; export CIAO_ROOT\nDANCE_ROOT=\x22${ACE_WORKSPACE}/ATCD/DAnCE\x22; export DANCE_ROOT\nDDS_ROOT=\x22${WORKSPACE}/OpenDDS\x22; export DDS_ROOT\nLD_LIBRARY_PATH=\x22/usr/sfw/lib:/usr/local/lib:${WORKSPACE}/OpenDDS/lib:${ACE_WORKSPACE}/ATCD/ACE/lib:\x22; export LD_LIBRARY_PATH\nMPC_ROOT=\x22/home/taoadmin/MPC\x22; export MPC_ROOT\nOPENDDS_RTPS_DEFAULT_D0=\x22146\x22; export OPENDDS_RTPS_DEFAULT_D0\nPATH=\x22${WORKSPACE}/OpenDDS/bin:${ACE_WORKSPACE}/ATCD/ACE/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ccs/bin:\x22; export PATH\nTAO_ROOT=\x22${ACE_WORKSPACE}/ATCD/TAO\x22; export TAO_ROOT\n'"/>

Could be rewritten as:

  <command name="file_manipulation"  options="type=create file=setenv.sh">
export ACE_ROOT="${ACE_WORKSPACE}/ATCD/ACE"
export CIAO_ROOT="${ACE_WORKSPACE}/ATCD/CIAO"
export DANCE_ROOT="${ACE_WORKSPACE}/ATCD/DAnCE"
export DDS_ROOT="${WORKSPACE}/OpenDDS"
export LD_LIBRARY_PATH="/usr/sfw/lib:/usr/local/lib:${WORKSPACE}/OpenDDS/lib:${ACE_WORKSPACE}/ATCD/ACE/lib:"
export MPC_ROOT="/home/taoadmin/MPC"
export OPENDDS_RTPS_DEFAULT_D0="146"
export PATH="${WORKSPACE}/OpenDDS/bin:${ACE_WORKSPACE}/ATCD/ACE/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ccs/bin:"
export TAO_ROOT="${ACE_WORKSPACE}/ATCD/TAO"
  </command>

Which is exponentially more readable.

@iguessthislldo iguessthislldo merged commit 409ff5e into DOCGroup:master Aug 21, 2019
@iguessthislldo iguessthislldo deleted the igtd/embedtext branch December 13, 2019 23:28
@iguessthislldo iguessthislldo mentioned this pull request Jan 18, 2020
iguessthislldo added a commit to iguessthislldo/autobuild that referenced this pull request Mar 24, 2021
This also adds new syntax for <arg> tags that go inside <command> tags.
This has been made backwards compatible with the syntax from
DOCGroup#19 which also uses the
contents of <command> tags as file output.

Finally this also adds a `cmake_cmd` to directly invoke CMake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant