automake

Automake ignore missing NEWS/AUTHORS/COPYING/etc. standard files

给你一囗甜甜゛ 提交于 2019-12-06 01:44:34
问题 Automake requires that the following "standard" files exist in the source directory of my project: INSTALL NEWS README COPYING AUTHORS ChangeLog Obviously, none of these files are necessary for a program to build, but Automake refuses to run without them. I know about the --add-missing flag that will cause boilerplate files to be generated, but I would rather not have the files at all. Is there a way to force Automake to run and ignore the missing files without generating them? 回答1: Use the

Adding a custom installation directory option to Autoconf-generated configure scripts

倖福魔咒の 提交于 2019-12-06 00:20:10
问题 configure scripts always include something like the following in the help message: ... By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir

Autoconf subdirectories with subpackages depending on each other?

北慕城南 提交于 2019-12-05 22:38:56
问题 I've got a large project on my hand (master) that is split into several components (liba, b, c, d) to ease building and maintenance. When building the whole package, all of the subcomponents must be built in sequence, and some of these packages depend upon each other. In more explicit terms, liba is a prerequisite for b, c and d, and the presence of liba is checked by the configure script. This check is definitely necessary to give user-friendly error messages when building the b distribution

Calling SED for a source in Makefile.am

非 Y 不嫁゛ 提交于 2019-12-05 18:40:34
I've got c++ code that needs a sed done to it prior to compilation. How do I place this into Makefile.am ? I tried the typical makefile setup and the target appears to not exist: gentest.cc: $(SED) -i "s|FIND|REPLACE|" gentest.cc If you are interested as to why I want to do this, it's because I wrote my program ( slider3.py ) in python and my partner wrote his in c++ ( gentest.cc ) and his needs to call mine. I'm accomplishing this by editing the argv and then using execv() . ... { char **argv2 = new char*[argc]; memset(argv2,0,sizeof(argv2)); argv2[0] = "__PREFIX__/bin/slider3.py"; memcpy

What is the best way to set compilation flags for individual source files using GCC and autotools?

强颜欢笑 提交于 2019-12-05 17:57:22
I need to disable optimization flag for a individual file using autotools. What is the best way to do it? Do you mean an individual source file or an individual executable? To disable optimization for an executable is simple: bin_PROGRAMS = myprog myprog_SOURCES = foo.c bar.c myprog_CFLAGS = -O0 If you mean that you want to disable the optimization for a single source file temporarily , say for debugging purposes, you can just remake that file at the prompt: (example from the automake manual) rm bar.o make CFLAGS=-O0 bar.o make To do it for an individual source file permanently is not so

Automake: building shared module which is not to be installed

让人想犯罪 __ 提交于 2019-12-05 14:10:53
How to tell Automake to build a dynamic module which is not to be installed? pkglib_LTLIBRARIES = mywrapper.la mywrapper_la_LDFLAGS = -no-undefined -module -avoid-version causes mywrapper.so to be installed to pkglibdir . noinst_LTLIBRARIES = mywrapper.la mywrapper_la_LDFLAGS = -no-undefined -module -avoid-version causes static convenience library to be built instead. The dynamic module in question is only used to run a test suite, and hence is not to be distributed. I had the same problem. This is what I did, including the peeved comment to myself for future reference: # The rpath is

What is ltmain.sh, and why does automake say it is missing? What is a good auto (make/conf/etc) generator?

若如初见. 提交于 2019-12-05 01:55:51
问题 I just want to develop a C app in linux with the auto(make/conf/...) stuff automatically generated. I tried generating it with ede and anjuta, but it doesn't seem to generate Makefile.am. So, I tried running automake, and it says "ltmain.sh" isn't found. Is there some easy to generate the basic build files for linux C/C++ apps. What is the standard practice? Do most people write these files themselves? 回答1: Generating a really trivial set of autotool files is pretty easy. Here's a (really

How to install a directory tree of data with automake

孤人 提交于 2019-12-05 01:34:35
How can I install a directory tree of HTML files, stylesheets and images with automake without having to create Makefiles in each subdirectory? Using the following in the toplevel directory htmldir = $(docdir)/foo/html html_DATA = \ stylesheets/foo.css \ images/foo.jpg \ index.html \ about/index.html \ faq/index.html EXTRA_DIST = $(html_DATA) fails because the subdirectories are not created before install is called. You could write foohtmldir = $(htmldir)/foo/html nobase_dist_foohtml_DATA = \ stylesheets/foo.css \ images/foo.jpg \ index.html \ about/index.html \ faq/index.html htmldir is a

autoconf-generated Makefile does not pass flags for library headers when using PKG_CHECK_MODULES

柔情痞子 提交于 2019-12-04 14:53:28
My project depends upon a library (more precisely, GTK+) so I added the following configurations in my configure.ac : PKG_CHECK_MODULES([GTK], [gtk+-2.0]) AC_SUBST([GTK_CFLAGS]) AC_SUBST([GTK_LIBS]) My Makefile.am is: bin_PROGRAMS = secretary secretary_SOURCES = secretary.c For its turn, my secretary.c is as follows: #include <gtk/gtk.h> int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_main(); return 0; } However, when I run make (of course, after calling ./configure ) I got this error: gcc -DHAVE

Check framework example giving me error when running './configure'

孤街浪徒 提交于 2019-12-04 09:15:43
I'm building the check framework example 'check_money', but it's not building on my machine. The error is: configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.." I've tried installing it using: libtoolize --force aclocal autoheader automake --force-missing --add-missing autoconf ./configure It's still giving me the same error. So, I copied the same directory to another directory and ran: autoreconf --install ./configure And it's still giving me the same error. I don't know what else to try. I'm on Mac OS X Mavericks (10.9) Autoconf 2.69 Automake 1.15 Libtool 2