1 #################################################################################
5 # This file defines Make variables for standard directories
8 #################################################################################
11 #-----------------------------------------------------------------
16 #-----------------------------------------------------------------------------
17 # install configuration
19 # The install standard target is guided by the following four variables
21 # INSTALL_PROGS (installed in $(bindir))
22 # INSTALL_LIBS (installed in $(libdir))
23 # INSTALL_LIBEXECS (installed in $(libexecdir))
24 # INSTALL_DATAS (installed in $(datadir))
26 # see target.mk for more information.
30 # Setting user/group ownership for the installed entities
32 # this stuff about "who" does the installing doesn't have make vars
33 # as it is not intended to be run-time changeable.
36 INSTALL_OWNER = -o $(OWNER)
42 INSTALL_GROUP = -g $(GROUP)
47 SRC_INSTALL_OPTS += $(INSTALL_OWNER) $(INSTALL_GROUP)
50 # Invocations of `install' for the three different classes
54 INSTALL_PROGRAM = $(INSTALL)
55 INSTALL_DATA = $(INSTALL) -m 644
56 INSTALL_DIR = $(FPTOOLS_TOP)/glafp-utils/mkdirhier/mkdirhier
59 # The install variables does not have any defaults,
60 # what files to install have to be specified in the Makefiles.
62 #INSTALL_PROGS += $(HS_PROG) $(C_PROG)
63 #INSTALL_LIBS += $(LIBRARY)
64 #INSTALL_DATAS += $(HS_IFACES)
66 #-----------------------------------------------------------------------------
67 # Man pages & Documentation
69 # (AFAIK, not currently used)
72 #man1dir = $(mandir)/man1
75 #man2dir = $(mandir)/man2
77 #man3dir = $(mandir)/man3
79 #man4dir = $(mandir)/man4
81 #man5dir = $(mandir)/man5
83 #man6dir = $(mandir)/man6
85 #man7dir = $(mandir)/man7
87 #man8dir = $(mandir)/man8
90 ## top of manual page tree to install in
91 ## NB: not necessarily the same place as to look for man pages (?)
92 #INSTALL_MAN_ROOT = $(mandir)
94 ## prefix for man page _sources_ (vs .../cat)
95 #INSTALL_MAN_SRCROOT = $(INSTALL_MAN_ROOT)/man
97 ## man pages for commands
98 #INSTALL_COMMAND_DIR = $(INSTALL_MAN_SRCROOT)$(COMMANSUFFIX)
100 ## man pages for library routines
101 #INSTALL_LIB_MANDIR = $(INSTALL_MAN_SRCROOT)$(LIBMANSUFFIX)
103 ## man pages for system commands
104 #INSTALL_SYS_MANDIR = $(INSTALL_MAN_SRCROOT)$(SYSMANSUFFIX)
106 ## suffix for installing commands'/etcs' man pages
111 INSTALL_INFO_DIR = $(infodir)
117 -m 0755 $(INSTALL_OWNER) $(INSTALL_GROUP) $(INSTALL_FILE_FLAGS) $(INSTALL_STRIP)
123 #################################################################################
125 # Standard variable names
127 #################################################################################
130 # The fptools mk setup defines a set of standard names which are used by the standard
131 # targets provided by mk. One example of this is the use of standard names
132 # for specifying what files to compile, their intermediate/object code, and
133 # the name of the final executable. Based on the settings of these variables, the
134 # standard targets will generate/expand rules that automatically compile and
139 # SRCS - sources, might be prefixed to indicate what type of source
141 # OBJS - object files (possibly prefixed).
143 # PROG - name of final executable
147 # BOOT_SRCS: list of machine generated Haskell modules.
148 # HS_SRCS: list of Haskell modules you want to compile.
149 # (also use by depend rule).
150 # HS_OBJS: list of corresponding object files
151 # HS_PROG: program that is ultimately linked.
152 # HS_IFACES: list of interface files generated
153 # (caveat: assuming no funny use of -hisuf and that
154 # file name and module name match)
156 SRCS=$(wildcard *.lhs *.hs *.c *.lc *.prl *.lprl *.lit *.verb)
158 HS_SRCS=$(filter %.lhs %.hs %.hc,$(SRCS))
160 # Do not include BOOT_SRCS in the HS_SRCS defn above,
161 # since this will make HS_SRCS always be non-empty,
162 # which breaks rules like `depend'. Price is that
163 # you have to define BOOT_SRCS before including
166 ifneq "$(BOOT_SRCS)" ""
167 HS_SRCS+=$(BOOT_SRCS)
169 HS_OBJS=$(addsuffix .$(way_)o,$(basename $(HS_SRCS)))
170 HS_IFACES=$(addsuffix .$(way_)hi,$(basename $(HS_SRCS)))
172 C_SRCS=$(filter %.lc %.c,$(SRCS))
173 C_OBJS=$(addsuffix .$(way_)o,$(basename $(C_SRCS)))
175 # SCRIPT_SRCS: list of raw script files (in literate form)
176 # SCRIPT_OBJS: de-litted scripts
177 SCRIPT_SRCS=$(filter %.lprl,$(SRCS))
178 SCRIPT_OBJS=$(addsuffix .prl,$(basename $(SCRIPT_SRCS)))
180 OBJS=$(HS_OBJS) $(C_OBJS) $(SCRIPT_OBJS)
183 # Note that as long as you use the standard variables for setting
184 # which C & Haskell programs you want to work on, you don't have
185 # to set any of the clean variables - the default should do the Right
189 #------------------------------------------------------------------
191 # make depend defaults
193 # The default set of files for the dependency generators to work on
194 # is just their source equivalents.
196 MKDEPENDHS_SRCS=$(HS_SRCS)
197 MKDEPENDC_SRCS=$(C_SRCS)
199 #------------------------------------------------------------------
200 # Clean file make-variables.
202 # The following three variables are used to control
203 # what gets removed when doing `make clean'
205 # MOSTLYCLEAN_FILES object code etc., but not stuff
206 # that is slow to recompile and/or stable
208 # CLEAN_FILES all files that are created by running make.
210 # MAINTAINER_CLEAN_FILES also clean out machine-generated files
211 # that may require extra tools to create.
214 MOSTLY_CLEAN_FILES += $(HS_OBJS) $(C_OBJS)
215 CLEAN_FILES += $(HS_PROG) $(C_PROG) $(SCRIPT_PROG) $(PROG) $(LIBRARY) \
218 MAINTAINER_CLEAN_FILES += .depend $(BOOT_SRCS)
221 # `Standard' set of files to clean out.
223 MOSTLY_CLEAN_FILES += \
224 *.CKP *.ln *.BAK *.bak *.o core a.out errs ,* *.a .emacs_* \
225 tags TAGS *.ind *.ilg *.idx *.idx-prev *.aux *.aux-prev *.dvi *.log \
226 *.toc *.lot *.lof *.blg *.info *.itxi *.itex *.ihtml *.cb
228 #------------------------------------------------------------------
229 # Documentation setup.
231 # Documentation is not normally produced via the default target, but
232 # selectively through a set of standard targets (e.g, dvi, html, etc., see
233 # target.mk). Here we define the variables (and their default settings),
234 # that control the operation of these standard targets.
236 # Documentation variables:
238 # DOC_SRCS = list of documents you want to generate various
239 # forms of documentation from.
240 # DOC_DVI = list of DVI files to generate.
241 # DOC_HTML = list of HTML files to generate
242 # DOC_TEXI = list of TexInfo files to generate
243 # DOC_TEXT = list of simple text files to generate
245 DOC_SRCS=$(wildcard *.tex *.lit)
246 DOC_DVI =$(addsuffix .dvi,$(basename $(DOC_SRCS)))
247 DOC_PS =$(addsuffix .ps,$(basename $(DOC_SRCS)))
248 DOC_TEXI=$(addsuffix .texi,$(basename $(DOC_SRCS)))
249 DOC_HTML=$(addsuffix .html,$(basename $(DOC_SRCS)))
250 DOC_TEXT=$(addsuffix .txt,$(basename $(DOC_SRCS)))
252 CLEAN_FILES += $(DOC_TEXT) $(DOC_HTML) $(DOC_TEXI) $(DOC_PS) $(DOC_DVI)
254 #------------------------------------------------------------------
258 # Following variables are used for creating source and binary distributions:
260 # SRC_DIST_NAME && BIN_DIST_NAME -- the package names
262 # SRC_DIST_FILES = list of extra files to include from a build tree into a source
265 # SRC_DIST_DIR = what the current directory in the source/build tree
266 # maps to in the source distrib. tree being created.
268 SRC_DIST_NAME=$(ProjectNameShort)-$(ProjectVersion)
271 # Binary distributions proceeds as follows:
273 # Fromthe top of a build tree, you do `make binary-dist'. The
274 # canned rule for this (in target.mk) will then do a binary
275 # install to a temporary directory before packaging it all up.
276 # The following variables guide the binary-dist:
278 # BIN_DIST_TMPDIR= the absolute path to where the temporary directory
279 # structure of a binary distribution should be created.
280 # [Default: toplevel from which you issue `make binary-dist']
281 # BIN_DIST_NAME= what to call the thing.
283 # BIN_DIST_DIRS= at the toplevel, list of directories to descend into when
284 # building the distribution tree.
286 # An extra directory variable that is set during bin-dists is $(bindist_top), giving
287 # the abs. path to the root of the binary installation tree. (useful when punting
288 # stuff like README and ANNOUNCE into a distrib, for instance)
290 # The layout of a binary distribution is described in the
291 # installation documentation.