Search code examples
clearcaseomake

Is there any other way to format my %echo output in OMAKE (Instead of using cygwin printf.exe but using any localized syntax of OMAKE it self)


The below I have pasted two approaches, but the second approach does not gives good structured output like the approach 1 does.

Please suggest me how to get the same good font with OMAKE internal syntaxes if any:

  • approach 1:

    @:$(CC_WORKING_VIEW)/tools/Cygwin/bin/print '%-26s -%s\n' "$(target)" "$($(target)_DESCRIPTION)"
    

Or:

  • approach 2:

    # %echo "$(target)"                  "$($(target)_DESCRIPTION)"
    

Solution

  • echo alone would not support padding, as print or printf does.

    As long as Cygwin/bin is in your $PATH (or %PATH% on Windows), you should be able to use directly printf:

    printf '%-26s -%s\n' "$(target)" "$($(target)_DESCRIPTION)"
    

    You can echo your %PATH% in your omake makefile, as shown in this technote.

    PATH=$(CWD)\buildtools;$(PATH)
    # %setenv PATH=$(PATH)
    
    all:
     echo %PATH%