discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting gnustep...


From: Richard Frith-Macdonald
Subject: Re: Detecting gnustep...
Date: Mon, 12 Jan 2015 10:01:56 +0000

On 11 Jan 2015, at 17:15, Kevin Ingwersen (Ingwie Phoenix) 
<ingwie2000@googlemail.com> wrote:
> 
> Well, what I basically want to do is, to know if GNUstep is installed on the 
> current host, so that compiler flags and Objective-C/++ features are 
> activated.
> 
> I looked into GNUstep again and had to facepalm, because I realized that the 
> second half of my question was pretty much pointless…
> 
> What are signs/remarks that GNUstep is installed? Is there any -config tool 
> that will tell me that it is installed? Yes I said I looked into it again, 
> but only roughly and at the architecture, not at the actual GNUstep related 
> files, only to see how the windows install looks like.

I'm not entirely sure what you are asking for
The answers I have seen to your query seem to assume that you are asking how 
your code can tell, at compile time, that it is being built in the gnustep 
build environment (or including gnustep headers etc).
However, your meantion of a -config tool implies that perhaps you want to check 
the presence of gnustep before starting to compile any code.
If that's the case, then gnustep-config is probably what you are looking for 
... it's a tool/script which should be present on any machine where a gnustep 
development system is installed (it should be installed where your PATH 
environment variable allows it to be found/executed).
Run 'gnustep-config --help' to see all the things it can report for you.

Fo instance, If you look at gnustep projects you will often see something liek 
this at the start of a make file:

ifeq ($(GNUSTEP_MAKEFILES),)
 GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 
2>/dev/null)
  ifeq ($(GNUSTEP_MAKEFILES),)
    $(warning )
    $(warning Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config!)
    $(warning Perhaps gnustep-make is not properly installed,)
    $(warning so gnustep-config is not in your PATH.)
    $(warning )
    $(warning Your PATH is currently $(PATH))
    $(warning )
  endif
endif

What that's doing is checking to see if the gnustep development environment is 
set up for the current process (the GNUSTEP_MAKEFILES environment variable 
pointing to the build system), and if it isn't, then an attempt is made to use 
the gnustep-config tool to find out where the build system is installed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]