Re: I can't get xxx_AR to work
Patrik Jonsson wrote: > I'm trying to convert my little project to autotools, and I'm running > into the problem that under AIX, to make a 64-bit library, you need to > pass -X64 as an option to ar. I've tried setting libmcrx_a_AR = > something, ARFLAGS =something and AR =something in the Makefile.am, but > no matter how I do this, the Makefile always comes out having: I had a similar problem and played around with it long time ago. The simplest (though inconvenient) way is to call 'make AR="ar -X64"' every time you need it. Otherwise, you could write some shell code in configure.ac to determine AR or ARFLAGS and to set them with AC_SUBST. I think this should work. Andreas
Re: creating a distro
On Fri, Jul 29, 2005 at 07:11:05AM +0200, Stepan Kasal wrote: > Hi, > this is an Automake question, so please let's move to the Automake list. > > On Fri, Jul 29, 2005 at 02:47:15AM +, Harlan Stenn wrote: > > I have a distro that contains optionally-built subdirs. > > I have found that I must enable these builds if I am going to "make > > dist". > > No, you can use DIST_SUBDIRS or, better yet, AM_CONDITIONAL. See below. Yes, this is something I've been doing, which I did find in the automake manual. > >SUBDIRS=$(READLINE_DIR) various tgdb cgdb > >DIST_SUBDIRS=various tgdb cgdb > >EXTRA_DIST=config $(READLINE_DIR) > > SUBDIRS = > if READLINE > SUBDIRS += readline-1.2.3 > endif > SUBDIRS = various tgdb cgdb > --- > > With this setup, Automake will dist all subdirs, no matter what configure > options you will use. Yes, this is what I have. The problem is, the readline directory does not have a distdir rule, so I end up with the error, make[1]: Entering directory `/home/bob/cvs/cgdb/cgdb.packrl/in-rl/readline-5.0' make[1]: *** No rule to make target `distdir'. Stop. make[1]: Leaving directory `/home/bob/cvs/cgdb/cgdb.packrl/in-rl/readline-5.0' make: *** [distdir] Error 1 Any suggestions? Thanks, Bob Rossi
Source files generation
Hello, I am trying to build a libtool library that is build from a bunch of generated source files (with a .cxx extension) and a bunch of distributed source files (with a .cpp extension). Until now, I have added only one of the generated cxx files in the BUILD_SOURCE so the cxx files were first generated and then compiled. All the cxx files are generated from only one file (with a .stc extension) and one command (called for example gencxx). So, until now I am using this kind of Makefile.am : lib_LTLIBRARIES = libtoto.la BUILD_SOURCE = src/toto01.cxx dist_libtoto_la_SOURCES = src/toto.stc libtoto_la_SOURCES =src/toto01.cxx src/toto02.cxx src/toto.cpp src/toto01.cxx: src/toto.stc gencxx src/toto.stc The problem with this approach is it is not robust with parallel compilation and it is not possible to build only one *.lo file from clean source if it is not the one used with the BUILD_SOURCE variable. To get all of this features, I want to use a general rule to generate a .cxx file depending only on one generated file (called diary.xml and also generated by the gencxx file) and then writing a rule to build this generated file. So, the Makefile.am would be: lib_LTLIBRARIES = libtoto.la dist_libtoto_la_SOURCES = src/toto.stc libtoto_la_SOURCES =src/toto01.cxx src/toto02.cxx src/toto.cpp %.cxx: src/diary.xml src/diary.xml: src/toto.stc gencxx src/toto.stc The problem with this approach is that make returns the error : *** No rule to make target 'src/toto01.cxx', needed by 'libtoto_la-toto01.lo'. Stop. So, I guess the pattern %.cxx is not correct but I tried different things and I can't make it work. Any ideas ? Thanks, Thomas
Re: Source files generation
On Sat, Jul 30, 2005 at 03:26:43PM +0200, Thomas Degris wrote: > lib_LTLIBRARIES = libtoto.la > > dist_libtoto_la_SOURCES = src/toto.stc > libtoto_la_SOURCES =src/toto01.cxx src/toto02.cxx src/toto.cpp > > %.cxx: src/diary.xml > > src/diary.xml: src/toto.stc >gencxx src/toto.stc > > The problem with this approach is that make returns the error : > *** No rule to make target 'src/toto01.cxx', needed by > 'libtoto_la-toto01.lo'. Stop. > So, I guess the pattern %.cxx is not correct but I tried different > things and I can't make it work. Any ideas ? You need some actual dependencies. Add something like this: $(cxx_files): src/diary.xml Pattern rules that don't have any actions are generally of limited use, partly because make tends to ignore them. Also, this makefile can get stuck. If src/diary.xml is up to date WRT src/toto.stc but the cxx files are not, for whatever reason (like somebody mangling the tree by hand), then make has nothing to do but the cxx files won't get built. So it breaks. One way to write this better is like this: src/diary.xml $(cxx_files): cxx_stamp cxx_stamp: src/toto.stc gencxx src/toto.stc touch cxx_stamp CLEANFILES += cxx_stamp I think that'll do what you want. -- .''`. ** Debian GNU/Linux ** | Andrew Suffield : :' : http://www.debian.org/ | `. `' | `- -><- | signature.asc Description: Digital signature