tero@715: INCLUDE_CACHE='var/include-cache' tero@715: tero@715: ## Normalize a given source path for use in the include-cache tero@715: function include_cache_path { tero@715: local src="$1" tero@715: local cache="$src" tero@715: tero@715: cache="${cache//_/__}" tero@715: cache="${cache//\//_}" tero@715: tero@715: echo "$INCLUDE_CACHE/$cache" tero@715: } tero@715: tero@715: ## Read the include cache for given path tero@715: function include_cache { tero@715: local cache="$1" tero@715: tero@715: if [ ! -e "$cache" ]; then tero@715: debug "missing: $cache" tero@715: tero@715: return 0 tero@715: fi tero@715: tero@715: cat $cache tero@715: } tero@715: