duane@anasazi.UUCP (Duane Morse) (04/19/85)
In bringing up the public domain cpp, I noticed the following odd behaviour of make. Supposed a make file looks like this: OBJS = cpp1.o cpp2.o cpp3.o cpp4.o cpp5.o cpp6.o SRCS = cpp1.c cpp2.c cpp3.c cpp4.c cpp5.c cpp6.c cpp: $(OBJS) $(CC) $(CFLAGS) $(OBJS) -o cpp lint: $(SRCS) lint $(LINTFLAGS) $(SRCS) If the source files are kept under sccs and the .c's aren't kept around, life gets difficult. Even though cpp is the target, make thinks that it needs the source files since the (potential) lint target requires them. Hence, make gets every source file. Then make notices that the .c files are newer than the .o's (surprise!), and it recompiles every one. Finally, since the .c files were gotten by the ~.c rule, the .c files are not removed. Is this a bug in our version of make (Convergent Technologies Megaframe CTIX, ostensibly System V), or is this merely an unwanted feature? Duane Morse International Anasazi @ Phoenix
gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (04/24/85)
> cpp: $(OBJS) > lint: $(SRCS) > > If the source files are kept under sccs and the .c's aren't kept around, > life gets difficult. Even though cpp is the target, make thinks that > it needs the source files since the (potential) lint target requires them. That's a bug in your version of "make".
jsdy@hadron.UUCP (Joseph S. D. Yao) (05/07/85)
> > cpp: $(OBJS) > > lint: $(SRCS) > > > > If the source files are kept under sccs and the .c's aren't kept around, > > life gets difficult. Even though cpp is the target, make thinks that > > it needs the source files since the (potential) lint target requires them. > > That's a bug in your version of "make". If it is, it's a fairly common bug. Many (perhaps older) versions of make do the same. Support for SCCS didn't really appear until System III. Joe Yao hadron!jsdy@seismo.{ARPA,UUCP}