File: pkgconfig.make

package info (click to toggle)
gnustep-make 2.9.3-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,676 kB
  • sloc: sh: 4,577; objc: 1,031; perl: 453; makefile: 56
file content (87 lines) | stat: -rw-r--r-- 2,402 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

#   -*-makefile-*-
#   Instance/Shared/pkgconifg.make
#
#   Makefile fragment with rules for installing pkg-config files
#
#   Copyright (C) 2016 Free Software Foundation, Inc.
#
#   Author:  Niels Grewe <niels.grewe@halbordnugn.de>
#
#   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 3
#   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.
#   If not, write to the Free Software Foundation,
#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

#
# input variables:
#
#  $(GNUSTEP_INSTANCE)_PKGCONFIG_FILES : the list of .pc files to install
#
#

#
# public targets:
#
#  shared-instance-pkgconfig-install
#  shared-instance-pkgconfig-uninstall
#

# Only add the pc files if pkg-config is enabled in gnustep-make
ifeq ($(GNUSTEP_HAS_PKGCONFIG),yes)
PC_FILES = $($(GNUSTEP_INSTANCE)_PKGCONFIG_FILES)
endif

.PHONY: \
shared-instance-pkgconfig-install \
shared-instance-pkgconfig-uninstall

# This is either the case if no pkg-config files are set or pkg-config has been
# disabled
ifeq ($(PC_FILES),)

shared-instance-pkgconfig-install:

shared-instance-pkgconfig-uninstall:

else # PC_FILES non-emtpy

ifeq ($(GNUSTEP_PKGCONFIG_FRAGMENT),)
GNUSTEP_PKGCONFIG_FRAGMENT=pkgconfig
endif

ifneq ($($(GNUSTEP_INSTANCE)_INSTALL_DIR),)
PC_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_INSTALL_DIR)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_PKGCONFIG_FRAGMENT)
else
PC_INSTALL_DIR = $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_PKGCONFIG_FRAGMENT)
endif


shared-instance-pkgconfig-install: $(PC_INSTALL_DIR)
	$(ECHO_INSTALLING_PKGCONFIG)for file in $(PC_FILES) __done; do \
	  if [ $$file != __done ]; then \
	    $(INSTALL_DATA) $$file \
	          $(PC_INSTALL_DIR)/$$file; \
	  fi; \
	done$(END_ECHO)

# Create the installation directory
$(PC_INSTALL_DIR):
	$(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)

shared-instance-pkgconfig-uninstall:
	$(ECHO_NOTHING)for file in $(PC_FILES) __done; do \
	  if [ $$file != __done ]; then \
	    rm -rf $(PC_INSTALL_DIR)/$$file ; \
	  fi; \
	done$(END_ECHO)
	-$(ECHO_NOTHING)rmdir $(PC_INSTALL_DIR)$(END_ECHO)

endif # PC_FILES = ''