🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sgi.misc
Article #432

gnu make & RCS question

#432
From: georgek
Date: Mon, 01 Mar 1999 00:00
75 lines
2330 bytes
Hi Folks,

  I'm using gnu make 3.77 on an SGI system. I'm trying to interface it
with RCS. I've already got it to check out files that are in the 
local RCS directory, but am having a hard time getting it to delete
some of them once they're done. I can get gmake to check out *.c and
*.h files and delete the *.c files once it's done with them, but I 
can't get it to delete the *.h files when it's done. I'm guessing that
having the *.h files listed in the dependencies is somehow keeping the
*.h files from being considered intermediate files like the .c files.

  My goal is to have make delete any files it had to check out: regardless
of whether they were *.c or *.h.

Any suggestions?

thnx,

gpk


              -------------- example Makefile -------------

# Make.depend is just the standard dependencies file generated by the
# compiler.

MKDEPFILE = Make.depend
MKDEPOPT   = -MDupdate $(MKDEPFILE)

TARGET = ground_motion

INCDIR = ${INCLUDE}
MSGDIR = ${MSET}
LIBDIR = ${LIB}
BINDIR = ${BIN}

# source, header, and RCS files live one level up from this Makefile

VPATH = ..

SRCS =  collisions.c \
        vehicle.c

OBJS = $(SRCS:.c=.o)

LLIBS = libquery.a libtransforms.a 

CFLAGS  = -fullwarn -xansi -c -O -I.. -I${INCDIR} -I${MSGDIR} $(MKDEPOPT) 

LDFLAGS = # -g -s 
LIBS =  -lm 


all:  $(TARGET)

$(TARGET): ${OBJS} ${LLIBS}
	cc $(LDFLAGS) $(OBJS) -o $@  $(LLIBS) $(LIBS)

.c.o:
	cc $(CFLAGS) $<

install : ${BINDIR}/${TARGET}

${BINDIR}/${TARGET} : ${TARGET}
	rm -f ${BINDIR}/${TARGET}
	cp ${TARGET} ${BINDIR}

clean :
        -rm -f *.o core a.out $(TARGET) *~* *.bak 

cleandepends:
	 rm -f $(MKDEPFILE)
	touch $(MKDEPFILE)

include $(MKDEPFILE)
Technical Details
Message-ID: <7bcq1a$ja6@news.rsc.raytheon.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 100159,5151d4f27c5a166e,start
X-Google-Attributes: gid100159,public
X-Google-Thread: 109f73,5151d4f27c5a166e,start
X-Google-Attributes: gid109f73,public
From: georgek@iluvatar.rsc.raytheon.com
Subject: gnu make & RCS question
Date: 1999/03/01
Message-ID: <7bcq1a$ja6@news.rsc.raytheon.com>
X-Deja-AN: 449709127
Organization: Texas Instruments Defense Systems and Electronics Group
Reply-To: georgek@iluvatar.rsc.raytheon.com
Newsgroups: comp.sys.sgi.misc,gnu.utils.help
Originator: georgek@iluvatar.rsc.raytheon.com