From owner-freebsd-questions@FreeBSD.ORG Thu Apr 19 03:33:40 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 849CE16A402 for ; Thu, 19 Apr 2007 03:33:40 +0000 (UTC) (envelope-from kruptos@mlinux.org) Received: from ms-smtp-03.tampabay.rr.com (ms-smtp-03.tampabay.rr.com [65.32.5.133]) by mx1.freebsd.org (Postfix) with ESMTP id 37C7213C489 for ; Thu, 19 Apr 2007 03:33:39 +0000 (UTC) (envelope-from kruptos@mlinux.org) Received: from fnord.quux.edu (36.124.118.70.cfl.res.rr.com [70.118.124.36]) by ms-smtp-03.tampabay.rr.com (8.13.6/8.13.6) with ESMTP id l3J3Xc9S001180 for ; Wed, 18 Apr 2007 23:33:39 -0400 (EDT) From: Kevin Brunelle To: freebsd-questions@freebsd.org Date: Wed, 18 Apr 2007 23:33:36 -0400 User-Agent: KMail/1.9.6 References: <20070417171508.GA12577@ayn.mi.celestial.com> In-Reply-To: <20070417171508.GA12577@ayn.mi.celestial.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704182333.37249.kruptos@mlinux.org> X-Virus-Scanned: Symantec AntiVirus Scan Engine Subject: Re: BSD make vs. GNU make X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2007 03:33:40 -0000 On Tuesday 17 April 2007 13:15:08 Bill Campbell wrote: > The gmake program has many extensions which tend to be used in > the gnu automake, autoconf, libtools system. > > I suspect that gmake will work with most non-gnu Makefiles, but > the reverse is not true. This suspicion is not necessarily true. That is something I learned the hard way back when I was in college. I was doing all my development on FreeBSD in my dorm room but the target machine was Linux. Because I was naive, I didn't concern myself with "which" make I was using. And I hand created a Makefile for my project. I did this in my room and I was referencing the documentation for PMake (/usr/share/doc/psd/12.make) as recommended by the man page. The time of the week comes to move to the lab environment... and I copied my files there and saw a bug. So I started fixing it and ended up on a roll where I wrote a large portion of code. I saved the code, exited vi, and ran make. Well, some syntax in my Makefile and gmake did not agree. And rather than just erroring nicely, it zeroed out my source file and then errored out. I'd lost well over an hour of work which I never really did recreate to my recollection of it. Even though I have saved religiously while working, I have never bothered to commit the changed to the repository so it was all lost. Had I stayed in vi and run make in a subshell or committed my changes... well, can't go back and make better choices now. I've since moved on and that project collects digital dust somewhere... along with the circuit board it was meant to control. I wish I had kept the original Makefile so I know exactly what I did. But at the time I was so panicked that I rewrote it to work with gmake and just remembered to use gmake in my room as well. Anyway, I am rambling. We can't make the assumption that gmake is "backwards" compatible with any other form of make. Actually, we can demonstrate that it's not the case by trying to use gmake with ports... you will find that it fails with an error. At least with ports it's nondestructive. :) -Kevin