Skip to content

Commit

Permalink
old/mkfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pad committed Jan 31, 2015
1 parent c5ad30a commit 205fbdf
Show file tree
Hide file tree
Showing 7 changed files with 1,268 additions and 0 deletions.
112 changes: 112 additions & 0 deletions commons2/old/mkfile
@@ -0,0 +1,112 @@
# ------------------------------------------------------------------
# $Id: mkfile,v 1.27 2003-07-13 20:55:49 govereau Exp $
# ------------------------------------------------------------------

NAME = cllib
TOP = ..
< $TOP/config/config.mk

# ------------------------------------------------------------------
# paths
# ------------------------------------------------------------------

LIBCMA = ${B}$NAME.cma # bytecode library
LIBCMXA = ${B}$NAME.cmxa # native library

INTERP = evaluating
DEPEND = ${B}DEPEND.$INTERP # store depend information here

# ------------------------------------------------------------------
# (high level) virtual targets
# ------------------------------------------------------------------

NW = `echo *.nw`
HTML = ${NW:%.nw=%.html}
INC = ${NW:%.nw=%.inc}

all:V: $LIBCMA
all.opt:V: $LIBCMXA
dvi:V: $INC
html:V: $HTML
depend:V: $DEPEND

# update and update.opt targets
<$TOP/config/libupdate.mk
update:V: libupdate
update.opt:V: libupdate.opt

# ------------------------------------------------------------------
# cleanup
# ------------------------------------------------------------------

clean.opt:V:
rm -f $B*.cmx $B*.cmxa $B*.o $B*.a

clean:V: clean.opt
rm -f $B*.cmi $B*.cmo $B*.cma

clobber:V: clean dep-clobber
rm -f *.aux *.log *.dvi *.toc *.html
rm -f $B*.ml $B*.ml[ily] $B*.output

# ------------------------------------------------------------------
# rules and tools
# ------------------------------------------------------------------

<$TOP/config/noweb.mk
<$TOP/config/ocaml.mk

# ------------------------------------------------------------------
# important file sets
# ------------------------------------------------------------------

ML = lc.ml \
rc_ast.ml \
rc_parse.ml \
rc_scan.ml \
rc.ml \
pc.ml \
pp.ml \
rx.ml \
srcmap.ml \
verbose.ml

MLI = lc.mli \
pc.mli \
pp.mli \
rc.mli \
rc_ast.mli \
rx.mli \
srcmap.mli \
verbose.mli

ML = ${ML:%.ml=$B%.ml}
MLI = ${MLI:%.mli=$B%.mli}
CMO = ${ML:%.ml=%.cmo}
CMX = ${ML:%.ml=%.cmx}

SCAN = $ML $MLI
<$TOP/config/depend.mk

# ------------------------------------------------------------------
# build the libraries
# ------------------------------------------------------------------

$LIBCMA: dep-chk $CMO
$OCAMLC $OCAMLC_FLAGS -a -o $target $CMO

$LIBCMXA: dep-chk $CMX
$OCAMLO $OCAMLO_FLAGS -a -o $target $CMX

# ------------------------------------------------------------------
# extra rules for cases not covered by noweb.mk
# ------------------------------------------------------------------

${B}rc_parse.mly: rc.nw
$NOTANGLE -Rrc_parse.mly $prereq > $target
${B}rc_scan.mll: rc.nw
$NOTANGLE -Rrc_scan.mll $prereq > $target
${B}rc_ast.mli: rc.nw
$NOTANGLE -L"$LINE" -Rrc_ast.mli $prereq > $target
${B}rc_ast.ml: rc.nw
$NOTANGLE -L"$LINE" -Rrc_ast.ml $prereq > $target
99 changes: 99 additions & 0 deletions docs/old/mkfile
@@ -0,0 +1,99 @@
#
# Manual pages, developer documentation, general musings
#

TOP = ..

<$TOP/config/config.mk
<$TOP/config/latex.mk
<$TOP/config/noweb.mk


PS = cfg.ps better.ps working.ps newtarget.ps modules.ps \
backend.ps refactor.ps qc--.ps qc--internals.ps qc--interp.ps \
release.ps index.ps

# ------------------------------------------------------------------
# High level targets
# ------------------------------------------------------------------

all:V: man ps-$config_has_latex
ps-true:V: $PS

ps-false:VQ:
# do nothing

man:V: qc--.man

update:V: man release-$config_has_latex
cp qc--.1 $TOP/man/man1
cp qc--.1 $TOP/man/man1/qc--.opt.1
cp qc--internals.1 $TOP/man/man1
cp qc--interp.1 $TOP/man/man1

release-true:V: release.ps
release-false:VQ:
# do nothing

update.opt:V: update

