From owner-freebsd-questions Tue Jan 29 1:47:55 2002 Delivered-To: freebsd-questions@freebsd.org Received: from ralf.artlogix.com (sense-mcglk-240.oz.net [216.39.168.240]) by hub.freebsd.org (Postfix) with ESMTP id E285437B400 for ; Tue, 29 Jan 2002 01:47:49 -0800 (PST) Received: by ralf.artlogix.com (Postfix, from userid 1000) id 2B3341B9C2F; Tue, 29 Jan 2002 01:47:49 -0800 (PST) To: questions@freebsd.org Subject: Make question. From: Ken McGlothlen Date: 29 Jan 2002 01:47:48 -0800 Message-ID: <87aduxbi9n.fsf@ralf.artlogix.com> Lines: 51 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Something Is Odd. I guess I don't understand the .for .. .endfor function. For example, I have a directory loaded with files whose names are in the form yyyymmdd.wmi (yyyy is the four-digit year, mm is the two-digit month, and dd is the two-digit day, with ".wmi" being the "filetype"). When I have a Makefile that goes like this: MONTHS = 200110 200111 200112 200201 MONTHS_WMIS = 200110.wmi 200111.wmi 200112.wmi 200201.wmi DSTS = 200110.html 200111.html 200112.html 200201.html all: $(DSTS) .for MONTH in $(MONTHS) DAY_WMIS != ls -1 ????????.wmi | grep '^'$(MONTH) | sort | uniq $(MONTH).html: $(DAY_WMIS) $(MONTH)i.wmi @echo "MONTHS: " $(MONTHS) @echo "MONTH: " $(MONTH) @echo "DAY_WMIS: " $(DAY_WMIS) @echo "Making --> " $(MONTH).html $(MONTH)i.wmi: $(DAY_WMIS) ls -1 $(DAY_WMIS) | sort > $(MONTH)i.wmi @echo "Making --> " $(MONTH)i.wmi .endfor and type make, I get this: $ make MONTHS: 200110 200111 200112 200201 MONTH: 200110 DAY_WMIS: 20020127.wmi 20020128.wmi Making --> 200110.html MONTHS: 200110 200111 200112 200201 MONTH: 200111 DAY_WMIS: 20020127.wmi 20020128.wmi Making --> 200111.html MONTHS: 200110 200111 200112 200201 MONTH: 200112 DAY_WMIS: 20020127.wmi 20020128.wmi Making --> 200112.html MONTHS: 200110 200111 200112 200201 MONTH: 200201 DAY_WMIS: 20020127.wmi 20020128.wmi Making --> 200201.html $ _ While it appears that the .for loop is working (according to MONTH), the DAY_WMIS value doesn't change. Is there any other way to do this so that it'll work? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message