automake

How to post-install something using GNU Automake?

I want to setup symlinks and add some lines to system configuration files, I think I should do these jobs in some post-install manner. Makefile.am: bin_SCRIPTS = a a1 a1: ln -snf a a1 This does work but it copies a to a1 in the bindir, while a1 is created as a symlink in the build dir. I'd also want to modify some system co...

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

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 bel...

how to create binary and .so using libtool

I have a set of cpp files that I want to compile directly into a binary and also to compile into a shared library. I have bin_PROGRAMS=mybin lib_LTLIBRARIES=libmylib.la COMMON_SOURCES=f1.cpp f2.cpp f3.cpp mybin_SOURCES=main.cpp $(COMMON_SOURCES) libmylib_la_SOURCES=$(COMMON_SOURCES) When I run this the cpp files are compiled twice...

Automatically generate <img> and then insert it into a <html> page after uploading the im into an FTP folder?!

Hi This is a bit of a shot int he dark, but i dont even know how to google this to get started. It's a very simple idea, but it would be extremely useful to designers and creatives for creating a scrapbook of sorts. Baiscally i want to be able to drop an image I find on the internet onto an FTP folder which will just be a droplet on m...

How to install a directory tree of data with automake

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 \ ...

.emacs, automake and cmake.

A long time ago,when I wrote my .emacs setup[1], I used a shell script to compile and join the whole thing. The thing is now very old and "crusty", so I am now rewriting it to replace things such as: (defmacro make-new-comment( mode face strcom color1 color2) (list 'progn `(make-face ',face) `(if (not (assoc ,s...

How do I make an automake rule in an .mk file that deletes a directory upon cleaning?

I would like to delete a another directory when I run make clean, but I can't figure out how to code it up in the rules. I have tried clean-local: -rm -f del.dir but that didn't work. I also tried CLEANFILES = del.dir but that also didn't work. Any suggestions would be appreciated, Thanks for your time, Josh ...

gcov: producing .gcda output from shared library?

Is it possible to produce gcov data files (.gcda files) by running an executable linked to a shared library built with the --coverage option? Basically, I have the main library consisting of multiple c++ files compiled into one shared library and then a subdirectory called "test" containing a test program that links to and tests the mai...

Mixing C++ and Objective-C (Suspected Automake problem)

So, I've been working for some time on connecting hashing out a trivial application, comprising C++ and Objective-C, to prove some concepts and try and learn something. Here's where I'm at now, my command (being run, and re-run on changes) is $ autoreconf -vis && make clean && ./configure && make && ./src/greetings Note, that I'm h...

Exploding recursive make with libltdl

In my Makefile.am, I have SUBDIRS = libltdl . This is because I want to be able to use the version of libltdl included with my package (i.e. ./configure --with-included-ltdl). However, I occasionally run into the problem where make invokes itself recursively forever. Unfortunately I'm not sure exactly what conditions cause this to occ...

Any difference between configure.ac and configure.in, and Makefile.am and Makefile.in?

I have seen both in different things I have configured. What I the difference? Is it notable to use only one? Or does it not matter which one to use? ...

automake: modify implicity make rule to include extra flags

How can I add extra flag variables (like CPPFLAGS) that will apply to all makefiles? Currently, we're using CPPFLAGS, but that is supposed to be reserved as a user variable and I would like to reserve it. I'd prefer not to use AM_CPPFLAGS because I would like to reserve that for specific Makefile.amS. What I want is something like GLO...

How to install header files in Automake?

The following statement doesn't work: dist_include_DATA = someheaders.h which cause error: Makefile.am:8: `includedir' is not a legitimate directory for `DATA' Using: GNU Autoconf 2.65 GNU Automake 1.11.1 GNU Make 3.81 ...

how to compile MPI and non-MPI version of the same program with automake?

I have a C++ code that can be compiled with MPI support depending on a certain preprocessor flag; missing the appropriate flag, the sources compile to a non-parallel version. I would like to setup the Makefile.am so that it compiles both the MPI-parallel and the sequential version, if an option to ./configure is given. Here's the catch...

How to specify multiple sourcefiles in automake at once

Is there any way around having to specify every sourcefile I create manually in my automake scripts? I've tried several ways of specifying sourcefiles using find -name *.cc or the like. I've also tried finding the list in autoconf and substituting it into the Makefile.am, but automake protested that this is not allowed. If I have to ma...