autotools

GDB: Set variable using pipe and awk

前提是你 提交于 2020-06-16 17:26:29
问题 I would like to store the executable name of the current inferior in a variable. I way to obtain the executable name in the gdb CLI is the following: pipe info inferiors | awk '{ if ($1 == "*") { print $4} }' But I am unable to store the output of this expression in a variable. The expression uses single and double quotes, which makes gdb complain if it is combined with set and eval . (gdb) set $exec="pipe info inferiors | awk '{ if ($1 == "*") { print $4} }'" Argument to arithmetic operation

Checking environment variable in make through automake

蹲街弑〆低调 提交于 2020-02-25 02:12:47
问题 Is there a way to have a conditional passed through automake so it is passed on to the resulting Makefile.in and Makefile later on? I check whether JAVA_HOME is defined in the environment in a Makefile using ifeq (undefined,$(origin JAVA_HOME)) #CALL with defaults else #CALL according to the variable endif But when I process this in a Makefile.am with automake I get two erros: else without if endif without if Looks like automake does not digest the ifeq. Is there a way to pass this through it

Looking for a way to store versions in a binary compiled from git repo

会有一股神秘感。 提交于 2020-02-03 16:04:51
问题 I'm looking for some tips to implement binary --version that would provide good information about the version it was compiled from. The project is using autotools build system, and is stored in a git repo that acts as a SVN frontend. What I would like to have inside the binary is: compilation time SVN commit that acts as base last git commit ID and time if possible the last commit that affects this specific binary 回答1: You'll probably want to write your source code to use a #defined constant

Invoke external script using Autotools

拥有回忆 提交于 2020-01-24 12:44:08
问题 I am using Autotools, and trying to get configure.ac and the resulting configure script to call an external build_library.sh script. How can this be done? 回答1: configure.ac is just a shell script with a "few" macros added on top of it. So, you can put any shell code in there: $ac_top_srcdir/build_library.sh (The $ac_top_srcdir makes sure that your script can be found even if you are running ./configure from another directory.) 来源: https://stackoverflow.com/questions/26757929/invoke-external

automake Environment Variable Condition

家住魔仙堡 提交于 2020-01-23 13:34:31
问题 I have a file Makefile.am I am using to generate a Makefile. In the generated Makefile I want to have something like: ifndef SOURCECODEPATH SOURCECODEPATH := /home/root/source_code_path endif It seems so simple, does anyone know how I can do it? 回答1: Use the AM_CONDITIONAL macro in configure.ac . The script sets a variable you can test, e.g., a variable that is set to non-empty if the condition is enabled: AM_CONDITIONAL([ENABLE_SOURCECODEPATH], [test "x$ac_srcpath" != "x"]) Then in Makefile

automake Environment Variable Condition

半腔热情 提交于 2020-01-23 13:33:45
问题 I have a file Makefile.am I am using to generate a Makefile. In the generated Makefile I want to have something like: ifndef SOURCECODEPATH SOURCECODEPATH := /home/root/source_code_path endif It seems so simple, does anyone know how I can do it? 回答1: Use the AM_CONDITIONAL macro in configure.ac . The script sets a variable you can test, e.g., a variable that is set to non-empty if the condition is enabled: AM_CONDITIONAL([ENABLE_SOURCECODEPATH], [test "x$ac_srcpath" != "x"]) Then in Makefile

ARM compiler with autoconf

我的梦境 提交于 2020-01-19 06:10:03
问题 I am trying to compile some files for ARM architecture with autoconf. I am compiling them in Ubuntu 12.04 and the target system is a BeagleBoard XM. I run the following command: ./configure --host=arm-linux-gnueabi -prefix=${CSTOOL_DIR}/linux_arm_tool and get this result: configure: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used checking for a BSD-compatible install... /usr/bin/install -c checking whether

ARM compiler with autoconf

丶灬走出姿态 提交于 2020-01-19 06:07:45
问题 I am trying to compile some files for ARM architecture with autoconf. I am compiling them in Ubuntu 12.04 and the target system is a BeagleBoard XM. I run the following command: ./configure --host=arm-linux-gnueabi -prefix=${CSTOOL_DIR}/linux_arm_tool and get this result: configure: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used checking for a BSD-compatible install... /usr/bin/install -c checking whether

ARM compiler with autoconf

时光毁灭记忆、已成空白 提交于 2020-01-19 06:07:24
问题 I am trying to compile some files for ARM architecture with autoconf. I am compiling them in Ubuntu 12.04 and the target system is a BeagleBoard XM. I run the following command: ./configure --host=arm-linux-gnueabi -prefix=${CSTOOL_DIR}/linux_arm_tool and get this result: configure: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used checking for a BSD-compatible install... /usr/bin/install -c checking whether

Using maven2 to build autotools-based C/C++ package

本秂侑毒 提交于 2020-01-13 05:14:05
问题 I am working on a collection MATLAB, Java, and C/C++ components that all inter-operate, but have distinctly different compilation/installation steps. We currently don't compile anything for MATLAB, use maven2 for our Java build and unit tests, and use autotools for our C/C++ build and unit tests. I would like to move everything to a single build and unit test system, using maven2, but have not been able to find a plugin that will allow the C/C++ codestream to remain autotools-based and simply