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

Re: Makefile Magic. And now also - Autoconf.




>OBJS+=$(patsubst %.cc,%.o,$(SRCS))
># This won't work if SRCS also lists C sourcecode (*.c)
># Also, C souces need a different compiler call ($(CC) instead of $(CXX))
Yep.  I think I thought of that at the time and couldn't be bothered thinking
of an elegent solution.  Probably time to type "info make".

>
>depend : dir-depend recur-depend
># Not sure here, but perhaps it would be better to recurse first...
Perhaps.  Must think.
>
>dir-clean:
>	rm -f *.o *.a $(TARGETS)
># *.so / *.dll etc (depending on the platform) is also important
Yep, this sort of think is always a problem for "make clean".  Again I couldn't
be bothered thinkng of an elegant solution at the time.

>---------------------------------------------- >
>SrcRoot=@top_srcdir@
>BuildRoot=../..
># in other places "BuildRoot=@build_root@" is used - should be better,
># right?
hehe.  "BuildRoot=../.." is my little hack to keep the command line to gcc
short. That now seems like a bit of a lost cause so we might wan to get rid of
it.

>
>I'm not sure if these are real problems of if I just don't understand it,
>but it looks suspicious. Adrian, you set that stuff up, right? What do you
>mean?
That's the trouble with makefiles, they are never very clear.  But yes they
are real problems, they just weren't important enough to warrant me fixing
them.

About the makefiles.  I wrote them and I like them (if only because they reflect
my prejudices about how build systems should be designed).  The big problem I
see with them is that they are gnu make dependent.  Perhaps we should switch
to Automake (I certainly don't want to do a sophisticated non-gmake system by
hand!).



ABOUT AUTOCONF.

I saw two little problems with Christian's hanges to configure.in.  One is that
autoconf generates a warning about "no default for cross compilation" or
something like that during the endianness test.  I assume this can be fixed
by giving it a default for cross compilation (where would you be without me
to point such tricky thinks out).

The other thing was that bash quite reasonably refused to execute "unistd.h"
as a command during "configure".  The cause of this was that Chris had written

AC_CHECK_HEADERS (unistd.h)

But m4 does not like whitespace between macro name and the args (I think that
was the problem).  Anyway, I fixed this myself (I think).