New resource-set.make makefiles

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@12973 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-03-04 18:32:25 +00:00
parent 3631628d2f
commit 86c3d97817
5 changed files with 187 additions and 3 deletions

View file

@ -1,3 +1,12 @@
Mon Mar 4 16:14:52 2002 Nicola Pero <n.pero@mi.flashnet.it>
* GNUmakefile.in (MAKE_FILES): Added resource-set.make.
(MASTER_MAKE_FILES): Added resource-set.make.
(INSTANCE_MAKE_FILES): Added resource-set.make.
* resource-set.make: New makefile.
* Master/resource-set.make: New makefile.
* Instance/resource-set.make: New makefile.
2002-03-02 Richard Frith-Macdonald <rfm@gnu.org>
* GNUstep.sh.in: Don't define GNUSTEP_DEFAULTS_ROOT

View file

@ -75,7 +75,7 @@ VERTAG = `echo $(GNUSTEP_MAKE_VERSION) | tr '.' '_'`
MAKE_FILES = aggregate.make application.make bundle.make service.make \
common.make library-combo.make java.make jni.make library.make \
rules.make target.make names.make \
rules.make target.make names.make resource-set.make \
tool.make ctool.make test-library.make \
objc.make test-application.make test-tool.make subproject.make \
palette.make gswapp.make gswbundle.make clibrary.make \
@ -89,7 +89,7 @@ MASTER_MAKE_FILES = \
application.make bundle.make clibrary.make ctool.make \
documentation.make framework.make gswapp.make gswbundle.make \
library.make objc.make java.make java-tool.make palette.make \
service.make subproject.make test-application.make \
resource-set.make service.make subproject.make test-application.make \
test-library.make test-tool.make tool.make
INSTANCE_MAKE_FILES = \
@ -97,7 +97,7 @@ INSTANCE_MAKE_FILES = \
application.make bundle.make clibrary.make ctool.make \
documentation.make framework.make gswapp.make gswbundle.make \
library.make objc.make java.make java-tool.make palette.make \
service.make subproject.make test-application.make \
resource-set.make service.make subproject.make test-application.make \
test-library.make test-tool.make tool.make
INSTANCE_SHARED_MAKE_FILES = bundle.make headers.make java.make

103
Instance/resource-set.make Normal file
View file

@ -0,0 +1,103 @@
#
# Instace/resources.make
#
# Instance makefile rules to install resource files
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Nicola Pero <nicola@brainstorm.co.uk>
#
# This file is part of the GNUstep Makefile Package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
ifeq ($(RULES_MAKE_LOADED),)
include $(GNUSTEP_MAKEFILES)/rules.make
endif
#
# The name of the set of resources is in the RESOURCE_SET_NAME variable.
# The list of resource file are in xxx_RESOURCE_FILES
# The list of resource directories to create are in xxx_RESOURCE_DIRS
# The directory in which to install the resources is in the
# xxx_RESOURCE_FILES_INSTALL_DIR
# The directory in which the resources are is in the
# xxx_RESOURCE_FILES_DIR (defaults to ./ if omitted)
#
.PHONY: internal-resource_set-install \
internal-resource_set-uninstall
# Determine installation dir
RESOURCE_FILES_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_RESOURCE_FILES_INSTALL_DIR)
RESOURCE_FILES_FULL_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/$(RESOURCE_FILES_INSTALL_DIR)
# Rule to build the installation dir
$(RESOURCE_FILES_FULL_INSTALL_DIR):
$(MKDIRS) $@
# Determine the additional installation dirs to build
RESOURCE_DIRS = $($(GNUSTEP_INSTANCE)_RESOURCE_DIRS)
ifneq ($(RESOURCE_DIRS),)
# Rule to build the additional installation dirs
$(RESOURCE_FILES_FULL_INSTALL_DIR)/$(RESOURCE_DIRS):
$(MKDIRS) $@
endif
# Determine the dir to take the resources from
RESOURCE_FILES_DIR = $($(GNUSTEP_INSTANCE)_RESOURCE_FILES_DIR)
ifeq ($(RESOURCE_FILES_DIR),)
RESOURCE_FILES_DIR = ./
endif
# Determine the list of resource files
RESOURCE_FILES = $($(GNUSTEP_INSTANCE)_RESOURCE_FILES)
#
# We provide two different algorithms of installing resource files.
#
ifeq ($(GNUSTEP_DEVELOPER),)
# Standard one - just run a subshell and loop, and install everything.
internal-resource_set-install: $(RESOURCE_FILES_FULL_INSTALL_DIR) \
$(RESOURCE_FILES_FULL_INSTALL_DIR)/$(RESOURCE_DIRS)
for file in $(RESOURCE_FILES) __done; do \
if [ $$file != __done ]; then \
$(INSTALL_DATA) $(RESOURCE_FILES_DIR)/$$file \
$(RESOURCE_FILES_FULL_INSTALL_DIR)/$$file; \
fi; \
done
else
# One optimized for recurrent installations during development - this
# rule installs a single file only if strictly needed
$(RESOURCE_FILES_INSTALL_DIR)/% : $(RESOURCE_FILES_DIR)/%
$(INSTALL_DATA) $< $@
# This rule depends on having installed all files
internal-resource_set-install: \
$(RESOURCE_FILES_FULL_INSTALL_DIR) \
$(RESOURCE_FILES_FULL_INSTALL_DIR)/$(RESOURCE_DIRS) \
$(addprefix $(RESOURCE_FILES_FULL_INSTALL_DIR)/,$(RESOURCE_FILES))
endif
internal-resource_set-uninstall:
for file in $(RESOURCE_FILES) __done; do \
if [ $$file != __done ]; then \
rm -rf $(RESOURCE_FILES_FULL_INSTALL_DIR)/$$file ; \
fi; \
done

42
Master/resource-set.make Normal file
View file

@ -0,0 +1,42 @@
#
# Master/resource-set.make
#
# Master makefile rules to install resource files
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Nicola Pero <nicola@brainstorm.co.uk>
#
# This file is part of the GNUstep Makefile Package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
ifeq ($(RULES_MAKE_LOADED),)
include $(GNUSTEP_MAKEFILES)/rules.make
endif
RESOURCE_SET_NAME := $(strip $(RESOURCE_SET_NAME))
# Only install and uninstall are actually performed for this project type
internal-all:: $(RESOURCE_SET_NAME:=.all.resource-set.subprojects)
internal-install:: $(RESOURCE_SET_NAME:=.install.resource-set.variables)
internal-uninstall:: $(RESOURCE_SET_NAME:=.uninstall.resource-set.variables)
internal-clean:: $(RESOURCE_SET_NAME:=.clean.resource-set.subprojects)
internal-distclean:: $(RESOURCE_SET_NAME:=.distclean.resource-set.subprojects)
$(RESOURCE_SET_NAME):
@$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory \
$@.all.bundle.variables

30
resource-set.make Normal file
View file

@ -0,0 +1,30 @@
#
# resource-set.make
#
# Makefile rules to install resource files.
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Nicola Pero <nicola@brainstorm.co.uk>
#
# This file is part of the GNUstep Makefile Package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
ifeq ($(GNUSTEP_INSTANCE),)
include $(GNUSTEP_MAKEFILES)/Master/resource-set.make
else
ifeq ($(GNUSTEP_TYPE),resource_set)
include $(GNUSTEP_MAKEFILES)/Instance/resource-set.make
endif
endif