gnustep-dev
[Top][All Lists]
Advanced

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

Re: gnustep-make frameworks: multiple entries in FRAMEWORK_NAME


From: David Ayers
Subject: Re: gnustep-make frameworks: multiple entries in FRAMEWORK_NAME
Date: Thu, 07 Nov 2002 17:15:27 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016

Nicola Pero wrote:

Hi David,

some time ago there was this thread about FRAMEWORK_NAME not supporting
multiple entries ... I now did a further gnustep-make cleanup of the
framework/subproject code - hopefully getting to the point that it should
now work with FRAMEWORK_NAME containing multiple entries.

Let me know if you try it out and have any problems with it.

Hello Nicola,

Works very fine! Thanks a lot! But like I tried to tell you yesterday, (but I seem to have some problems with my ISP's mail server) I still need a bit more integration with the Instance/Shared/headers.make. (all I need right now are some variables but I think we should start to integrate as much as we can.) I have included a patch with this mail, I would like you to consider. (Please disregard any earlier patches that you might have received yesterday from me. They weren't very well researched. I hope this one is better. :-) )

Unfortunately, I had to do one API change which I want to document on the
mailing list -

CURRENT_VERSION_NAME was a globally defined variable ... but if you have
multiple independent frameworks built from the same GNUmakefile, each of
them need to have its own.  So, I had to drop it, and replace it with a
XXX_CURRENT_VERSION_NAME instead.

Similarly for DEPLOY_WITH_CURRENT_VERSION, which has been replaced by
XXX_DEPLOY_WITH_CURRENT_VERSION.
I've been wondering about the value of the CURRENT_VERSION and DEPLOY_WITH_CURRENT_VERSION mechanism... Because maybe this the technique I could/should use to do what I'm doing with GSWeb... But I'm not sure whether it will work. Once you've checked my patch, and the make system supports the HEADER_FILES_INSTALL_DIR for frameworks, I'll submit my first GSWeb patch. There are still a couple of issues that need to dealt with before it's in such a state that I can safely attempt a new approach, but I don't want to throw out what I've done sofar as it works rather nicely.

Index: gnustep.local/core/make/Instance/clibrary.make
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/make/Instance/clibrary.make,v
retrieving revision 1.5
diff -u -r1.5 clibrary.make
--- gnustep.local/core/make/Instance/clibrary.make      22 Oct 2002 00:26:19 
-0000      1.5
+++ gnustep.local/core/make/Instance/clibrary.make      7 Nov 2002 16:06:05 
-0000
@@ -26,6 +26,8 @@
# makefile, we currently simply inherit from library.make.  Once we
# actually implement C libraries, we might want to make this makefile
# partially independent from library.make)
+# For now note the following differences:
+# The name of the library is in the CLIBRARY_NAME variable.

#
# It all works as for library.make but we install outside library-combo
Index: gnustep.local/core/make/Instance/framework.make
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/make/Instance/framework.make,v
retrieving revision 1.25
diff -u -r1.25 framework.make
--- gnustep.local/core/make/Instance/framework.make     6 Nov 2002 13:25:19 
-0000       1.25
+++ gnustep.local/core/make/Instance/framework.make     7 Nov 2002 16:06:05 
-0000
@@ -24,6 +24,8 @@
include $(GNUSTEP_MAKEFILES)/rules.make
endif

+include $(GNUSTEP_MAKEFILES)/Instance/Shared/headers.make
+
# FIXME - missing .PHONY declaration

# The name of the framework is in the FRAMEWORK_NAME variable.
@@ -40,6 +42,9 @@
# The list of framework subprojects directories are in xxx_SUBPROJECTS
# The name of the principal class is xxx_PRINCIPAL_CLASS
# The header files are in xxx_HEADER_FILES
+# The directory where the header files are located is xxx_HEADER_FILES_DIR
+# The directory where to install the header files inside the library
+# installation directory is xxx_HEADER_FILES_INSTALL_DIR
# The list of framework web server resource directories are in
#    xxx_WEBSERVER_RESOURCE_DIRS
# The list of localized framework web server GSWeb components are in
@@ -76,8 +81,6 @@
FRAMEWORK_DIR_NAME = $(GNUSTEP_INSTANCE).framework
FRAMEWORK_VERSION_DIR_NAME = 
$(FRAMEWORK_DIR_NAME)/Versions/$(CURRENT_VERSION_NAME)

