Mail Archives: djgpp/2001/02/23/03:32:19
> 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.
- Raw text -