From: kagel AT quasar DOT bloomberg DOT com Date: Mon, 20 May 1996 09:39:22 -0400 Message-Id: <9605201339.AA01484@quasar.bloomberg.com > To: martynas DOT kunigelis AT vm DOT ktu DOT lt Cc: djgpp AT delorie DOT com In-Reply-To: <199605201008.GAA03171@delorie.com> (message from Martynas Kunigelis on Mon, 20 May 96 12:54:10 LIT) Subject: Re: 'make' problem Reply-To: kagel AT dg1 DOT bloomberg DOT com Errors-To: postmaster AT ns1 Date: Mon, 20 May 96 12:54:10 LIT From: Martynas Kunigelis Content-Type: binary Content-Length: 979 I encountered a problem with 'make', but it could be just my ignorance... The thing is, I wrote a generic makefile for my small C++ project, like this: objs = file1.o file2.o file3.o .cc.o: gcc -x c++ -c ›< main.exe: ›(objs) gcc -o ›@ ›^ file1.o: file1.cc file1.h file2.o: file2.cc file2.h file3.o: file3.cc file3.h Everything worked ok. But when I renamed all .cc files to .cpp and changed all appearances of .cc in the makefile to .cpp (including .cc.o: ), make always goes to the link step, even when there are no .o files at all. Just now some idea struck me -- this must have something to do with .SUFFIXES, but I thought .cpp was confirmed to be a valid C++ source file extension, thus make should recognize it. GCC itself recognizes it, though dumps .cc extension to cc1plus. Anyway, I'll read more make docs and try the .SUFFIXES stuff at home, but right now if the problem is different and someone knows the solution, please let me know. Martynas If it is not the .SUFFIXES, look at your target commands. In the mail meesage there are spaces before the commands rather than a tab. Is this a mailer artifact or did your editor replace your tabs the last time you modified the makefile? Also I assume that the \233 are a mailer artifact and that you have dollar signs ($) here. Other than these and the possibility that .SUFFIXES does not include .cpp your makefile looks OK to me. -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats