Peter T. Breuer skrev: > In comp.os.linux.development.system Sune <[EMAIL PROTECTED]> wrote: > > Yes, that's exactly what I want. > > Please QUOTE. I can't recall what you are talking about. > > You said:
My guess is that you don't want to write down the three lines I gave yourself, but instead want automake to make makefiles with them in? Is that it? I answer: Yes, that's exactly what I want. If I only add what you suggest then 'make clean', 'make install' etc won't automagically be provided by Automake. I guess I would also loose the configuration set up by Autoconf(?). > > If I only add what you suggest then > > What did I suggest? Surely only use of VPATH. > You suggested that the following be done for each sub directory: cd collections/bin make -f ../../global/Makefile target VPATH=../../global/ Instead of just execute a plain 'make' from the base directory 'rsd/' and have make and the project's Makefiles do the work. (Makefiles in each subdir configured by my handwritten Makefile.am => automake => Makefile.in => configure => Makefile) > > 'make clean', 'make install' etc won't automagically be provided by > > Automake. > > Eh? Why not? I didn't specify the target, and if I did, you can surely > see that you can name any target in the call to make, > > > I guess I would also loose the configuration set up by > > Autoconf(?). > > I don't understand - when compiling outside the source directory, ne > mormally makes a build/ subdir, cds there, then runs ../configure > there in orser to make a Makefile. Then one runs make against that > Makefile, with VPATH set to the surce directory. Ok, now I understand(?). I don't think you have ever done this from scratch. You have downloaded CVS distributions where the Makefile.in has already been created for you. Right? You don't only create makefiles by executing 'configure', what you do is examining the installation target machine (your computer) to make the compiled target portable to your machine (by adapting Makefiles according to config.h and Makefile.in). > > I'm afraid that if I start to add parts outside the Autotools > > environment, I may end up in a maintenance nightmare. > > I don't understand. Nobody is talking abut "adding parts". > Ok, so you seriously want me to perform: cd collections/bin make -f ../../global/Makefile target VPATH=../../global/ for 80-100 subdirectories manually? No, I would have to create 1 or more scripts to do that for me and the 'make clean etc' stuff. And as files are added, directories are added or removed I would have to maintain both my autotools configured environment together with additional scripts. That doesn't make sense to me. If I use Autotools and something changes in my compile environment (which in the beginning of the project will happen quite often), I only add a subdir in the base Makefile.am, and add a Makefile.am in the new subdir and execute 'autoreconf'. Voila! I can execute a simple make from the base directory again. > > Do you, or someone you know, knows how this can be done? Surely > > Autotools can be used to set up a tailor-made make environment this > > way(?) > > I don't know what environment you want! but I have described for you > how to compile outside the source tree, and I do not understand what > you are talking about autotools for. It is your own business how you > make the ./configure file that makes the Makefiles that you will use > for the make in the build dir. I don't want to compile outside the source tree. I want properly configured Makefile.ams so I only need to type make from the base directory! Here's an example of a Makefile.am for 'collection/' bin_PROGRAMS = collections_test collections_test_SOURCES = DynamicString.c test_main.c MY QUESTION: How do I edit the above Makefile.am (and possibly configure.in) to avoid getting object files and other targets mixed with my source files? Hope this makes things a bit clearer /Sune _______________________________________________ help-gnu-utils mailing list help-gnu-utils@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-utils