[Top][All Lists]

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

Re: problem to use autoconf/automake

From: Keith MARSHALL
Subject: Re: problem to use autoconf/automake
Date: Tue, 26 Apr 2005 13:18:41 +0100

Nicolas Haller wrote:
>>> If I understand, are generated with informations enclosed 
>>> But I have no in subdirs of src/. I have only
>>> sources files (.hh and .cc), and nothing to do with these (but object
>>> file to build the program define in src/
>> Well, if you don't need any more files in subdirectories of
>> src/, then don't specify SUBDIRS.  Please read
>>   info Automake Subdirectories
>>> So, what can I do, can I create empty in all subdirs of 
>>> or must I do anything else?
>> Either that, or just don't mention the directories in SUBDIRS.
>> I don't know why you wanted them there in the first place(?).
> You said before:
>>>> Well, put
>>>>   SUBDIRS = whatever_dirs_live_under_src
>>>> into src/  Don't forget to mention all to-be-generated
>>>> Makefiles in the AC_CONFIG_FILES macro in
> So when I do what you said, automake said he can't find
> I try to make empty and it's work, autotools generates
> and Makefile. But I donc really know if it's good to make
> empty, what is your opinion? 

I'm no automake expert, but AIUI you should only set SUBDIRS to the subset
of subdirectories in which you actually intend to run make.  If you are
putting empty `'s in subdirectories, that suggests you have
nothing to make there, so why name them in SUBDIRS?

The usual plan is that, in your generated top level `Makefile' you will 
rules which say, for some subsystem target:

        $(MAKE) -C subdir ...


        cd subdir && $(MAKE)

which cause make to run recursively in the subdirectory, reading its 
Makefile.  You use a local `' in each such subdirectory, to 
specify the the automake rules, _and_ specify that subdirectory in 
so that automake will transform it into a local `', which is 
used by autoconf, to write the local `Makefile' for the subdirectory.  If
you find yourself putting an empty `' in any subdirectory, then
that subdirectory probably shouldn't be specified in SUBDIRS.



reply via email to

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