tridge at samba.anu.edu.au
Sat Oct 31 13:10:09 GMT 1998
> BTW, only now I notice: the current compilation commands are quite
> unportable; several C compilers do not accept `-c' and `-o'
> together... The only portable behavior is to compile only with `-c',
> then move the `.o' from the current directory to the desired
yes, Dave Dykstra fixed this in rsync recently using the following:
$(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
then he had rules in configure.in to detect compilers (like the
UnixWare one) that can't do -c and -o and put in OBJ_SAVE/OBJ_RESTORE
macros that avoid the problem. Otherwise they are defined as #
> And all the burden of avoiding trouble with parallel
> builds falls upon the Makefile writer.
why is a single Makefile more of a problem with parallel builds?
> That's one of the reasons why automake does not support compiling
> sources from other directories.
I can see the reasoning, but I don't much like it. Compilers that
can't do -c with -o are broken, so I think we should work around their
brokenness rather than making things harder for all platforms.
I think the best way of avoiding problems on those systems is to
define CC to be a call to a script that handles the -c and -o
problem. That way "normal" systems work unimpeded.
More information about the samba-technical