gcc C预处理器可以使用shell命令的输出吗?

x-x*_*x-x 2 c shell gcc c-preprocessor

例如,'uname -a'的输出可以用于创建下面的COMPILED_ON宏吗?

#include <stdio.h>

#define COMPILED_ON `call uname -a and use the output as a quoted string'

int main( int argc, char **argv ) {
    printf( COMPILED_ON );
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

Any*_*orn 12

不是,但:

gcc -DCOMPILED_ON="$(uname -a)"
Run Code Online (Sandbox Code Playgroud)