In comp.os.linux.development.system Sune <[EMAIL PROTECTED]> wrote: > 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.
Why wouldn't they? I don't understand why you think so. > I guess I would also loose the configuration set up by > Autoconf(?). Again, I don't understand why you think so! >> > 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/' No - that's what executing the make at the top DOES. It's not "instead of it". >> 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? Wrong. > You don't only create > makefiles by executing 'configure', You make the cnfigure file first by running autoconf! > 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). No no. That's what running configure does. >> > 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? Of course not! Where do you get this idea from? There is ONE subdirectory in which you do the build. It's called build/, usually! It contains a mirror dir hierarchy which starts off empty and gets filled with makefiles by the configure run, and then filled by .o files from the make. > No, I would have to create 1 or > more scripts No you wouldn't! > to do that for me and the 'make clean etc' stuff. And as No you wouldn't! > 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. Nonsense! > 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. That is completely an orthognal question! >> 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. Yes you do. That is what you have been saying! > 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/' But that is what one does anyway. That is a given! > bin_PROGRAMS = collections_test > collections_test_SOURCES = DynamicString.c test_main.c This is not a Makefile.am. It contain no variables to be supplied by the configure run. > 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? The way I told you to. You want to compile outside the source tree. Peter _______________________________________________ help-gnu-utils mailing list help-gnu-utils@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-utils