delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/09/30/10:36:25

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Thu, 30 Sep 2004 16:32:01 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-ID: <01c4a6fa$Blat.v2.2.2$651c3a00@zahav.net.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2
In-reply-to: <cjevll$kje$1@reader10.wxs.nl> (jansb000@planet.nl)
Subject: Re: Problem with cross-platform app: MAKE vs NMAKE
References: <cj9rj1$2in$1 AT reader13 DOT wxs DOT nl> <415980C6 DOT 6080908 AT inti DOT gov DOT ar> <cjevll$kje$1 AT reader10 DOT wxs DOT nl>
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

> From: "jansb000" <jansb000 AT planet DOT nl>
> Date: Wed, 29 Sep 2004 20:37:16 +0200
> 
> I like the idea of splitting the makefile into a "header-part" and a
> "dependency part". The dependency part can be the same for all flavors of
> make.
> 
> If I understand you correctly you use wrappers in part 1 like this:
> SOURCE_NAME=$**         /  $@
> 1ST_PREREQ=$ ???          / = $<
> ALL_PREREQ=$**             / = $^
> 
> Then in part 2 you say:
> my_target.o: my_target.cpp my_target.h
> ...cpp -c $(1st_prereq)
> my_target.exe: my_target.o other.o
> ...cpp -o $(source_name) $(all_prereq) -libraries

Alas, the incompatibilities don't end here.  You will find that the
backslash treatment is completely incompatible, and that using the
forward slash might not work as well, since the tools invoked by NMAKE
think a slash is a command-line switch character, not a directory
separator.

Even more problems lurk in advanced features like recursive Make
invocations, static pattern rules, etc.  If you can get away without
using these, then you are lucky.

In my experience, by far the only practical solution is to use GNU
Make on all platforms.  Yes, that solution is not without problems,
but they are easier worked around than with alternatives.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019