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
|
#*********************************************************************#
# #
# Active-DVI #
# #
# Projet Cristal, INRIA Rocquencourt #
# #
# Copyright 2002-2004, #
# Institut National de Recherche en Informatique et en Automatique. #
# All rights reserved. This file is distributed under the terms of #
# the GNU Lesser General Public License. #
# #
# Jun Furuse, Didier Rmy and Pierre Weis. #
# Contributions by Roberto Di Cosmo, Didier Le Botlan, #
# Xavier Leroy, and Alan Schmitt. #
# #
# Based on Mldvi by Alexandre Miquel. #
#*********************************************************************#
# $Id: Makefile,v 1.127 2004/10/02 21:35:09 weis Exp $
include Makefile.config
YEAR=2004
OLDYEAR=2003
PACKAGE=advi
MAINVERSION=1
SUBVERSION=6
PATCHLEVEL=0
VERSION=$(MAINVERSION).$(SUBVERSION)
FULLVERSION=$(VERSION).$(PATCHLEVEL)
OLDVERSION=1.5
PACKAGEFULLNAME=$(PACKAGE)-$(FULLVERSION)
CVSRELEASETAG=$(PACKAGE)-$(MAINVERSION)_$(SUBVERSION)_$(PATCHLEVEL)
ANNOUNCEFILE=Announce-$(FULLVERSION)
PACKAGEVERSIONFILES=config.ml
DOCVERSIONFILES=tex/advi.sty tex/advi.hva \
doc_src/Includes/advi-version.html doc_src/Includes/env \
doc_src/advi.man
MANFILES=doc/advi.1
HELPFILES=doc/splash.dvi \
doc/scratch_write_splash.dvi doc/scratch_draw_splash.dvi
TEXSTYFILES= \
advi-annot.sty advi-slides.sty argv.sty superpose.sty \
advi-graphicx.sty advi.sty bubble.sty xwindows-colors.sty
TEXEPSFILES= \
advilogo.eps bar.eps caml.eps
STYFILES= $(addprefix tex/, $(TEXSTYFILES))
EPSFILES= $(addprefix tex/, $(TEXEPSFILES))
COPTIONS = -warn-error A -g
COPTOPTIONS = -warn-error A -inline 9
OCAMLC = $(CAML)c $(COPTIONS)
OCAMLOPT = $(CAML)opt.opt $(COPTOPTIONS)
OCAMLDEP = $(CAML)dep
# CAMLIMAGESDIR & CAMLIMAGESLIBS is defined in Makefile.config
MLINCDIRS = $(CAMLIMAGESDIR)
EXEC = advi
MISC = config misc timeout ageometry
OPTIONS = options rc userfile
GRAPHICS = graphicsY11 global_options busy gradient gterm launch \
dvicolor shot laser_pointer
SYMBOL = symbol
DVI = input table pkfont ttfont jfm search \
font glyph devfont units dimension dvi
EFFECTS = drawimage gs transimpl embed
GUI = scratch cdvi driver thumbnails dviview
MODULES = $(MISC) $(OPTIONS) $(GRAPHICS) \
$(SYMBOL) $(DVI) \
$(EFFECTS) grdev addons \
$(GUI) main
LIBRARIES = graphics unix str $(CAMLIMAGESLIBS)
CLIBS = graphics unix str
COBJS = events.o grwm.o grY11.o
CMO_OBJS = $(addsuffix .cmo, $(MODULES))
CMX_OBJS = $(addsuffix .cmx, $(MODULES))
ifeq ($(HAVE_CDK),true)
CMA_OBJS = `cdk_config $(LIBRARIES)`
CMXA_OBJS = `cdk_config -opt $(LIBRARIES)`
CAMLP4_FLAG = `cdk_config -c camlp4`
else
CMA_OBJS = $(addsuffix .cma, $(LIBRARIES))
CMXA_OBJS = $(addsuffix .cmxa, $(LIBRARIES))
CAMLP4_FLAG = -I +camlp4
endif
BYT_OBJS = $(COBJS) $(CMA_OBJS) $(CMO_OBJS)
OPT_OBJS = $(COBJS) $(CMXA_OBJS) $(CMX_OBJS)
INCLUDES = $(addprefix -I , $(MLINCDIRS))
LINK_OPTS = $(addprefix -ccopt -L, $(CLIBDIRS)) \
$(addprefix -cclib -l, $(CLIBS)) \
$(addprefix -cclib , $(WITH_X))
X11_INCLUDES=-I/usr/X11R6/include
BYTCCCOMPOPTS=-fno-defer-pop -Wall -Wno-unused
CFLAGS=$(EXTRA_X11) $(X11_INCLUDES) -O $(BYTCCCOMPOPTS)
default: Makefile.config $(INSTALLTARGET) $(HELPFILES)
all: byt opt doc
allopt: opt doc
allbyt: byt doc
i_want_opt:
@echo "************************** Warning ***************************"
@echo " You have no native code version of the O'Caml compiler."
@echo " For the best exprerience, we strongly recommend to use "
@echo " Active-DVI compiled with the native code compiler (ocamlopt)."
@echo " For further information about ocamlopt, look at:"
@echo " http://caml.inria.fr/"
@echo " If there is no ocamlopt compiler version for your platform,"
@echo " you can still get a slow but fully functional version of"
@echo " Active-DVI, by typing \"make allbyt\" that would build a byte"
@echo " code version (\"make installbyt\" for install.)"
@echo "**************************************************************"
@exit 1
byt: $(EXEC).byt
$(EXEC).byt: $(COBJS) $(CMO_OBJS)
$(OCAMLC) -custom $(INCLUDES) $(BYT_OBJS) $(LINK_OPTS) -o $(EXEC).byt
opt: $(EXEC).opt
$(EXEC).opt: $(COBJS) $(CMX_OBJS)
$(OCAMLOPT) $(INCLUDES) $(OPT_OBJS) $(LINK_OPTS) -o $(EXEC).opt
documentation: $(MANFILES)
cd doc; $(MAKE) all
doc: $(HELPFILES)
if test $(HAVE_HEVEA) = "true"; then ($(MAKE) documentation); fi
config.ml: config.ml.in configure
./configure
veryclean: clean
rm -f Makefile.config config.cache config.log \
config.status config.ml
veryveryclean: veryclean
rm -f configure
install: installopt installman
installbyt:
$(MAKE) install INSTALLTARGET=advi.byt
installopt:: $(INSTALLTARGET) $(HELPFILES)
- install -d ${bindir}
install -m 755 $(INSTALLTARGET) ${bindir}/advi
- install -d $(ADVI_LOC)
install -m 644 $(HELPFILES) $(EPSFILES) $(STYFILES) $(ADVI_LOC)
- install -d $(MANDIR)/man$(MANEXT)
if [ -f conf/jpfonts.conf ]; then \
install -m 644 conf/jpfonts.conf $(ADVI_LOC); fi
texhash
@ if test "x`kpsewhich advi.sty`" = "x"; then \
echo '*** NOTE BEFORE USE ***' ;\
echo Please add $(ADVI_LOC); \
echo to your TEXINPUTS environment variable\!; \
echo '***********************' ;\
fi
installman:
install -m 644 $(MANFILES) $(MANDIR)/man$(MANEXT)
MLFILES = $(addsuffix .ml, $(MODULES))
Makefile.config: Makefile.config.in
./configure
clean::
$(RM) $(EXEC).opt $(EXEC).byt
cd test && $(MAKE) clean
cd doc && $(MAKE) clean
cd examples && $(MAKE) clean
.depend:: Makefile
$(OCAMLDEP) *.mli $(MLFILES) > .depend
gcc -MM -I$(CAMLDIR) $(CFLAGS) $(COBJS:.o=.c) \
| sed -e 's|$(CAMLDIR)/[^ ]*||' >> .depend
chmod a+w .depend
doc/splash.dvi: doc/splash.tex
cd doc; $(MAKE) `basename $@`
doc/scratch_write_splash.dvi: doc/scratch_write_splash.tex
cd doc; $(MAKE) `basename $@`
doc/scratch_draw_splash.dvi: doc/scratch_draw_splash.tex
cd doc; $(MAKE) `basename $@`
doc/advi.1: doc_src/advi.man
cd doc; $(MAKE) `basename $@`
# Just for the authors
# Automatic handling of versionning
version:
for i in $(PACKAGEVERSIONFILES) $(DOCVERSIONFILES); do \
echo $$i; \
$(MV) $$i $$i~; \
sed -e '/ersion/s/$(OLDVERSION)/$(VERSION)/' $$i~ | \
sed -e '/year/s/$(OLDYEAR)/$(YEAR)/' > $$i; \
done
distribution: all documentation
$(MAKE) -f Makefile.distrib distribute
release:
cvs rtag -R $(CVSRELEASETAG) bazar-ocaml/$(PACKAGE)
unrelease:
$(RM) ./release
cvs rtag -R -d $(CVSRELEASETAG) bazar-ocaml/$(PACKAGE)
announce:
mail -n -s "New release of $(PACKAGE)" \
caml-announce@inria.fr < $(ANNOUNCEFILE)
package_distribution: release distribution announce
count:
wc -l *.ml *.mli | sort -n
include Makefile.common
include .depend
|