This file is indexed.

/usr/share/GNUstep/Makefiles/Instance/resource-set.make is in gnustep-make 2.6.6-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
#   -*-makefile-*-
#   Instace/resource-set.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 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.

ifeq ($(RULES_MAKE_LOADED),)
include $(GNUSTEP_MAKEFILES)/rules.make
endif

#
# This is used to install a bunch of resource files somewhere.  It is
# different from a bundle without resources; in a bundle without
# resources, we first create the bundle in the build directory, then
# copy the build to the install dir, overwriting anything already
# there.  This instead will install the separate resource files
# directly in the installation directory; it's more efficient as it
# doesn't create a local bundle, and it doesn't overwrite an existing
# bundle in the installation directory.
#
#
# The name of the set of resources is in the RESOURCE_SET_NAME variable.
# The list of resource files/dirs is 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_INSTALL_DIR
# The directory in which the resources are is in the 
#                xxx_RESOURCE_FILES_DIR (defaults to ./ if omitted)
# The list of LANGUAGES is in the xxx_LANGUAGES variable.
# The list of localized files/dirs to be read from yyy.lproj and copied
#    into $(RESOURCE_FILES_INSTALL_DIR)/yyy.lproj for each language yyy
#    is in the xxx_LOCALIZED_RESOURCE_FILES variable.
# The list of localized dirs to be created empty inside each
#    $(RESOURCE_FILES_INSTALL_DIR)/yyy.lproj for each language yyy
#    is in the xxx_LOCALIZED_RESOURCE_DIRS variable.

.PHONY: internal-resource_set-install_ \
        internal-resource_set-uninstall_

#
# Determine where to install.  By default, install into GNUSTEP_RESOURCES/GNUSTEP_INSTANCE
#
ifneq ($($(GNUSTEP_INSTANCE)_INSTALL_DIR),)
  RESOURCE_FILES_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_INSTALL_DIR)
endif

ifeq ($(RESOURCE_FILES_INSTALL_DIR),)
  RESOURCE_FILES_INSTALL_DIR = $(GNUSTEP_RESOURCES)/$(GNUSTEP_INSTANCE)
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)
RESOURCE_DIRS = $($(GNUSTEP_INSTANCE)_RESOURCE_DIRS)

ifneq ($(RESOURCE_DIRS),)
# Rule to build the additional installation dirs
$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(RESOURCE_DIRS)):
	$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
ifneq ($(CHOWN_TO),)
	$(ECHO_CHOWNING)$(CHOWN) -R $(CHOWN_TO) $@$(END_ECHO)
endif
endif

# Rule to build the installation dir
$(RESOURCE_FILES_INSTALL_DIR):
	$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
ifneq ($(CHOWN_TO),)
	$(ECHO_CHOWNING)$(CHOWN) -R $(CHOWN_TO) $@$(END_ECHO)
endif

# Determine the list of localized resource files
LOCALIZED_RESOURCE_FILES = $($(GNUSTEP_INSTANCE)_LOCALIZED_RESOURCE_FILES)
LOCALIZED_RESOURCE_DIRS = $($(GNUSTEP_INSTANCE)_LOCALIZED_RESOURCE_DIRS)

ifneq ($(LOCALIZED_RESOURCE_DIRS),)
# The following expression will create all the
# RESOURCE_FILES_INSTALL_DIR/LANGUAGE/LOCALIZED_RESOURCE_DIR that we
# need to build.
$(foreach LANGUAGE,$(LANGUAGES),$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/$(LANGUAGE), $(LOCALIZED_RESOURCE_DIRS))):
	$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
ifneq ($(CHOWN_TO),)
	$(ECHO_CHOWNING)$(CHOWN) -R $(CHOWN_TO) $@$(END_ECHO)
endif
endif

#
# 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_INSTALL_DIR) \
  $(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(RESOURCE_DIRS)) \
  $(foreach LANGUAGE,$(LANGUAGES),$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/$(LANGUAGE), $(LOCALIZED_RESOURCE_DIRS)))
ifneq ($(RESOURCE_FILES),)
	$(ECHO_NOTHING)for f in $(RESOURCE_FILES); do \
	  if [ -f $$f -o -d $$f ]; then \
	    cp -fr $(RESOURCE_FILES_DIR)/$$f \
	           $(RESOURCE_FILES_INSTALL_DIR)/$$f; \
	  else \
	    echo "Warning: $$f not found - ignoring"; \
	  fi; \
	done$(END_ECHO)
ifneq ($(CHOWN_TO),)
	$(ECHO_CHOWNING)for f in $(RESOURCE_FILES); do \
	  if [ -f $$f -o -d $$f ]; then \
	    $(CHOWN) -R $(CHOWN_TO) $(RESOURCE_FILES_INSTALL_DIR)/$$f; \
	  fi; \
	done$(END_ECHO)
