Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: RPM completion in dev19 and a suggested change to make completion



>
>   [[ -n "$file" ]] && _wanted targets expl 'make target' &&
>       compadd "$expl[@]" - \
> 		$(make -f $file -p aaaaa 2>&1 | awk -F:
> '/^[a-zA-Z0-9][^\/ \t]+:/ {print $1}' | grep -v aaaaa) && ret=0
>
> # This is the old code
> #          $(awk '/^[a-zA-Z0-9][^\/ \t]+:/ {print $1}
> # 	      /^\.include  *<bsd\.port\.(subdir\.|pre\.)?mk>/
> || /^\.include  *".*mk\/bsd\.pkg\.(subdir\.)?mk"/ {
> # 	        print "fetch fetch-list extract patch configure
> build install reinstall deinstall package describe checkpatch
> checksum makesum" }' \
> # 	     FS=: $file) && ret=0
>   (( ret )) && { compset -P 1 '*='; _files }
> fi
> --------
>
> With this, for example, make <TAB> in the kernel sources "sees" target
> bzImage while it doesn't see it in the original version. Comments?
>


At least, check if it is GNU make or not. In my case:

bor@itsrm2% make -p dkfksjkfl |& grep modules
uninstall.modules:
uninstall: uninstall.bin  uninstall.modules  uninstall.man
uninstall.fns
.SUFFIXES:install.modules:
install: install.bin  install.modules  install.man  install.fns
bor@itsrm2% gmake -p dkfksjkfl |& grep modules
uninstall.modules:
install.modules:
uninstall: uninstall.bin uninstall.modules uninstall.man uninstall.fns
install: install.bin install.modules install.man install.fns

As you see, GNU make lists install.modules as target but native make
does not.

And what happens, if it does have "aaaaa" target? :-)

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author