This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: best way to prevent a cygwin build?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]