Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!asuvax!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: make removed my source file Message-ID: <1990Feb19.023750.18576@virtech.uucp> Date: 19 Feb 90 02:37:50 GMT References: <1025@wubios.wustl.edu> Organization: Virtual Technologies Inc. Lines: 34 In article <1025@wubios.wustl.edu>, david@wubios.wustl.edu (David J. Camp) writes: > all: xxencode.c > cc -o xxencode xxencode.c > /bin/rm -f xxdecode > ln xxencode xxdecode > > Here is are the filenames on my directory: > Makefile README xxdecode xxencode xxencode.c xxencode.l xxencode.man The problem is that the xxencode.l file is newer then the xxencode.c file and make has a built in rule for making a *.c file from a *.l file (using lex). A quick fix is to rename xxencode.l to xxencode.something_else Or you could turn off the .l.c built in rule for make, or you could turn off make's understanding of the .l suffix. PS: I would change the makefile to appear as: xxdecode: xxencode rm -f xxdecode ln... That way xxencode would only be rebuilt if xxencode.c is out of date (using makes .c to executable built in rull) and xxdecode would only be linked to xxencode if xxencode was newer than xxdecode. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+