🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Joe Weening Tue, 24 Jan 1989 20:04
Implicit rules in GNU Make
#1466
Author: Joe Weening
Date: Tue, 24 Jan 1989 20:04
19 lines
871 bytes
The documentation for GNU make (3.27) says that

          x: y.o z.o

     when `x.c', `y.c' and `z.c' all exist will execute:

          cc -c x.c -o x.o
          cc -c y.c -o y.o
          cc -c z.c -o z.o
          cc x.o y.o z.o -o x
          rm -f x.o
          rm -f y.o
          rm -f z.o

On this machine (Alliant FX/8), the compiler complains:

    cc: -o would overwrite x.o

Shouldn't the "-o x.o" be omitted if the -c flag is present?
Re: Implicit rules in GNU Make
#1476
Author: Alan Judge
Date: Thu, 26 Jan 1989 21:24
17 lines
1173 bytes
In article <8901242004.AA06732@Gang-of-Four.Stanford.EDU>
	weening@GANG-OF-FOUR.STANFORD.EDU (Joe Weening) writes:
...
>    cc: -o would overwrite x.o
>
>Shouldn't the "-o x.o" be omitted if the -c flag is present?

Some compilers will allow the -o flag with the -c flag. It allows more
control over where the output goes.

However, if you look in the Makefile for GNU Make 3.27 you will find a
comment that says to add "-DNO_MINUS_C_MINUS_O" to the CFLAGS when
building GNU Make if your compiler does not support -c and -o
together.
--
Alan Judge, Dept. of Maths., Trinity College Dublin, Ireland.
Smart: ajudge@maths.tcd.ie	Stupid: ...!uunet!maths.tcd.ie!ajudge
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads