This file is indexed.

/usr/share/latex-mk/xfig.gmk is in latex-mk 2.1-1.1.

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
# -*- Makefile -*-
# $Id: xfig.mk.in.in,v 1.14 2010/03/12 21:21:41 dan Exp $
#
# Makefile fragment for processing xfig files to produce postscript
#
# Copyright (c) 2002, 2003, 2004, 2005, 2006 Dan McMahill
# All rights reserved.
#
# This code is derived from software written by Dan McMahill
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#        This product includes software developed by Dan McMahill
#  4. The name of the author may not be used to endorse or promote products
#     derived from this software without specific prior written permission.
# 
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
#  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
#  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
#  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
#  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
#  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
#  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
#  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#  SUCH DAMAGE.
#


#######################################
#
# README:
#
# To use this makefile fragment, set the variable:
#	XFIGSRCS	= the xfig drawing files (.fig files)
# in your top level Makefile.  You can also specify
# XFIGDIRS which is a list of directories containing
# xfig files.  All xfig files in the specified directories
# are added to XFIGSRCS
#
# The following variables may be overridden in your top level Makefile
#
#  FIG2DEV		= the fig2dev executable
#  FIG2DEV_FLAGS	= flags passed to fig2dev for all exporting
#  FIG2DEV_EPS_FLAGS	= flags passed to fig2dev for exporting to eps
#  FIG2DEV_PDF_FLAGS	= flags passed to fig2dev for exporting to pdf
#
#######################################


# how to call fig2dev to convert xfig files to postscript
FIG2DEV?=		/usr/bin/fig2dev
FIG2DEV_FLAGS?=
FIG2DEV_EPS_FLAGS?=	-L eps
FIG2DEV_PDF_FLAGS?=	-L pdf

#######################################
#
# Process XFIGDIRS, adding to XFIGSRCS
#
#######################################


ifdef XFIGDIRS
XFIGSRCS+= $(foreach __tmp__,$(XFIGDIRS),$(wildcard $(__tmp__)/*.fig))
endif

#######################################
#
# Process proj_XFIGDIRS, adding to proj_XFIGSRCS
#
#######################################


define xfigdirs_template
ifdef $(1)_XFIGDIRS
$(1)_XFIGSRCS+= $(foreach __tmp2__,$($(1)_XFIGDIRS),$(wildcard $(__tmp2__)/*.fig))
endif
endef
$(foreach __tmp__,$(NAME),$(eval $(call xfigdirs_template,$(__tmp__))))

#######################################
# 
# Process proj_XFIGSRCS to add to
# proj_OTHER dependencies
#
#######################################

# if we are using pdflatex, then don't bother with the .eps files
# but create .pdf files instead

ifdef USE_PDFLATEX
XFIGOBJS?=	$(XFIGSRCS:.fig=.pdf)
else
XFIGOBJS?=	$(XFIGSRCS:.fig=.eps)
endif
ALLXFIGOBJS+=	$(XFIGOBJS)


# note, this had to be done in two steps (create proj_XFIGOBJS,
# and then add to proj_OTHER and ALLXFIGOBJS) with GNU make 3.80
# don't really know why.
define xfigobjs_template
ifdef $(1)_XFIGSRCS
ifdef USE_PDFLATEX
$(1)_XFIGOBJS?=	${$(1)_XFIGSRCS:.fig=.pdf}
else
$(1)_XFIGOBJS?=	${$(1)_XFIGSRCS:.fig=.eps}
endif
endif
$(1)_DIST+=		${$(1)_XFIGSRCS}  ${XFIGSRCS}
endef
$(foreach __tmp__,$(NAME),$(eval $(call xfigobjs_template,$(__tmp__))))

define xfigdeps_template
ifdef $(1)_XFIGSRCS
$(1)_OTHER+=	${$(1)_XFIGOBJS}
ALLXFIGOBJS+=	${$(1)_XFIGOBJS}
endif
endef
$(foreach __tmp__,$(NAME),$(eval $(call xfigdeps_template,$(__tmp__))))


#######################################
# 
# Add the dependencies
#
#######################################


OTHER+=	$(XFIGOBJS)
all::		$(ALLXFIGOBJS)

clean::
	$(RM) -f $(ALLXFIGOBJS)

#######################################
# 
# The suffix rules
#
#######################################

.SUFFIXES : .fig .eps .pdf

.fig.eps : 
	$(FIG2DEV) $(FIG2DEV_FLAGS) $(FIG2DEV_EPS_FLAGS) $*.fig $*.eps

.fig.pdf : 
	$(FIG2DEV) $(FIG2DEV_FLAGS) $(FIG2DEV_PDF_FLAGS) $*.fig $*.pdf