'rm;cc -c;mv' or 'cc -c -o'?

Darrell McCauley mccauley at ecn.purdue.edu
Sun Jan 2 22:56:57 EST 1994


I notice the following in $GISBASE/src/CMD/generic/gmake.sh:
    echo '$(OBJARCH)/'${file}.o: ${file}.c
    echo '	rm -f $@'
    echo '	$(CC) $(CFLAGS) -c' ${file}.c
    echo '	mv' ${file}.o '$@'

Why couldn't this be like the following?
    echo '$(OBJARCH)/'${file}.o: ${file}.c
    echo '	$(CC) $(CFLAGS) -c -o $@' ${file}.c

Seems like it would shorten the compilation time. 
All compilers have the -o option and there shouldn't
be an OS that couldn't handle overwriting a file, or
am I missing something?

--Darrell



More information about the grass-dev mailing list