我使用一个makefile,为了创建一个库,我使用了一个.pc文件,如下所示
current_path=`readlink -e .`
cat > lib/libmy.pc << EOM
prefix=$current_path
includedir=\${prefix}/inc
libdir=\${prefix}/lib
Name: my
Description: My library
Version: 1.0
Cflags: -I\${includedir}
Libs: -L\${libdir} -lmy
Libs.private: -lm
EOM问题是,在mac上,-e标志不起作用(即使我安装了coreutils)。我有办法替换旗子吗?
发布于 2019-07-27 18:56:35
我能找到的最便携的方式:
current_path=`python -c "import os; print(os.path.abspath('${MY_AWESOME_PATH}'))"`就你而言:
current_path=`python -c "import os; print(os.path.abspath('.'))"`https://stackoverflow.com/questions/57195470
复制相似问题