delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/02/13:50:21

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4ED91DB8.6090208@gmail.com>
Date: Fri, 02 Dec 2011 18:49:28 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT gmail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: best way to prevent a cygwin build?
References: <4ED88260 DOT 8010004 AT cs DOT cmu DOT edu> <CAEhDDbBcahB3jaicgWr69BjnjRFB6QVsms_2vxEq7sOY-gXg-g AT mail DOT gmail DOT com>
In-Reply-To: <CAEhDDbBcahB3jaicgWr69BjnjRFB6QVsms_2vxEq7sOY-gXg-g@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 02/12/2011 09:47, Csaba Raduly wrote:
> On Fri, Dec 2, 2011 at 8: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. The best I have been
>> able to come up with is a check under each make directive, but that's alot
>> of exceptions where I would think only one would be necessary.
>>
>> I searched the GNU make docs and googled for such, but the best I could see
>> were bailout rules under a given make rule directive. I can find out whether
>> I need to bail by the test "ifeq (Cygwin, $(shell uname -o))" but can't
>> figure out a way to have the makefile ask this question once for the entire
>> set of make directives in it.
> 
> ifeq (Cygwin, $(shell uname -o))
> PLATFORM := CYGWIN
> endif

  Well, in this particular case:

ifeq (Cygwin, $(shell uname -o))
$(error This project does not build in Cygwin)
endif

  Can be placed anywhere in the makefile, no need to modify the build rules.

    cheers,
      DaveK

--
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

- Raw text -


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