[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Makefile Magic. And now also - Autoconf.
s369625@student.uq.edu.au wrote:
>>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".
Hmm, perhaps something like
COBJS += $(patsubst %.c,%.o,$(filter %.c,$(SRCS)))
CXXOBJS += $(patsubst %.cc,%.o,$(filter %.cc,$(SRCS)))
AFAIK this will work nicely as long as we don't rely on implicit rules for
building
>>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.
Hmm, as the error value of rm should be ignored anyway it's propably the
best to simply specify all possible suffixes.
>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!).
Uh-oh. Things get more complicated :-((
But I assume you're right. Writing the makefiles per hand is even worse...
>I saw two little problems with Christian's hanges to configure.in. One is that
Oh. I never tested it... <hiding>
>autoconf generates a warning about "no default for cross compilation" or
>something like that during the endianness test. I assume this can be fixed
<Where's my autoconf manual??> <mmmbl> <???> Nothing in that §$%& Manual
says anything about needing a cross compilation context or something
similar for that check. It's the AC_C_BIGENDIAN test, right?
>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
Eeeek!! I always thought that m4 was weird but good once you got familiar
with it. But that's just [------------censored-----------] !!!
Cu
Christian
--
It's lonely in the saddle since the horse died...