On Fri, 2005-07-01 at 00:05 +0300, Angel Tsankov wrote: > Am I taking a bad path if I try to write one makefile to manage (e.g., build > & clean) a project on a couple of platforms? > I'm asking this question, 'casue makefiles seem not to be very portable, > right? > For example, to define a clean target one might have to write: > > clean: ; if exist OutputFiles rmdir /S /Q OutputFiles > > or > > clean: ; if exist OutputFiles rmdir OutputFiles -R > > depending on the platform that make is run on.
The Make language definitely has some "Unix" roots (e.g. the use of space as a list separator), but I've written some pretty successful cross platform Makefiles, and so have many others. You could read my article on Cross-Platform Builds in Dr Dobbs January 2005 (you'll find a free copy of the article here: http://www.electric- cloud.com/resources/). Make itself is cross-platform. John. -- John Graham-Cumming Home: http://www.jgc.org/ Work: http://www.electric-cloud.com/ POPFile: http://getpopfile.org/ GNU Make Standard Library: http://gmsl.sf.net/ _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
