This file is indexed.

/usr/include/pcp/buildrules is in libpcp3 3.8.12ubuntu1.

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
#
# Copyright (c) 2013 Red Hat.
# Copyright (c) 2000,2003,2004 Silicon Graphics, Inc.  All Rights Reserved.
# 
# This program 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.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# Common build rules for gmake
#
ifndef _BUILDRULES_INCLUDED_
_BUILDRULES_INCLUDED_ = 1

ifndef _BUILDDEFS_INCLUDED_
include $(TOPDIR)/src/include/builddefs
endif

#
# Standard targets
#
ifdef CMDTARGET
$(CMDTARGET) : $(SUBDIRS) $(OBJECTS)
	$(CCF) -o $(CMDTARGET) $(LDFLAGS) $(OBJECTS) $(LDLIBS)
endif
ifdef CXXMDTARGET
$(CXXMDTARGET) : $(SUBDIRS) $(OBJECTS)
	$(CXXF) -o $(CXXMDTARGET) $(LDFLAGS) $(OBJECTS) $(LDLIBS)
endif

# GNU make has a built-in recipe for .cc / .C / .cpp, but not for .cxx -> .o
.cxx.o:
	$(CXXF) $(CXXFLAGS) -c $< -o $@
.SUFFIXES: .cxx

ifdef LIBTARGET
ifneq (, $(filter linux freebsd kfreebsd netbsd mingw, $(TARGET_OS)))
_SHAREDOPTS	= -shared -Wl,-soname,$(LIBTARGET)
endif
ifeq ($(TARGET_OS), solaris)
_SHAREDOPTS	= -shared -fpic
endif
ifeq ($(TARGET_OS), darwin)
# libtool doesnt understand -dynamiclib so we need both
_SHAREDOPTS	= -fPIC -dynamic -dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names -arch i386
ifeq ($(PACKAGE_DISTRIBUTION), cocoa)
_SHAREDOPTS	+= -arch x86_64
endif
endif
ifeq ($(TARGET_OS), aix)
_SHAREDOPTS	= -qmkshrobj
endif

ifdef VERSION_SCRIPT
ifneq ($(INVISIBILITY),)
ifeq ($(TARGET_OS), darwin)
# Mac OS X ld(1) takes a different format for the symbols file
# _SHAREDOPTS	+=  -Wl,-exported_symbols_list $(VERSION_SCRIPT)
else
_SHAREDOPTS	+=  -Wl,--version-script=$(VERSION_SCRIPT)
endif
endif
endif

$(LIBTARGET) : $(SUBDIRS) $(OBJECTS)
	$(CC) $(LDFLAGS) $(_SHAREDOPTS) -o $(LIBTARGET) $(OBJECTS) $(LDLIBS) $(LIB_FOR_DLOPEN) $(LIB_FOR_BASENAME)
endif

ifdef STATICLIBTARGET
$(STATICLIBTARGET) : $(SUBDIRS) $(OBJECTS)
ifeq ($(TARGET_OS), darwin)
	libtool -static -o $(STATICLIBTARGET) $?
else
	$(AR) cr $(STATICLIBTARGET) $?
endif
endif

# Suffix rule to support transition for YFILES to OBJECTS
%.tab.h : %.y
	$(YACC) -d -b `basename $< .y` $<

%.tab.c : %.y
	$(YACC) -d -b `basename $< .y` $<

# Dealing with quirks of the various packaging mechanisms
%.py: %.python
	$(LN_S) $< $@

%.pl: %.perl
	$(LN_S) $< $@

ifeq ($(TARGET_OS), mingw)
#
# .exe rule for Windows
#
.SUFFIXES:	.exe
.o.exe:
	$(CCF) -o $* $(LDFLAGS) $(OBJECTS) $(LDLIBS)
endif

