mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Try to tidy/simplify objc2 header support.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34459 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1c23e5145d
commit
5e74b70bff
14 changed files with 56 additions and 19 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
|||
2012-01-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/ObjectiveC2/objc/capabilities.h:
|
||||
* Headers/ObjectiveC2/objc/Availability.h:
|
||||
* Headers/ObjectiveC2/objc/blocks_runtime.h:
|
||||
* Headers/ObjectiveC2/objc/runtime.h:
|
||||
Moved to subdirectory.
|
||||
* Source/Makefile.postamble:
|
||||
* Source/ObjectiveC2/runtime.c:
|
||||
* Source/ObjectiveC2/caps.c:
|
||||
* Source/ObjectiveC2/NSBlocks.m:
|
||||
* Source/ObjectiveC2/blocks_runtime.m:
|
||||
* Headers/GNUstepBase/GSObjCRuntime.h:
|
||||
* Tests/GNUmakefile:
|
||||
* base.make.in:
|
||||
Move ObjectiveC2 headers to objc subdirectory so that we can refer
|
||||
to them using the same objc/headername path as OSX, and use a -I
|
||||
directive to point to the ObjectiveC2 directory to avoid installing
|
||||
on top of the real objc2 library or vie versa. Should make it easier
|
||||
to figure out how to cleanly swith between raeal/emulated objc2
|
||||
runtimes. This should also mean that old emulated objc2 headers are
|
||||
*not* found at configure time, so configure should be able to tell if
|
||||
a real objc2 runtime has been installed on a system which previously
|
||||
used the old objc runtime.
|
||||
|
||||
2012-01-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLDocument.m:
|
||||
|
|
|
@ -82,8 +82,7 @@
|
|||
#else
|
||||
/* We emulate an ObjC2 runtime.
|
||||
*/
|
||||
#include <objc/objc-api.h>
|
||||
#include <ObjectiveC2/runtime.h>
|
||||
#include <ObjectiveC2/objc/runtime.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include "ObjectiveC2/Availability.h"
|
||||
|
||||
#include "ObjectiveC2/objc/Availability.h"
|
||||
|
||||
#if defined(ERROR_UNSUPPORTED_RUNTIME_FUNCTIONS)
|
||||
# define OBJC_GNU_RUNTIME_UNSUPPORTED(x) \
|
|
@ -49,13 +49,11 @@ after-all:: Info-gnustep.plist
|
|||
ifeq ($(OBJC2RUNTIME),0)
|
||||
after-install::
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/ObjectiveC2
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/ObjectiveC2/objc
|
||||
for file in $(OBJECTIVEC2_HEADERS); do \
|
||||
$(INSTALL_DATA) ../Headers/ObjectiveC2/$$file \
|
||||
$(GNUSTEP_HEADERS)/ObjectiveC2/$$file ; \
|
||||
$(INSTALL_DATA) ../Headers/ObjectiveC2/objc/$$file \
|
||||
$(GNUSTEP_HEADERS)/ObjectiveC2/objc/$$file ; \
|
||||
done
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/objc
|
||||
echo "#include <ObjectiveC2/runtime.h>" \
|
||||
> $(GNUSTEP_HEADERS)/objc/runtime.h
|
||||
endif
|
||||
# Unfortunately the way the header files are placed in relationship
|
||||
# to the source we must install the GNU header manually
|
||||
|
@ -88,9 +86,8 @@ after-install::
|
|||
# Things to do before uninstalling
|
||||
ifeq ($(OBJC2RUNTIME),0)
|
||||
before-uninstall::
|
||||
rm -f $(GNUSTEP_HEADERS)/objc/runtime.h; \
|
||||
for file in $(OBJECTIVEC2_HEADERS); do \
|
||||
rm -f $(GNUSTEP_HEADERS)/ObjectiveC2/$$file ; \
|
||||
rm -f $(GNUSTEP_HEADERS)/ObjectiveC2/objc/$$file ; \
|
||||
done
|
||||
endif
|
||||
|
||||
|
|
|
@ -1216,7 +1216,10 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
*/
|
||||
if (aClass == [NSObject class])
|
||||
{
|
||||
return _gnustep_bundle;
|
||||
if (nil != _gnustep_bundle)
|
||||
{
|
||||
return _gnustep_bundle;
|
||||
}
|
||||
}
|
||||
|
||||
[load_lock lock];
|
||||
|
|
|
@ -16,9 +16,9 @@ BOOL objc_create_block_classes_as_subclasses_of(Class super)
|
|||
#else
|
||||
|
||||
#import <objc/objc-api.h>
|
||||
#import "ObjectiveC2/runtime.h"
|
||||
#import "ObjectiveC2/objc/runtime.h"
|
||||
|
||||
#import "ObjectiveC2/blocks_runtime.h"
|
||||
#import "ObjectiveC2/objc/blocks_runtime.h"
|
||||
#include <assert.h>
|
||||
|
||||
struct objc_class _NSConcreteGlobalBlock;
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#import "ObjectiveC2/blocks_runtime.h"
|
||||
#import "ObjectiveC2/runtime.h"
|
||||
#import "ObjectiveC2/objc/blocks_runtime.h"
|
||||
#import "ObjectiveC2/objc/runtime.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ObjectiveC2/capabilities.h"
|
||||
#include "ObjectiveC2/objc/capabilities.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ObjectiveC2/runtime.h"
|
||||
#include "ObjectiveC2/objc/runtime.h"
|
||||
|
||||
/* Make glibc export strdup() */
|
||||
|
||||
|
|
|
@ -54,7 +54,8 @@ all::
|
|||
#
|
||||
# 'make check' runs the testsuite (Objective-C tests only)
|
||||
#
|
||||
# Use 'make check GNUSTEP_TEST_OBJCXX=yes' to run both Objective-C and Objective-C++ tests
|
||||
# Use 'make check GNUSTEP_TEST_OBJCXX=yes' to run both Objective-C
|
||||
# and Objective-C++ tests
|
||||
#
|
||||
check::
|
||||
(\
|
||||
|
@ -68,7 +69,11 @@ check::
|
|||
export ADDITIONAL_LIB_DIRS;\
|
||||
export LD_LIBRARY_PATH;\
|
||||
export PATH;\
|
||||
gnustep-tests base;\
|
||||
if [ "$(DEBUG)" = "" ]; then \
|
||||
gnustep-tests base;\
|
||||
else \
|
||||
gnustep-tests --debug base;\
|
||||
fi; \
|
||||
)
|
||||
|
||||
clean::
|
||||
|
|
|
@ -50,6 +50,13 @@ ifeq ($(BASE_MAKE_LOADED),)
|
|||
FND_LIBS = -lgnustep-baseadd -framework Foundation
|
||||
endif
|
||||
|
||||
# Is the ObjC2 runtime real or emulated?
|
||||
# If it's not real, we need to use the emulation ObjectiveC2 headers.
|
||||
OBJC2RUNTIME=@OBJC2RUNTIME@
|
||||
ifeq ($(OBJC2RUNTIME),0)
|
||||
AUXILIARY_OBJCFLAGS += -I$(GNUSTEP_HEADERS)/ObjectiveC2
|
||||
endif
|
||||
|
||||
# For literal string handling, base requires the compiler to store the
|
||||
# string as UTF-8
|
||||
AUXILIARY_OBJCFLAGS += @GS_EXEC_CHARSET@
|
||||
|
|
Loading…
Reference in a new issue