-HEADER_FILES = $($(GNUSTEP_INSTANCE)_HEADER_FILES)
-
# FIXME - do we really want to link the framework against all libs ?
# That easily makes problems when the framework is loaded as a bundle,
# doesn't it ?
@@ -186,9 +189,9 @@
            $(LN_S) Versions/Current/Headers Headers; \
          fi;)
        @(cd $(DERIVED_SOURCES); \
-         if [ ! -L "$(GNUSTEP_INSTANCE)" ]; then \
+         if [ ! -L "$(HEADER_FILES_INSTALL_DIR)" ]; then \
            $(LN_S) ../$(FRAMEWORK_DIR_NAME)/Headers \
-                    ./$(GNUSTEP_INSTANCE); \
+                    ./$(HEADER_FILES_INSTALL_DIR); \
          fi;)

$(FRAMEWORK_LIBRARY_DIR_NAME):
@@ -205,7 +208,7 @@
ifneq ($(HEADER_FILES),)
        for file in $(HEADER_FILES) __done; do \
          if [ $$file != __done ]; then \
-           $(INSTALL_DATA) ./$$file \
+           $(INSTALL_DATA) $(HEADER_FILES_DIR)/$$file \
                            $(FRAMEWORK_VERSION_DIR_NAME)/Headers/$$file ; \
          fi; \
        done
@@ -354,15 +357,15 @@
endif
        $(ECHO_INSTALLING_HEADERS)cd $(GNUSTEP_HEADERS); \
        if [ "$(HEADER_FILES)" != "" ]; then \
-         if test -L "$(GNUSTEP_INSTANCE)"; then \
-           rm -f $(GNUSTEP_INSTANCE); \
+         if test -L "$(HEADER_FILES_INSTALL_DIR)"; then \
+           rm -f $(HEADER_FILES_INSTALL_DIR); \
          fi; \
-         $(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_HEADERS) 
$(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)/Headers` $(GNUSTEP_INSTANCE); \
+         $(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_HEADERS) 
$(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)/Headers` 
$(HEADER_FILES_INSTALL_DIR) ; \
        fi;$(END_ECHO)
ifneq ($(CHOWN_TO),)
        @(cd $(GNUSTEP_HEADERS); \
        if [ "$(HEADER_FILES)" != "" ]; then \
-         $(CHOWN) $(CHOWN_TO) $(GNUSTEP_INSTANCE); \
+         $(CHOWN) $(CHOWN_TO) $(HEADER_FILES_INSTALL_DIR); \
        fi;)
endif
        @(cd $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR); \
@@ -405,18 +408,18 @@
endif
        $(ECHO_INSTALLING_HEADERS)cd $(GNUSTEP_HEADERS); \
        if [ "$(HEADER_FILES)" != "" ]; then \
-         if test -d "$(GNUSTEP_INSTANCE)"; then \
-           rm -Rf $(GNUSTEP_INSTANCE); \
+         if test -d "$(HEADER_FILES_INSTALL_DIR)"; then \
+           rm -Rf $(HEADER_FILES_INSTALL_DIR); \
          fi; \
-          $(MKINSTALLDIRS) $(GNUSTEP_INSTANCE); \
+          $(MKINSTALLDIRS) $(HEADER_FILES_INSTALL_DIR); \
          cd $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_VERSION_DIR_NAME)/Headers ; \
-            $(TAR) cf - . | (cd  $(GNUSTEP_HEADERS)/$(GNUSTEP_INSTANCE); \
+            $(TAR) cf - . | (cd  
$(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR); \
            $(TAR) xf - ); \
        fi;$(END_ECHO)
ifneq ($(CHOWN_TO),)
        @(cd $(GNUSTEP_HEADERS); \
        if [ "$(HEADER_FILES)" != "" ]; then \
-         $(CHOWN) -R $(CHOWN_TO) $(GNUSTEP_INSTANCE); \
+         $(CHOWN) -R $(CHOWN_TO) $(HEADER_FILES_INSTALL_DIR); \
        fi;)
endif
        (cd $(DLL_INSTALLATION_DIR); \
@@ -445,13 +448,7 @@

# FIXME - uninstall doesn't work
internal-framework-uninstall_::
-       if [ "$(HEADER_FILES)" != "" ]; then \
-         for file in $(HEADER_FILES) __done; do \
-           if [ $$file != __done ]; then \
-             rm -rf $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR)/$$file ; \
-           fi; \
-         done; \
-       fi; \
+       rm -rf $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR) ; \
        rm -rf $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)

#






reply via email to

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