clean clobber :: $(SUBDIRS) $(PRO_SUBDIRS) $(SNIA_SUBDIRS)
	rm -rf $(DIRT)
	@rm -fr $(DIRDIRT)
	$(SUBDIRS_MAKERULE)

realclean distclean: clean
	rm -f $(TOPDIR)/src/include/builddefs \
	      $(TOPDIR)/src/include/pcp.conf \
	      $(TOPDIR)/src/include/pcp/config.h \
	      $(TOPDIR)/src/include/pcp/platform_defs.h \
	      $(TOPDIR)/src/include/pcp/pmdbg.h
	rm -f $(TOPDIR)/build/GNUlocaldefs
	rm -f $(TOPDIR)/pcp.lsm

#
# Never blow away subdirs
#
ifdef SUBDIRS
.PRECIOUS: $(SUBDIRS)
endif

src-pcp : $(SRCFILES) $(SUBDIRS)
	@test ! -z "$$SRC_ROOT" || ( echo '$$SRC_ROOT not set ... bozo!' ; echo "... generally unsafe to run make src-pcp outside the Makepkgs script"; exit 1 )
	@test -z "$$DIR" && DIR="."; \
	for f in `echo $^`; do \
	    if test -d $$f ; then \
		$(MAKE) $(MAKEOPTS) -j 1 DIR=$$DIR/$$f -C $$f $@ || exit $$?; \
	    else \
		$(ECHO) $$DIR/$$f; \
	    fi; \
	done

src-link-pcp : $(SRCFILES) $(CONFFILES) $(SUBDIRS)
	@test ! -z "$$SRCLINK_ROOT" || ( echo '$$SRCLINK_ROOT not set ... bozo!' ; echo "... generally unsafe to run make src-link-pcp outside the Makepkgs script"; exit 1 )
	@test -z "$$DIR" && DIR="."; \
	for f in `echo $^`; do \
	    if test -d $$f ; then \
		echo "=== $$DIR/$$f ==="; \
		mkdir $$SRCLINK_ROOT/$$DIR/$$f || exit $$?; \
		$(MAKE) $(MAKEOPTS) -j 1 DIR=$$DIR/$$f -C $$f $@ || exit $$?; \
	    else \
		ln $$f $$SRCLINK_ROOT/$$DIR/$$f || exit $$?; \
	    fi; \
	done

endif

$(_FORCE):

# The depend target does not depend on any other targets (even though it
# actually depends on CFILES and HFILES). This is because there are several
# places where we generate header files (e.g. domain.h is generated for each
# subdir below src/pmdas, and domain.h in turn depends on src/pmns/stdpmid,
# which itself a generated file ...). As a result, you can't run make
# depend after make clobber, because the generated files will be missing.
# 
# So running makedepend is for development use when you change a header
# somewhere and you need to be sure everything that depends on that header
# will be remade properly.

.PHONY : depend $(_FORCE)

depend : $(SUBDIRS)
	$(SUBDIRS_MAKERULE)
	touch dep
	$(MAKEDEPEND) -fdep -- $(CFLAGS) -- $(CFILES)

#
# include dep, but only if it exists
-include dep

# Support for building multiple versions of the same library
ifneq ($(PCP_ALTLIBS),)
$(PCP_ALTLIBS): 
	rm -rf $@
	mkdir $@
	cp GNUlocaldefs.$@ $@/GNUlocaldefs
	$(MAKE) -C src SLDEST=../$@ SLSRC=../src libsrc_symlinks
endif

libsrc_symlinks:
	test -n "$(SLDEST)" -a -d $(SLDEST)
	for f in $(SRCFILES); do \
	    if [ -e $(SLDEST)/$$f -a ! -L $(SLDEST)/$$f ] ; then \
		echo "$$f exists in $(SLDEST) and not a symlink"; exit 1; \
	    fi; \
	    rm -f $(SLDEST)/$$f; $(LN_S) $(SLSRC)/$$f $(SLDEST)/$$f || exit 1; \
	done