make removed my source file
    Conor P. Cahill 
    cpcahil at virtech.uucp
       
    Mon Feb 19 13:37:50 AEST 1990
    
    
  
In article <1025 at wubios.wustl.edu>, david at 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     |
+-----------------------------------------------------------------------+
    
    
More information about the Comp.unix.questions
mailing list