From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <97cf6a6e603204e68ecb28ccf32cefa3@vitanuova.com> To: 9fans@cse.psu.edu Date: Fri, 15 Oct 2004 23:23:48 +0100 From: rog@vitanuova.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] mk question Topicbox-Message-UUID: ef1ddd1c-eacd-11e9-9e20-41e7f4b1d025 i'm sure i'm being stupid here, but i can't see how i should solve this problem. i've got build tree which holds (amongst other things) a program to be compiled, which when run processes a data file to produce several source code and some header files as output, which must in turn be compiled. i'd like to express these dependencies in a mkfile. i've written a mkfile that looks like this: # mktypeset produces four output files from a .typeset file. %.b %.m %types.b %types.m: %.typeset mktypeset $stem.typeset # limbo compiles a .b into a .dis %.dis: %.b limbo -gw $stem.b # specify three current .typeset files. TYPESETS=abc grid fs DISFILES=${TYPESETS:%=%.dis} ${TYPESETS:%=%types.dis} # all dis files (apart from mktypeset.dis) depend on the header files $DISFILES: ${TYPESETS:%=%.m} ${TYPESETS:%=%types.m} all:V: $DISFILES mktypeset.dis however, this doesn't express the dependency that mktypeset.dis needs to be built before running it. if i change the first rule to: %.b %.m %types.b %types.m: %.typeset mktypeset.dis mktypeset $stem.typeset then i get: mk: cycle in graph detected at target mktypeset.dis any ideas?