mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-22 22:00:49 +00:00
New file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@12465 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5e069d21aa
commit
1363f3c853
1 changed files with 98 additions and 0 deletions
98
Instance/Shared/headers.make
Normal file
98
Instance/Shared/headers.make
Normal file
|
@ -0,0 +1,98 @@
|
|||
#
|
||||
# Shared/headers.make
|
||||
#
|
||||
# Makefile fragment with rules to install header 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.
|
||||
|
||||
#
|
||||
# input variables:
|
||||
#
|
||||
# $(GNUSTEP_INSTANCE)_HEADER_FILES : the list of .h files to install
|
||||
#
|
||||
# $(GNUSTEP_INSTANCE)_HEADER_FILES_DIR : the dir in which the .h files are
|
||||
#
|
||||
# $(GNUSTEP_INSTANCE)_HEADER_FILES_INSTALL_DIR : the dir in which to install
|
||||
# the .h files
|
||||
#
|
||||
|
||||
#
|
||||
# public targets:
|
||||
#
|
||||
# shared-instance-headers-install
|
||||
# shared-instance-headers-uninstall
|
||||
#
|
||||
|
||||
|
||||
# NB: The 'override' in all this file are needed to override the
|
||||
# Master/rules.make setting of HEADER_FILES and similar variables.
|
||||
# Once that setting will be removed (as it should be), the 'override'
|
||||
# in this file should be removed as well.
|
||||
override HEADER_FILES = $($(GNUSTEP_INSTANCE)_HEADER_FILES)
|
||||
|
||||
.PHONY: \
|
||||
shared-install-headers-install \
|
||||
shared-install-headers-uninstall
|
||||
|
||||
ifeq ($(HEADER_FILES),)
|
||||
|
||||
shared-instance-headers-install:
|
||||
|
||||
shared-instance-headers-uninstall:
|
||||
|
||||
else # we have some HEADER_FILES
|
||||
|
||||
override HEADER_FILES_DIR = $($(GNUSTEP_INSTANCE)_HEADER_FILES_DIR)
|
||||
|
||||
ifeq ($(HEADER_FILES_DIR),)
|
||||
override HEADER_FILES_DIR = .
|
||||
endif
|
||||
|
||||
override HEADER_FILES_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_HEADER_FILES_INSTALL_DIR)
|
||||
|
||||
ifeq ($(HEADER_FILES_INSTALL_DIR),)
|
||||
override HEADER_FILES_INSTALL_DIR = $(GNUSTEP_INSTANCE)
|
||||
endif
|
||||
|
||||
|
||||
shared-instance-headers-install: $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR)
|
||||
for file in $(HEADER_FILES) __done; do \
|
||||
if [ $$file != __done ]; then \
|
||||
$(INSTALL_DATA) $(HEADER_FILES_DIR)/$$file \
|
||||
$(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR)/$$file; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
$(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR):
|
||||
$(MKINSTALLDIRS) $@
|
||||
|
||||
|
||||
shared-instance-headers-uninstall:
|
||||
for file in $(HEADER_FILES) __done; do \
|
||||
if [ $$file != __done ]; then \
|
||||
rm -rf $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR)/$$file ; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# TODO - during uninstall, it would be pretty to remove
|
||||
# $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR) if it's empty.
|
||||
|
||||
endif # HEADER_FILES = ''
|
||||
|
||||
## Local variables:
|
||||
## mode: makefile
|
||||
## End:
|
Loading…
Reference in a new issue