From owner-freebsd-questions@FreeBSD.ORG Sat Feb 12 08:07:15 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015BA1065693 for ; Sat, 12 Feb 2011 08:07:15 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 6FA918FC12 for ; Sat, 12 Feb 2011 08:07:13 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.9, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: p1C86t4M001787 Received: from gkeramidas-glaptop.linux.gr (207.47.25.82.static.nextweb.net [207.47.25.82]) (authenticated bits=0) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.4) with ESMTP id p1C86t4M001787 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 12 Feb 2011 10:07:02 +0200 From: Giorgos Keramidas To: Vikash.Badal@is.co.za References: <201102102359.p1ANxEcA044340@mail.r-bonomi.com> Date: Sat, 12 Feb 2011 00:06:54 -0800 In-Reply-To: <201102102359.p1ANxEcA044340@mail.r-bonomi.com> (Robert Bonomi's message of "Thu, 10 Feb 2011 17:59:14 -0600 (CST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Cc: freebsd-questions@freebsd.org, Robert Bonomi Subject: Re: switching from gnu make to bsd make X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2011 08:07:15 -0000 On Thu, 10 Feb 2011 17:59:14 -0600 (CST), Robert Bonomi wrote: >> From: Vikash Badal >> Date: Thu, 10 Feb 2011 11:30:02 +0200 >> Subject: RE: switching from gnu make to bsd make >> >> > -----Original Message----- >> > From: Polytropon [mailto:freebsd@edvax.de] Sent: 10 February 2011 10:11 >> > AM To: Vikash Badal Cc: freebsd-questions@freebsd.org Subject: Re: >> > switching from gnu make to bsd make >> > >> > Of course, in my testing case OBJDIR and SRCDIR are empty, and I >> > didn't define any of CC, CFLAGS, INCDIR or LIBDIR, so the defaults >> > have been chosen. >> > >> > Do you encounter a specific problem? >> >> This is my problem: >> >> vix:$ make make: don't know how to make src/%.c. Stop > > Just telling people "what happened" is *NOT* enough for intelligent > diagnosis of the problem. You also have to tell people WHAT YOU DID > that provoked the error you encountered. > > That said, dusting off my crystal ball -- which appears to be *working* > today -- you simply typed "make" at the shell prompt. > > Try typing "make all" and see what happens then. Right. this should fix the immediate problem. The 'bug' seems to be that the Makefile lists the '$(OBJDIR)/%.o' target *first*. >> this is my make file: >> >> ------------------------------------------------------------------------------ >> >> CC = cc > * LIBS = -lpthread -lmysqlclient_r >> CFLAGS = -Wall -g >> INCDIR = -Iinclude -I/usr/local/include -I/usr/local/include/mysql >> LIBDIR = -L/usr/local/lib -L/usr/local/lib/mysql >> OBJDIR = obj >> SRCDIR = src >> BINDIR = bin >> PREFIX = /usr/local/nntpd >> BINDIRFILES = ${BINDIR}/nntpd >> OBJS = ${OBJDIR}/log.o ${OBJDIR}/cleanup.o ${OBJDIR}/config.o \ >> ${OBJDIR}/leecherpool.o ${OBJDIR}/mytime.o >> ${OBJDIR}/upstream.o ${OBJDIR}/mysleep.o >> ${OBJDIR}/sql.o ${OBJDIR}/signalhandler.o >> ${OBJDIR}/list.o ${OBJDIR}/tcpserver.o >> ${OBJDIR}/listenpool.o ${OBJDIR}/workers.o \ >> ${OBJDIR}/nntpd.o >> >> $(OBJDIR)/%.o:${SRCDIR}/%.c >> ${CC} -c ${CFLAGS} ${INCDIR} ${LIBDIR} $< -o $@ >> >> all: ${OBJS} >> ${CC} -o ${BINDIR}/nntpd ${LIBS} ${CFLAGS} ${INCDIR} ${LIBDIR} \ >> ${OBJDIR}/log.o ${OBJDIR}/cleanup.o ${OBJDIR}/config.o \ >> ${OBJDIR}/leecherpool.o ${OBJDIR}/mytime.o ${OBJDIR}/nntp.o \ >> ${OBJDIR}/upstream.o ${OBJDIR}/mysleep.o ${OBJDIR}/sqlpool.o \ >> ${OBJDIR}/sql.o ${OBJDIR}/signalhandler.o ${OBJDIR}/daemon.o \ >> ${OBJDIR}/list.o ${OBJDIR}/tcpserver.o ${OBJDIR}/tmpfiles.o \ >> ${OBJDIR}/listenpool.o ${OBJDIR}/workers.o \ >> ${OBJDIR}/nntpd.o Try swapping the order of the two targets above. BSD make(1) considers the first target the 'default', so when you just type 'make' it tries to build a target named '$(OBJDIR)/%.o', which fails.