Date: Sun, 11 Apr 1999 14:15:10 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Shawn Hargreaves cc: djgpp AT delorie DOT com Subject: Re: Creating directories from a makefile In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 10 Apr 1999, Shawn Hargreaves wrote: > ---- makefile ---- > > testdir/file.h: file.h testdir > copy file.h testdir > > testdir: > md testdir > > ---- end makefile ---- > > This will correctly create the testdir and copy the header the first > time it is run, but on subsequent runs it will always copy the header > even though the current version is up to date, although it is smart > enough not to try recreating the directory. If I remove testdir from the > testdir/file.h dependencies, the copy works correctly and only takes > place if file.h has changed. I cannot reproduce this behavior. Your Makefile works for me. The only way I could come close was to make file.h be an empty file: it is a ``feature'' of COPY that it doesn't copy empty files (you should see the telltale "0 file(s) copied" message coming from it). So please dig deeper into this, since some other problem might be at work here. Perhaps the environment you tried this in was not clean enough? > Any ideas? It looks like making a file depend on its parent directory is > confusing make A directory is just a file. Make doesn't treat it specially in dependencies, as far as I could see.