Date: Fri, 23 Feb 2001 10:27:29 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: clc5q AT cobra DOT cs DOT Virginia DOT EDU (Clark L. Coleman) Message-Id: <1438-Fri23Feb2001102729+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp AT delorie DOT com In-reply-to: <9741lv$r2d$1@murdoch.acc.Virginia.EDU> (clc5q AT cobra DOT cs DOT Virginia DOT EDU) Subject: Re: makefile problem References: <9741lv$r2d$1 AT murdoch DOT acc DOT Virginia DOT EDU> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: clc5q AT cobra DOT cs DOT Virginia DOT EDU (Clark L. Coleman) > Newsgroups: comp.os.msdos.djgpp > Date: 22 Feb 2001 21:51:59 GMT > > I have a multi-boot machine (DR-DOS, Win95, WinNT, and Linux). I need > to build a Linux version of some software that I normally edit and > build using DJGPP under NT 4.0. As a result, I would like to use a > makefile to assist in the constant conversion of files from Dos to > Unix format, which will execute the dos2unix.com file that I > downloaded for that purpose. I think this is not the best solution for DOS/Unix cross-platform development. I'd suggest instead to maintain your sources in Unix text format, even on Windows. DJGPP and other DOS/Windows compilers and Make's don't have any problems with Unix-style text files, so you shouldn't have any trouble from the Windows side. The only thing you need is to use an editor that supports Unix-style text files, and doesn't rewrite them with DOS CRLF end-of-line format when you save the file. Emacs is such an editor. Install Emacs on Windows, and all your problems are solved. I'm using this setup for many years, and I have yet to see a single problem with it. > However, when I execute the Makefile with "make all", I get a message > that there is nothing to do. If I delete foo.h from the Unix > directory, then re-make, I get the same message --- the target does > not even exist, yet "there is nothing to make" ! I guess there is > something simple that I am missing about make. I am using the latest > DJGPP gnu make 3.79.1. Here is the Makefile, which resides in the Unix > subdirectory: > > .h.h: > cp $< $@ > dos2unix $@ This will never work: you cannot have a target in a Makefile that depends on itself.