X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.7 required=5.0	tests=AWL,BAYES_00,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4ED90D35.6070306@etr-usa.com>
Date: Fri, 02 Dec 2011 10:39:01 -0700
From: Warren Young <warren@etr-usa.com>
User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: Cygwin-L <cygwin@cygwin.com>
Subject: Re: best way to prevent a cygwin build?
References: <4ED88260.8010004@cs.cmu.edu>
In-Reply-To: <4ED88260.8010004@cs.cmu.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 12/2/2011 12:46 AM, Paul Allen Newell wrote:
>
> I am not happy with having to run two separate source trees and would
> like a way (as in "best standard") to add something to any Maya makefile
> which will prevent execution if it is being compiled on Cygwin.

You might get better answers if you give an example of what you mean by 
"prevent execution".  Not because we don't know what that means in 
general, but because it *is* too general.

For example, if what you were after is to have some programs in a system 
compiled conditionally, Automake + Autoconf makes that easy:

https://www.gnu.org/s/hello/manual/automake/Conditional-Programs.html

If you want something else suppressed, the answer might be different.

Generally speaking, any time you want to do some up-front tests for 
platform compatibility issues that affect how a program gets built, 
Autoconf is probably a good answer.  It is not a pretty tool, but it's 
one of those tools that keeps getting reinvented poorly, so it remains 
the most popular out of lack of better alternatives.

On one of my projects, I use another Automake competitor, Bakefile. 
Bakefile builds Autoconf Makefile.in files, generic GNU Makefiles, 
Visual C++ project files, Xcode project files, etc., all from a single 
high-level description of what you want built.  You can include things 
conditionally based on platform or pretty much any criterion you can 
code up in a Python extension to Bakefile.  Bakefile is not in the 
Cygwin package repo, however, partly because it doesn't build cleanly on 
Cygwin.  The native Windows port works just fine with Cygwin, though.

You might also look at cmake, which competes with the Autotools and 
Bakefile, and *is* in the Cygwin package repo.  I can't tell you 
anything more about it.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

