Annoying "features" of 3.3.1 pmake and cc?

David Hinds dhinds at portia.Stanford.EDU
Sat Oct 27 14:21:36 AEST 1990


I've had a couple of problems using my old makefiles under the new version
of Irix.  Firstly, the new Mips linker doesn't like creating executables
whose names have extensions if a file of the same name already exists.  So
I changed the names of my executables from "*.e" to just the root name.
This led to my second problem: that pmake sometimes tries really hard to
use built-in rules even if I explicitly specify each necessary transformation
in the makefile.  So, for example, I often use -O3, which means I compile
to Ucode intermediate files with -j.  But pmake really wants to make "*.o"
files on the way to building my executable, and fails because the compiler
commands it generates have incompatible options (-O3 and -c).  For example,
here is my Makefile:

.SHELL: name=csh
.SUFFIXES: .a .c .h .u .e
CFLAGS = -O3 -float
LFLAGS = $(CFLAGS)
.c.u:
	cc $(CFLAGS) -j $(.IMPSRC)

meander.u: meander.c graphs.h paths.h misc.h

paths.u: paths.c paths.h graphs.h misc.h

graphs.u: graphs.c graphs.h misc.h

meander: meander.u paths.u graphs.u
	cc $(LFLAGS) -o meander meander.u paths.u graphs.u -lmalloc -lm

If I try to "pmake meander", pmake creates the .u files, then tries to
create meander.o for no apparent reason.  I don't know enough about make
to tell if this is a "feature" or a bug.

 -David Hinds
  dhinds at cb-iris.stanford.edu



More information about the Comp.sys.sgi mailing list