From: mdruiter AT cs DOT vu DOT nl (Ruiter de M) Newsgroups: comp.os.msdos.djgpp Subject: How do I do this with make? Date: 16 Jan 1998 15:28:14 GMT Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Message-ID: <69nuae$492$1@star.cs.vu.nl> NNTP-Posting-Host: sloep109.cs.vu.nl Lines: 36 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I think this is not DJGPP- or DOS-specific, but I hope you are kind enough to answer my question here anyway. :-) I want to do, in a makefile: # -*- makefile -*- 10/%.enc: 10/%.jpg same commands 20/%.enc: 20/%.jpg same commands ... 90/%.enc: 90/%.jpg same commands That is, the commands depend of course on $^ or $@, so strictly they are not the same. What I hope to do is to use ONE dependancy in ONE makefile in ONE run of `make' to handle this, because the names of the dirs can change and I want them in a variable. I have tried all sorts of things but it was not possible. For instance: %/a.enc %/b.enc ....: %/a.jpg %/b.jpg .... same commands This doesn't work (I know this dependancy means something else, every .enc depends on all .jpg's now, but that's not too important), because somehow the %/ is `stripped off' the %/*.jpg somehow. The (make.info) documentation says something like that, but I'm not sure what and why. Any ideas? -- Groeten, Michel. http://www.cs.vu.nl/~mdruiter \----/==\----/ \ / \ / "You know, Beavis, you need things that suck, \/ \/ to have things that are cool", Butt-Head.