last bit of ccache
This commit is contained in:
parent
0b151f1749
commit
9f5c2796d7
97
src/_ccache
97
src/_ccache
|
@ -64,6 +64,18 @@ _ccache_compressionlevels() {
|
|||
_describe -t onetonine "compression level (if using compression)" one_nine
|
||||
}
|
||||
|
||||
(( $+functions[_ccache_sloppiness] )) ||
|
||||
_ccache_sloppiness() {
|
||||
_values -s ',' \
|
||||
"file_macro[ignore __FILE__]" \
|
||||
"file_stat_matches[rely on mtimes and ctimes]" \
|
||||
"include_file_ctime[ignore headers' ctime too new]" \
|
||||
"include_file_mtime[ignore headers' mtime too new]" \
|
||||
"no_system_headers[exclude system headers from cache]" \
|
||||
"pch_defines[be sloppy about #defines in pch]" \
|
||||
"time_macros[ignore __date__ and __time__]"
|
||||
}
|
||||
|
||||
(( $+functions[_ccache_compilerchecks] )) ||
|
||||
_ccache_compilerchecks() {
|
||||
local -a compiler_check_values
|
||||
|
@ -109,7 +121,7 @@ if [[ "$service" = -value-* ]]; then
|
|||
_ccache_compressionlevels
|
||||
;;
|
||||
*CCACHE_EXTENSION*)
|
||||
# FIXME
|
||||
_alternative ':set extension for intermediate files: '
|
||||
;;
|
||||
*CCACHE_*DIRECT*)
|
||||
_ccache_booleans "use direct mode"
|
||||
|
@ -146,15 +158,16 @@ if [[ "$service" = -value-* ]]; then
|
|||
_alternative ":maximum number of files in the cache (0= no limit): "
|
||||
;;
|
||||
*CCACHE_MAXSIZE*)
|
||||
_alternative ':maximum cache size (0= no limit) with suffix k,M,G,T or Ki,Mi,Gi,Ti: '
|
||||
;;
|
||||
*CCACHE_PATH*)
|
||||
_alternative ':PATH for compiler lookup (instead of $PATH):_dir_list'
|
||||
;;
|
||||
*CCACHE_PREFIX*)
|
||||
# FIXME
|
||||
_alternative ':prefixes for compiler invokation: '
|
||||
;;
|
||||
*CCACHE_PREFIX_CPP*)
|
||||
# FIXME
|
||||
_alternative ':prefixes for preprocessor invokation: '
|
||||
;;
|
||||
*CCACHE_*READONLY*)
|
||||
_ccache_booleans "treat cache as read-only"
|
||||
|
@ -169,13 +182,13 @@ if [[ "$service" = -value-* ]]; then
|
|||
_ccache_booleans "pass originial rather than preprocessed source code to compiler"
|
||||
;;
|
||||
*CCACHE_SLOPPINESS*)
|
||||
# FIXME
|
||||
_ccache_sloppiness
|
||||
;;
|
||||
*CCACHE_*STATS*)
|
||||
_ccache_booleans "update statistics counters"
|
||||
;;
|
||||
*CCACHE_UMASK*)
|
||||
# FIXME
|
||||
_alternative ":umask value (octal): "
|
||||
;;
|
||||
*CCACHE_*UNIFY*)
|
||||
_ccache_booleans "normalise sources prior to processing"
|
||||
|
@ -188,37 +201,37 @@ fi
|
|||
__ccache_config_keys() {
|
||||
local -a keys
|
||||
keys=(
|
||||
'compression'
|
||||
'direct_mode'
|
||||
'disable'
|
||||
'hard_link'
|
||||
'hash_dir'
|
||||
'keep_comments_cpp'
|
||||
'read_only'
|
||||
'read_only_direct'
|
||||
'recache'
|
||||
'run_second_cpp'
|
||||
'stats'
|
||||
'unify'
|
||||
'base_dir'
|
||||
'temporary_dir'
|
||||
'cache_dir'
|
||||
'compiler'
|
||||
'cache_dir_levels'
|
||||
'compiler_check'
|
||||
'compression_level'
|
||||
'cpp_extension'
|
||||
'extra_files_to_hash'
|
||||
'ignore_headers_in_manifest'
|
||||
'limit_multiple'
|
||||
'log_file'
|
||||
'max_files'
|
||||
'max_size'
|
||||
'path'
|
||||
'prefix_command'
|
||||
'prefix_command_cpp'
|
||||
'sloppiness'
|
||||
'umask'
|
||||
'compression:write compressed cache'
|
||||
'direct_mode:use direct mode'
|
||||
'disable:disable cache usage'
|
||||
'hard_link:create hard links rather than copies'
|
||||
'hash_dir:include the cwd in the hash'
|
||||
'keep_comments_cpp:consider comments in hashing'
|
||||
'read_only:treat cache as read-only'
|
||||
'read_only_direct:retrieve from read-only cache in direct mode'
|
||||
'recache:use cache in write-only mode'
|
||||
'run_second_cpp:pass originial rather than preprocessed source code to compiler'
|
||||
'stats:update statistics counters'
|
||||
'unify:normalise sources prior to processing'
|
||||
'base_dir:specify relative to which top level paths are hashed'
|
||||
'temporary_dir:specify where temporary files are kept'
|
||||
'cache_dir:specify where the cache is kept'
|
||||
'compiler:specify compiler'
|
||||
'cache_dir_levels:directory levels in the cache directory'
|
||||
'compiler_check:compiler information included in the hash'
|
||||
'compression_level:cache compression level'
|
||||
'cpp_extension:set extensions for intermediate files'
|
||||
'extra_files_to_hash:additional files to consider in hashing'
|
||||
'ignore_headers_in_manifest:set paths to headers to ignore in hashing'
|
||||
'limit_multiple:cleanup level'
|
||||
'log_file:specify a log file'
|
||||
'max_files:maximum number of files in the cache'
|
||||
'max_size:maximum size of the cache'
|
||||
'path:PATH for compiler lookup (instead of $PATH)'
|
||||
'prefix_command:prefixes for compiler invokation'
|
||||
'prefix_command_cpp:prefixes for preprocessor invokation'
|
||||
'sloppiness:hash files sloppy'
|
||||
'umask:set umask for ccache and child processes (e.g. for sharing cache)'
|
||||
)
|
||||
_describe -t configkeys "configuration keys" keys -S '='
|
||||
}
|
||||
|
@ -248,7 +261,7 @@ if compset -P '--set-config=*='; then
|
|||
_ccache_compressionlevels
|
||||
;;
|
||||
*=cpp_extension=)
|
||||
# FIXME
|
||||
_alternative ':set extension for intermediate files: '
|
||||
;;
|
||||
*=extra_files_to_hash=)
|
||||
local sep=:
|
||||
|
@ -270,22 +283,22 @@ if compset -P '--set-config=*='; then
|
|||
_alternative ":maximum number of files in the cache (0= no limit): "
|
||||
;;
|
||||
*=max_size=)
|
||||
# FIXME
|
||||
_alternative ':maximum cache size (0= no limit) with suffix k,M,G,T or Ki,Mi,Gi,Ti: '
|
||||
;;
|
||||
*=path=)
|
||||
_alternative ':PATH for compiler lookup (instead of $PATH):_dir_list'
|
||||
;;
|
||||
*=prefix_command=)
|
||||
# FIXME
|
||||
_alternative ':prefixes for compiler invokation: '
|
||||
;;
|
||||
*=prefix_command_cpp=)
|
||||
# FIXME
|
||||
_alternative ':prefixes for preprocessor invokation: '
|
||||
;;
|
||||
*=sloppiness=)
|
||||
# FIXME
|
||||
_ccache_sloppiness
|
||||
;;
|
||||
*=umask=)
|
||||
# FIXME
|
||||
_alternative ":umask value (octal): "
|
||||
;;
|
||||
esac
|
||||
elif [[ $words[2] == -* ]]; then
|
||||
|
|
Loading…
Reference in New Issue