mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-22 22:00:49 +00:00
Minor enhancements to bundle rules.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@2465 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4f9cb0395b
commit
9bde507eec
3 changed files with 46 additions and 9 deletions
|
@ -1,3 +1,11 @@
|
|||
Wed Oct 1 11:15:22 1997 Scott Christley <scottc@net-community.com>
|
||||
|
||||
* bundle.make: Add install and uninstall targets. Use bundle
|
||||
extension variable.
|
||||
(BUNDLE_LIBS): Libraries to link against when building a bundle.
|
||||
* rules.make (BUNDLE_EXTENSION): Allow the user to specify a
|
||||
different extension for the bundle directory name.
|
||||
|
||||
Tue Sep 30 14:24:20 1997 Scott Christley <scottc@net-community.com>
|
||||
|
||||
* Add bundle support.
|
||||
|
|
35
bundle.make
35
bundle.make
|
@ -24,17 +24,14 @@
|
|||
#
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
|
||||
|
||||
BUNDLE_LINK_CMD = $(CC) $(ALL_CFLAGS) $@$(OEXT) -o $@ $(ALL_LDFLAGS)
|
||||
|
||||
#
|
||||
# The name of the bundle is in the BUNDLE_NAME variable.
|
||||
# The list of bundle resource file are in xxx_RESOURCES
|
||||
# The list of bundle resource directories are in xxx_RESOURCE_DIRS
|
||||
# where xxx is the bundle name
|
||||
#
|
||||
|
||||
BUNDLE_DIR_NAME := $(foreach bundle,$(BUNDLE_NAME),$(bundle).bundle)
|
||||
BUNDLE_FILE = $(BUNDLE_DIR_NAME)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO)/$(BUNDLE_NAME)
|
||||
BUNDLE_DIR_NAME := $(foreach bundle,$(BUNDLE_NAME),$(bundle)$(BUNDLE_EXTENSION))
|
||||
BUNDLE_FILE := $(BUNDLE_DIR_NAME)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO)/$(BUNDLE_NAME)
|
||||
BUNDLE_STAMPS := $(foreach bundle,$(BUNDLE_NAME),stamp-bundle-$(bundle))
|
||||
BUNDLE_STAMPS := $(addprefix $(GNUSTEP_OBJ_DIR)/,$(BUNDLE_STAMPS))
|
||||
BUNDLE_RESOURCE_DIRS = $(foreach d,$(RESOURCE_DIRS),$(BUNDLE_DIR_NAME)/$(d))
|
||||
|
@ -49,7 +46,8 @@ $(GNUSTEP_OBJ_DIR)/stamp-bundle-% : $(BUNDLE_FILE) bundle-resource-files
|
|||
$(BUNDLE_FILE) : $(C_OBJ_FILES) $(OBJC_OBJ_FILES)
|
||||
$(LD) $(BUNDLE_LDFLAGS) $(ALL_LDFLAGS) \
|
||||
$(LDOUT)$(BUNDLE_FILE) \
|
||||
$(C_OBJ_FILES) $(OBJC_OBJ_FILES)
|
||||
$(C_OBJ_FILES) $(OBJC_OBJ_FILES) \
|
||||
$(ALL_LIB_DIRS) $(BUNDLE_LIBS)
|
||||
|
||||
#
|
||||
# Compilation targets
|
||||
|
@ -59,7 +57,7 @@ internal-all:: $(GNUSTEP_OBJ_DIR) $(BUNDLE_DIR_NAME)
|
|||
internal-bundle-all:: $(GNUSTEP_OBJ_DIR) build-bundle-dir build-bundle
|
||||
|
||||
build-bundle-dir::
|
||||
$(GNUSTEP_MAKEFILES)/mkinstalldirs \
|
||||
@$(GNUSTEP_MAKEFILES)/mkinstalldirs \
|
||||
$(BUNDLE_DIR_NAME) \
|
||||
$(BUNDLE_DIR_NAME)/Resources \
|
||||
$(BUNDLE_DIR_NAME)/$(GNUSTEP_TARGET_CPU) \
|
||||
|
@ -74,6 +72,29 @@ bundle-resource-files::
|
|||
$(INSTALL_DATA) $$f $(BUNDLE_DIR_NAME)/$$f ;\
|
||||
done
|
||||
|
||||
#
|
||||
# Install targets
|
||||
#
|
||||
internal-install:: internal-install-dir internal-install-bundle
|
||||
|
||||
internal-install-dir::
|
||||
$(GNUSTEP_MAKEFILES)/mkinstalldirs \
|
||||
$(BUNDLE_INSTALL_DIR) \
|
||||
$(ADDITIONAL_INSTALL_DIRS)
|
||||
|
||||
internal-install-bundle::
|
||||
for f in $(BUNDLE_DIR_NAME); do \
|
||||
cp -dprf $$f $(BUNDLE_INSTALL_DIR) ; \
|
||||
done
|
||||
|
||||
#
|
||||
# Uninstall targets
|
||||
#
|
||||
internal-uninstall::
|
||||
for f in $(BUNDLE_DIR_NAME); do \
|
||||
rm -rf $(BUNDLE_INSTALL_DIR)/$$f ; \
|
||||
done
|
||||
|
||||
#
|
||||
# Cleaning targets
|
||||
#
|
||||
|
|
12
rules.make
12
rules.make
|
@ -82,15 +82,23 @@ $(GNUSTEP_OBJ_DIR)/%${OEXT} : %.m
|
|||
C_FILES="$($*_C_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)"
|
||||
|
||||
%.bundle : FORCE
|
||||
#
|
||||
# The bundle extension (default is .bundle) is defined by BUNDLE_EXTENSION.
|
||||
#
|
||||
ifeq ($(strip $(BUNDLE_EXTENSION)),)
|
||||
BUNDLE_EXTENSION = .bundle
|
||||
endif
|
||||
|
||||
%$(BUNDLE_EXTENSION) : FORCE
|
||||
@echo Making $*...
|
||||
$(MAKE) --no-print-directory internal-bundle-all \
|
||||
@$(MAKE) --no-print-directory internal-bundle-all \
|
||||
BUNDLE_NAME=$* \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)" \
|
||||
RESOURCE_FILES="$($*_RESOURCES)" \
|
||||
RESOURCE_DIRS="$($*_RESOURCE_DIRS)" \
|
||||
BUNDLE_LIBS="$($*_BUNDLE_LIBS)"
|
||||
|
||||
#
|
||||
# The list of Objective-C source files to be compiled
|
||||
|
|
Loading…
Reference in a new issue