From owner-freebsd-questions Sun Nov 5 22:11:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from po3.wam.umd.edu (po3.wam.umd.edu [128.8.10.165]) by hub.freebsd.org (Postfix) with ESMTP id 8A41C37B4C5 for ; Sun, 5 Nov 2000 22:11:25 -0800 (PST) Received: from rac1.wam.umd.edu (IDENT:root@rac1.wam.umd.edu [128.8.10.141]) by po3.wam.umd.edu (8.9.3/8.9.3) with ESMTP id BAA10947 for ; Mon, 6 Nov 2000 01:11:24 -0500 (EST) Received: from rac1.wam.umd.edu (IDENT:sendmail@localhost [127.0.0.1]) by rac1.wam.umd.edu (8.9.3/8.9.3) with SMTP id BAA15909 for ; Mon, 6 Nov 2000 01:11:23 -0500 (EST) Received: from localhost (gollucci@localhost) by rac1.wam.umd.edu (8.9.3/8.9.3) with ESMTP id BAA15905 for ; Mon, 6 Nov 2000 01:11:23 -0500 (EST) X-Authentication-Warning: rac1.wam.umd.edu: gollucci owned process doing -bs Date: Mon, 6 Nov 2000 01:11:23 -0500 (EST) From: "Philip M. Gollucci" To: FreeBSD questions Subject: for constructs on FreeBSD4.1-RELEAE &Solaris 5.7 in Makefiles Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On SunOS rac2.wam.umd.edu 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-60 how does one write a for loop in a Makefile given that the first line is #!/bin/sh I would think that its the same as FreeBSD's make, but apparently its not, or am I missing something here ? I would wrap this at 80 chars, but I didn't want to have to deal with putting extra slashes where I was sure they could go. ie.. my attempt follows NUM_SECONDARIES = 1 2 3 4 secondary: $(OBJS) main.o @$(CPP) $(CPPFLAGS) -o $(NAME)_$@ $(OBJS) main.o @echo "\n" @for i in $(NUM_SECONDARIES); \ do @echo "================ Test Driver $@$i Output ================\n"; -./$(NAME)_$@ < $(SIN)$i > $(MY_POUT); \ -$(DIFF) $(DIFFFLAGS) $(SOUT)$i $(MY_POUT); \ -$(DIFF) $(DIFFFLAGS) $(SLOG)$i $(MY_LOG); \ -$(TIME) ./$(NAME)_$@ < $(SIN)$i > $(MY_POUT); \ done @$(RM) $(NAME)_$@; \ Yes, I read the man pages on make and for which I might add for once and only once, solaris beat the hell out of FreeBSD's documentation for 'for' ***************************************************************************** Philip M. Gollucci (p6m7g8) Web-site : http://www.p6m7g8.com E-mail : gollucci@wam.umd.edu Philip@p6m7g8.com Phone : 301.249.6261 (Home) 301.314.3118 (College) Major : Computer Science Electrical Engineering Minor : Classical & Jazz Performance Current Job : Science, Discovery, & the Universe Webmaster URL: http://www.sdu.umd.edu Resume : http://www.wam.umd.edu/~gollucci/resume.html ***************************************************************************** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message