[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: top level make file with deep dir struct demo

From: Ralf Wildenhues
Subject: Re: top level make file with deep dir struct demo
Date: Tue, 10 Jan 2006 09:44:00 +0100
User-agent: Mutt/1.5.11

Hi Matt,

* Matt Hull wrote on Mon, Jan 09, 2006 at 10:30:03PM CET:
> hi, thanks for your patience with my questions and sorry for posting on
> the wrong list.

No problem.  It's not always easy for new users to know which is the
right one.  If your mailer allows it, it would be helpful though if you
replied to mails, so that references are kept.  Not much of an issue
either, though.

> i am trying to use a top level configure script in ./ with all sources in
> ./src and ./src/gtk2
> directory :
> -----------
> src/main.c
> src/gtk1/gtk1.c
> :
> -------------
> bin_PROGRAMS = mine
> mine_SOURCES = src/main.c
> if WITH_GTK1
>       mine_sources += src/gtk2/gtk1.c src/gtk2/gtk1.h

This should be mine_SOURCES.  Case is important.

> endif
> DIST_SUBDIRS = src src/gtk1 src/gtk2

> address@hidden ~/mine-0.0.9 $ aclocal -I aclocal.include/ && autoheader && 
> autoconf && automake && ./configure && make
> automake: not supported: source file `src/main.c' is in 
> subdirectory

I believe you use aclocal/automake from Automake-1.4.x.  This is a very
old version.  Please update to a new one, current is 1.9.6, but anything
above 1.5 should support sources in subdirectories.  If you use a
distribution, you should just be able to install a newer package.

> if i change mine_SOURCES = src/main.c to mine_SOURCES = main.c :
> address@hidden ~/mine-0.0.9 $ aclocal -I aclocal.include/ && autoheader && 
> autoconf && automake && ./configure && make

> make: *** No rule to make target `main.c', needed by `main.o'.  Stop.

That's to be expected.

Another note: you may want to use the Automake option subdir-objects.
Again, with newer Automake versions, you can stick that into the first
argument of AM_INIT_AUTOMAKE in if you use the new form of
that and AC_INIT, or you can stick it into each as
  AUTOMAKE_OPTIONS = subdir-objects

Please also see the corresponding Automake documentation about this, you
should likely also use AM_PROG_CC_C_O after AC_PROG_CC then.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]