Opened 12 years ago

Closed 11 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:
Has a Patch: no Platform: All


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:

Change History (3)

comment:1 by mmu_man, 12 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;
    if [ "$prev" = "-d" ]; then
        COMPREPLY=($( compgen -W 'a c d m x $(seq 0 9)' -- $cur ));
        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 ));
            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;
            COMPREPLY=($( compgen -W "$_jam_targets_cache" -- $cur ));
    return 0

comment:2 by emitrax, 12 years ago

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

comment:3 by bonefish, 11 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.