From 9623471068acb919fd2c43b46fab4ab589b1146b Mon Sep 17 00:00:00 2001 From: rfm Date: Tue, 19 Jul 2011 09:38:51 +0000 Subject: [PATCH] try to ensure that including objc/runtime.h always works to get the new API. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33583 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 10 ++++++++++ Source/Makefile.postamble | 20 ++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4bbb54d2..e39867eef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2011-07-19 Richard Frith-Macdonald + + * Source/Makefile.postamble: + Install ObjectiveC2 compatibility headers only if that is built (which + should be only if no 'real' objc2 library is available). + Also generate an objc/runtime.h header to include objectiveC2/runtime.h + so that people can just include objc/runtime.h to use the new runtime + API irrespective of whether the API is provided by the actual runtime + library or by the compatibility library. + 2011-07-15 Richard Frith-Macdonald * Source/GNUmakefile: diff --git a/Source/Makefile.postamble b/Source/Makefile.postamble index 50a4fc623..b0e807126 100644 --- a/Source/Makefile.postamble +++ b/Source/Makefile.postamble @@ -46,15 +46,21 @@ after-all:: Info-gnustep.plist # Things to do after installing # -# Unfortunately the way the header files are placed in relationship -# to the source we must install the GNU header manually -# Ayers 2003-07-31: This statement should be reevaluated! +ifeq ($(OBJC2RUNTIME),0) after-install:: $(MKDIRS) $(GNUSTEP_HEADERS)/ObjectiveC2 for file in $(OBJECTIVEC2_HEADERS); do \ $(INSTALL_DATA) ../Headers/ObjectiveC2/$$file \ $(GNUSTEP_HEADERS)/ObjectiveC2/$$file ; \ done + $(MKDIRS) $(GNUSTEP_HEADERS)/objc + echo "#include " \ + > $(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 +# Ayers 2003-07-31: This statement should be reevaluated! +after-install:: $(MKDIRS) $(GNUSTEP_HEADERS)/GNUstepBase for file in $(GNUSTEPBASE_HEADERS); do \ $(INSTALL_DATA) ../Headers/GNUstepBase/$$file \ @@ -80,13 +86,15 @@ after-install:: fi # Things to do before uninstalling -# before-uninstall:: - -# Things to do after 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 ; \ done +endif + +before-uninstall:: for file in $(GNUSTEPBASE_HEADERS); do \ rm -f $(GNUSTEP_HEADERS)/GNUstepBase/$$file ; \ done