endif
endif
ifneq ($(LOCALIZED_RESOURCE_FILES),)
	$(ECHO_NOTHING)for l in $(LANGUAGES); do \
	  if [ -d $$l.lproj ]; then \
	    $(MKINSTALLDIRS) $(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj; \
	    for f in $(LOCALIZED_RESOURCE_FILES); do \
	      if [ -f $$l.lproj/$$f -o -d $$l.lproj/$$f ]; then \
	        cp -fr $$l.lproj/$$f \
	               $(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj; \
	      else \
	        echo "Warning: $$l.lproj/$$f not found - ignoring"; \
	      fi; \
	    done; \
	  else \
	    echo "Warning: $$l.lproj not found - ignoring"; \
	  fi; \
	done$(END_ECHO)
ifneq ($(CHOWN_TO),)
	$(ECHO_CHOWNING)for l in $(LANGUAGES); do \
	  if [ -d $$l.lproj ]; then \
	    $(CHOWN) -R $(CHOWN_TO) $(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj; \
	    for f in $(LOCALIZED_RESOURCE_FILES); do \
	      if [ -f $$l.lproj/$$f -o -d $$l.lproj/$$f ]; then \
	        $(CHOWN) -R $(CHOWN_TO) $(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj/$$f; \
	      fi; \
	    done; \
	  fi; \
	done$(END_ECHO)
endif
endif

else # Following code turned on by setting GNUSTEP_DEVELOPER=yes in the shell

# TODO/FIXME: Update the code; implement proper
# LOCALIZED_RESOURCE_FILES that also allows directories etc.

.PHONY: internal-resource-set-install-languages

# One optimized for recurrent installations during development - this
# rule installs a single file only if strictly needed
$(RESOURCE_FILES_INSTALL_DIR)/% : $(RESOURCE_FILES_DIR)/%
	$(ECHO_NOTHING)cp -fr $< $(RESOURCE_FILES_DIR)$(END_ECHO)
ifneq ($(CHOWN_TO),)
	$(ECHO_CHOWNING)$(CHOWN) -R $(CHOWN_TO) $@$(END_ECHO)
endif

# This rule depends on having installed all files
internal-resource_set-install_: \
   $(RESOURCE_FILES_INSTALL_DIR) \
   $(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(RESOURCE_DIRS)) \
   $(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(RESOURCE_FILES)) \
   internal-resource-set-install-languages

ifeq ($(LOCALIZED_RESOURCE_FILES),)
internal-resource-set-install-languages:

else

# Rule to build the language installation directories
$(addsuffix .lproj,$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(LANGUAGES))):
	$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)

# install the localized resources, checking the installation date by
# using test -nt ... this doesn't seem to be easy to do using make
# rules because we want to issue a warning if the directory/file can't
# be found, rather than aborting with an error as make would do.
internal-resource-set-install-languages: \
$(addsuffix .lproj,$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(LANGUAGES)))
	$(ECHO_NOTHING)for l in $(LANGUAGES); do \
	  if [ -d $$l.lproj ]; then \
	    for f in $(LOCALIZED_RESOURCE_FILES); do \
	      if [ -f $$l.lproj/$$f ]; then \
	        if [ $$l.lproj -nt $(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj/$$f ]; then \
	        $(INSTALL_DATA) $$l.lproj/$$f \
	                        $(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj; \
	        fi; \
	      else \
	        echo "Warning: $$l.lproj/$$f not found - ignoring"; \
	      fi; \
	    done; \
	  else \
	    echo "Warning: $$l.lproj not found - ignoring"; \
	  fi; \
	done$(END_ECHO)


endif # LOCALIZED_RESOURCE_FILES

endif

# Here we try to remove the directories that we created on install.
# We use a plain rmdir to remove them; if you're manually installing
# any files in them (eg, in an 'after-install' custom rule), you need
# to make sure you remove them (in an 'before-uninstall' custom rule)

internal-resource_set-uninstall_:
ifneq ($(LOCALIZED_RESOURCE_FILES),)
	$(ECHO_NOTHING)for language in $(LANGUAGES); do \
	  for file in $(LOCALIZED_RESOURCE_FILES); do \
	    rm -rf $(RESOURCE_FILES_INSTALL_DIR)/$$language.lproj/$$file;\
	  done; \
	done$(END_ECHO)
endif
ifneq ($(LOCALIZED_RESOURCE_DIRS),)
	-$(ECHO_NOTHING)for language in $(LANGUAGES); do \
	  for dir in $(LOCALIZED_RESOURCE_DIRS); do \
	    rmdir $(RESOURCE_FILES_INSTALL_DIR)/$$language.lproj/$$dir;\
	  done; \
	done$(END_ECHO)
endif
ifneq ($(LOCALIZED_RESOURCE_FILES)$(LOCALIZED_RESOURCE_DIRS),)
	-$(ECHO_NOTHING)for language in $(LANGUAGES); do \
	  rmdir $(RESOURCE_FILES_INSTALL_DIR)/$$language.lproj; \
	done$(END_ECHO)
endif
ifneq ($(RESOURCE_FILES),)
	$(ECHO_NOTHING)for file in $(RESOURCE_FILES); do \
	  rm -rf $(RESOURCE_FILES_INSTALL_DIR)/$$file ; \
	done$(END_ECHO)
endif
ifneq ($(RESOURCE_DIRS),)
	-$(ECHO_NOTHING)for dir in $(RESOURCE_DIRS); do \
	  rmdir $(RESOURCE_FILES_INSTALL_DIR)/$$dir ; \
	done$(END_ECHO)
endif
ifneq ($(RESOURCE_FILES)$(RESOURCE_DIRS),)
	-$(ECHO_NOTHING)rmdir $(RESOURCE_FILES_INSTALL_DIR)$(END_ECHO)
endif