... but only if Makefile.config exists. cleanall will cause make to enter
even SUBDIR-no dirs and clean OBJS-no files. This should fix the linking
problem report by zas when running:
./configure --enable-fastmem ; make ; \
./configure --enable-debug ; make
Involves prefixing with $(srcdir) to some of the build rule variables. For
the builddir we create Makefiles which simply include the srcdir Makefile.
Add list make rule to get list of Makefiles to generate (find will get it
wrong for builddirs nested in srcdir).
There are still a few minor issues like the file paths echoed during make
install ...
Make will 'expand' all variables at initialization so we cannot rely on
checking subdir/lib.o since it might not have been build yet. Instead
use 'test && echo' on the ld command line.
Makes it more obvious which files are actually installed. MKINSTALLDIRS
still spurs out a lot of 'mkdir ...', which probably should also be
silenced when V=0.
... so it is easier to figure out where in the tree it's at:
...
[LD] /src/cookies/lib.o
[MAKE all] /src/dialogs
[CC] /src/dialogs/document.c
...
[LINK] /src/elinks
...
which means the user will also get a hint at where the elinks binary
is.
Yeah, yeah, useless bloat, I know. But I have to figure out some way to
get the whole tree build time above 1 minute. ;-)
It is a little ugly since I couldn't get $(wildcard) to expand *.o files
so it just checks if there are any *.c files and then link in the lib.o
based on that.
Ditch the building of an archive (.a) in favour of linking all objects in a
directory into a lib.o file. This makes it easy to link in subdirectories
and more importantly keeps the build logic in the local subdirectories.
Note: after updating you will have to rm **/*.a if you do not make clean
before updating.
- Fix the doc/ clean target which was called clean-local
- Consistently use $(RM)
- Introduce CLEAN variable to make it simpler to costumize local cleaning
All objects defining $(OBJS) will get them and *.a deleted during
make clean.
The all, clean and install rules now implicitly imply their -recursive
counterparts - those will just do nothing in case of $(SUBDIRS) not
defined, so that's ok.
The root makefile is converted as well as some leaf Makefiles. This
also brings in the required infrastructure and adjusts configure.in
appropriately.
I converted only makefiles containing no configurable stuff, since
that'll require more consideration yet.