Converting Unix Make to Windows

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting Unix Make to Windows

Miller, Jack - Avionics
Converting Unix Make to Windows

I'd appreciate any info on converting make files running in a Sun-Unix environment to Windows (command window or gui).

Thanks

************************************
This e-mail and any files transmitted with it are proprietary and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of ITT Industries, Inc. The recipient should check this e-mail and any attachments for the presence of viruses. ITT Industries accepts no liability for any damage caused by any virus transmitted by this e-mail.
************************************

_______________________________________________
Make-w32 mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/make-w32
Reply | Threaded
Open this post in threaded view
|

Re: Converting Unix Make to Windows

John Graham-Cumming
On Tue, 2005-06-07 at 11:34 -0400, Miller, Jack - Avionics wrote:
> I'd appreciate any info on converting make files running in a Sun-Unix
> environment to Windows (command window or gui).

Is the current system using GNU Make or Sun's make?

If you are simply converting from a Unix environment with GNU Make to
Windows with GNU Make then you'll probably want to get CYGWIN which
includes GNU Make and makes things easy.

My company builds on Linux/Windows/Solaris with the same Makefiles using
GNU Make natively on Linux and Solaris and CYGWIN on Windows.  I wrote
up something like our configuration for Dr Dobbs in January (an article
called Cross Platform Builds that you can read here:
http://www.electric-cloud.com/resources).

If the system is using Sun's make and your plan is to go to Windows and
use GNU Make then you may be able to get away with changing nothing
because GNU Make does a good job of emulating many Sun/SysV make
features. (There is a nice description of the differences in the GNU
Make manual here:
http://www.gnu.org/software/make/manual/html_chapter/make_13.html#SEC125)

Two big differences could bite you if you are going from Sun make to GNU
Make: "target groups" and "keep state":

1. Sun make supports rules in the form:

        a + b: c
                command

which means that _both_ a and b are built by command with prereq c.
There is no equivalent in GNU Make (the only multiple target rules
available in GNU Make are for pattern rules, e.g. %.a %.b: %.c).

2. If .KEEP_STATE: is specified in a Sun make Makefile then Sun make
tracks the commands that are used to build a target and will rebuild a
target if the commands change.  This is used often for different
compilation options.  GNU Make does not support this at all.

If should be fairly easy to grep your Makefiles for either of those
constructs.

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/




_______________________________________________
Make-w32 mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/make-w32
Reply | Threaded
Open this post in threaded view
|

Re: Converting Unix Make to Windows

Earnie
In reply to this post by Miller, Jack - Avionics
On 3:34:49 pm 2005-06-07 "Miller, Jack - Avionics" <[hidden email]>
wrote:
>
> I'd appreciate any info on converting make files running in a Sun-Unix
> environment to Windows (command window or gui).
>

You might want to check out posix emulation.  See http://www.mingw.org or
http://www.cygwin.org.


Earnie

--
       MinGW - http://www.mingw.org/
        Wiki - http://www.mingw.org/MinGWiki/
  Bug Report - http://sourceforge.net/tracker/?group_id=2435&atid=102435
Submit Patch - http://sourceforge.net/tracker/?group_id=2435&atid=302435
  SF Project - http://sourceforge.net/projects/mingw
 Job Listing - http://sf.net/people/viewjob.php?group_id=2435&job_id=21643
 Job Listing - http://sf.net/people/viewjob.php?group_id=46778&job_id=22223



_______________________________________________
Make-w32 mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/make-w32