Non-portable realpath option in hadrian bindist Makefile
Commit 04b4b984 added hadrian/bindist/Makefile
in which one of the rules uses realpath
with a Linux-specific option:
PKG_CONFS = $(shell find "$(ActualLibsDir)/package.conf.d" -name '*.conf' | sed 's: :xxx:g')
update_package_db: install_bin install_lib
@echo "$(PKG_CONFS)"
@echo "Updating the package DB"
$(foreach p, $(PKG_CONFS),\
$(call patchpackageconf,$(shell echo $(notdir $p) | sed 's/-\([0-9]*[0-9]\.\)*conf//g'),$(shell echo "$p" | sed 's:xxx: :g'),$(docdir),$(shell realpath --relative-to="$(libdir)" "$(docdir)")))
'$(WrapperBinsDir)/ghc-pkg' recache
The --relative-to
option is not portable. I'm not sure what this code is trying to do, and so not clear whether the use of realpath
here is merely cosmetic, or actually important...