From owner-freebsd-questions Sun May 10 22:00:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA10626 for freebsd-questions-outgoing; Sun, 10 May 1998 22:00:19 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dt050n33.san.rr.com (@dt053nd2.san.rr.com [204.210.34.210]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA10621 for ; Sun, 10 May 1998 22:00:13 -0700 (PDT) (envelope-from Studded@dal.net) Received: from dal.net (Studded@localhost [127.0.0.1]) by dt050n33.san.rr.com (8.8.8/8.8.8) with ESMTP id VAA17155 for ; Sun, 10 May 1998 21:59:49 -0700 (PDT) (envelope-from Studded@dal.net) Message-ID: <355685C4.D52B88B0@dal.net> Date: Sun, 10 May 1998 21:59:48 -0700 From: Studded Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.05 [en] (X11; I; FreeBSD 2.2.6-STABLE-0507 i386) MIME-Version: 1.0 To: FreeBSD Questions Subject: Generic makefile question Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This isn't related specifically to FreeBSD but I figured someone here would know. :) I am working on cleaning up a makefile (for our ircd) and I've run into a problem. Here are (what I hope are) the relevant bits: SHELL=/bin/sh ALLSUBDIRS=doc include src RM=rm RMARGS=-f THINGSTOCLEAN=*~ \#* *.orig *.rej *.o *pure* ircd version.c chkconf core clean: $(RM) $(RMARGS) $(THINGSTOCLEAN) @for i in $(ALLSUBDIRS); do \ echo "Cleaning $$i";\ ( cd $$i; ${RM} ${RMARGS} *~ \#* *.orig *.rej *.o *pure* ircd version.c chkconf core ; ) \ (these two are one line) done -@if [ -f include/setup.h ] ; then \ echo "To really restart installation, remove include/setup.h" ; \ fi -@if [ -f include/options.h ] ; then \ echo "and include/options.h" ; \ fi Doing it this way it works just fine. However what I'd like to do is: ( cd $$i; ${RM} ${RMARGS} ${THINGSTOCLEAN}; ) \ When I do that, I get this: 55$ make clean rm -f *~ #* *.orig *.rej *.o *pure* ircd version.c chkconf core Syntax error: end of file unexpected (expecting ")") *** Error code 2 Stop. Note that the first one with the same arguments works. I tried every combination I could think of using $(var), ${var}, spaces, semicolons, etc. The only thing that didn't give me that error was: ( cd $$i; ${RM} ${RMARGS} "${THINGSTOCLEAN}"; ) \ However it apparently didn't expand the variable because nothing got deleted. Any help would be appreciated, including pointers to on line tutorials. Yes, I've read the man page about a thousand times now so if the answer's there a quote would be a good thing. :) Thanks, Doug -- *** Chief Operations Officer, DALnet IRC network *** *** Proud designer and maintainer of the world's largest Internet *** Relay Chat server with 5,328 simultaneous connections. *** Try spider.dal.net on ports 6662-4 (Powered by FreeBSD) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message