CC_FOR_BUILD 宏定義問題

說明ide

        編譯indent-2.2.12出錯ui

/indent-2.2.12/man'
o texinfo2man ./texinfo2man.c
make[2]: o: Command not found
make[2]: [Makefile:546: texinfo2man] Error 127 (ignored)
./texinfo2man ./indent.1.in ./../doc/indent.texi > indent.1
/bin/sh: ./texinfo2man: No such file or directory
make[2]: *** [Makefile:549: indent.1] Error 127
make[2]: Leaving directory '/3thrdparty/indent-2.2.12/man'
make[1]: *** [Makefile:455: all-recursive] Error 1
make[1]: Leaving directory '/3thrdparty/indent-2.2.12'
make: *** [Makefile:393: all] Error 2spa

排查man/Makefile編譯文件code

$(CC_FOR_BUILD) -o $@ ${srcdir}/texinfo2man.corm

沒法識別CC_FOR_BUILDci

解決該問題,能夠經過修改宏定義it

$(CC) -o $@ ${srcdir}/texinfo2man.cio


引伸編譯

autoconf cached variables (CC_FOR_BUILD),搜索autoconf腳本沒有搜索到任何的信息table


在其餘的開源中定義了該宏定義

secp256k1/build-aux/m4/ax_prog_cc_for_build.m4

This macro searches for a C compiler that generates native executables,#   that is a C compiler that surely is not a cross-compiler. This can be#   useful if you have to generate source code at compile-time like for#   example GCC does.##   The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything#   needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).#   The value of these variables can be overridden by the user by specifying#   a compiler with an environment variable (like you do for standard CC).

相關文章
相關標籤/搜索