Opened 17 years ago

Closed 16 years ago

#1883 closed enhancement (fixed)

Showing available jam targets

Reported by: kaliber Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

As I know there is no way to display available jam targets. It would be nice to have "help" target.

jam -q help

Available targets:
haiku-image
haiku-vmware-image
...

Change History (3)

comment:1 by mmu_man, 16 years ago

I use this as a completion function for jam, but it doesn't seem to pick all the possible targets (and it's slow):

_jam ()
{
    local cur prev jamfiles jf f jf2 ft iter targets;
    COMPREPLY=();
    cur=${COMP_WORDS[COMP_CWORD]};
    prev=${COMP_WORDS[COMP_CWORD-1]};
    if [ "$prev" = "-d" ]; then
        COMPREPLY=($( compgen -W 'a c d m x $(seq 0 9)' -- $cur ));
    else
        if [[ "$cur" == -* ]]; then
            COMPREPLY=($( compgen -W '-a \
                -da -dc -dd -dm -dx -d0 -d1 -d2 -d3 -d4 -d5 -d6 -d7 -d8 -d9 \
                -f -g -j -n -o -q -s -t -v' -- $cur ));
        else
            if [ -z "$_jam_targets_cache" ]; then
                echo -en " [building jam target cache...]\033[31D";
                _jam_targets_cache="$(jam -d 5a -n -q veryunlikelytargetonlyusedforbuildingtargetlist | grep '\(NotFile \|set targets  =\)' | sed 's/.*NotFile //;s/.*  = //;s/</\\</g;s/>/\\>/g;s/!/\\!/g')";
                echo -en "                               \033[31D";
                export _jam_targets_cache;
            fi;
            COMPREPLY=($( compgen -W "$_jam_targets_cache" -- $cur ));
        fi;
    fi;
    return 0
}

comment:2 by emitrax, 16 years ago

How about a static list instead of generating it at runtime?

comment:3 by bonefish, 16 years ago

Resolution: fixed
Status: newclosed

As of hrev29298 a help text is printed. It only says some words about build profiles, since that is the recommended method of building/updating Haiku. For further details UserBuildConfig.ReadMe is referenced. I consider this enough online help, so I'm closing this ticket.

Note: See TracTickets for help on using tickets.