install:V: man install-release-$config_has_latex $install_man1
cp qc--.1 $install_man1/qc--.1
cp qc--.1 $install_man1/qc--.opt.1
cp qc--internals.1 $install_man1/qc--internals.1
cp qc--interp.1 $install_man1/qc--interp.1

install-release-true:V: release.ps $install_doc
cp release.ps $install_doc/release.ps

install-release-false:VQ:
# do nothing

install.opt:V: install

clean:V:
rm -f *.dvi *.aux *.log *.toc [a-qs-z]*.ps refactor.ps
rm -f cfg.tex modules.ps*
rm -f stack.tex stack.inc index.tex index.inc
rm -f refactor.tex refactor.inc
rm -f qc--.pdf
rm -f qc--.man

clean.opt:VQ:
echo "nothing to do for $target"

clobber:V: clean

depend:VQ:
: "nothing to do for $target"

# ------------------------------------------------------------------
# The details
# ------------------------------------------------------------------

cfg.tex:D: cfg.nw
$NOWEAVE -delay $prereq > $target
refactor.tex:D: refactor.nw
$NOWEAVE -delay $prereq > $target

modules.ps: modules.txt
a2ps -B -9 -r -f 12 -o $target modules.txt

qc--.ps: qc--.1
groff -man -Tps qc--.1 > $target

qc--internals.ps: qc--internals.1
groff -man -Tps qc--internals.1 > $target

qc--interp.ps: qc--interp.1
groff -man -Tps qc--interp.1 > $target

# The qc--.man file is included as a string into the qc-- binary
# and accessible from Lua as This.manual.

qc--.man:D: qc--.1
GROFF_NO_SGR=1 nroff -man -Tascii qc--.1 | ul -t dump > $target

release.tex:D: release.nw
noweave -delay $prereq > $target
<$TOP/config/install.mk
92 changes: 92 additions & 0 deletions h_asdl/old/mkfile
@@ -0,0 +1,92 @@
# ------------------------------------------------------------------
# $Id: mkfile,v 1.13 2004-08-04 21:33:40 nr Exp $
# ------------------------------------------------------------------

NAME = asdl
TOP = ..
< $TOP/config/config.mk

# ------------------------------------------------------------------
# paths
# ------------------------------------------------------------------

LIBCMA = ${B}$NAME.cma # bytecode library
LIBCMXA = ${B}$NAME.cmxa # native library

INTERP = evaluating
DEPEND = ${B}DEPEND.$INTERP # store depend information here

LIBDIR = ../lib

# ------------------------------------------------------------------
# (high level) virtual targets
# ------------------------------------------------------------------

all:V: $LIBCMA
all.opt:V: $LIBCMXA
depend:V: $DEPEND
dvi \
html:VQ:
echo "nothing to be done for $target"

# update and update.opt targets
<$TOP/config/libupdate.mk
update:V: libupdate
update.opt:V: libupdate.opt

# ------------------------------------------------------------------
# cleanup
# ------------------------------------------------------------------

clean.opt:V:
rm -f $B*.cmx $B*.cmxa $B*.o $B*.a

clean:V: clean.opt
rm -f $B*.cmi $B*.cmo $B*.cma

clobber:V: dep-clobber clean
rm -f *.aux *.log *.dvi *.toc *.html
rm -f $B*.ml $B*.ml[ily] $B*.output

# ------------------------------------------------------------------
# rules and tools for OCaml
# ------------------------------------------------------------------

<$TOP/config/noweb.mk
<$TOP/config/ocaml.mk
NOPOLY=/dev/null

#
# compiler flags used by the rules just included
#

OCAMLC_FLAGS = $OCAMLC_FLAGS -I $LIBDIR
OCAMLO_FLAGS = $OCAMLO_FLAGS -I $LIBDIR

# ------------------------------------------------------------------
# important file sets
# ------------------------------------------------------------------

MLI = share.mli sexpLex.mli sexpPkl.mli pklInt.mli stdPkl.mli\
stdPrims.mli stdPrimsUtil.mli

ML = share.ml sexpLex.ml sexpPkl.ml pklInt.ml stdPkl.ml \
stdPrims.ml stdPrimsUtil.ml

ML = ${ML:%.ml=$B%.ml}
MLI = ${MLI:%.mli=$B%.mli}
CMO = ${ML:%.ml=%.cmo}
CMX = ${ML:%.ml=%.cmx}

SCAN = $ML $MLI
<$TOP/config/depend.mk

# ------------------------------------------------------------------
# build the libraries
# ------------------------------------------------------------------

$LIBCMA: dep-chk $CMO
$OCAMLC $OCAMLC_FLAGS -a -o $target $CMO

$LIBCMXA: dep-chk $CMX
$OCAMLO $OCAMLO_FLAGS -a -o $target $CMX

0 comments on commit 205fbdf

Please sign in to comment.