1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/devel/ml-doc/files/fix-cml-doc.sh.in
Martin Wilke 76a04e3989 - Fix build after lang/sml-nj-devel update
Submitted by:	Johannes 5 Joemann <joemann@beefree.free.de>
2009-11-28 00:59:21 +00:00

39 lines
918 B
Bash

#!/bin/sh
# simple script to fix the sml-nj cml documentation
# source so that it can be used as a test for ml-doc.
DOCSRCDIR='%%PREFIX%%/smlnj/cml/doc'
if [ ! -d "$DOCSRCDIR" ]
then
echo "CML doc sources not found in directory $DOCSRCDIR"
echo "Install lang/sml-nj-devel with option WITH_EVERYTHING"
exit 1
fi
cp -r "$DOCSRCDIR" ./cml-doc
cd cml-doc/
sed -i .orig -e 's#/Users/jhr/Work/sml-basis/Basis/##' Config.cfg
mkdir Info
mkdir HTML
mv ML-Doc/lib/* ML-Doc/
rmdir ML-Doc/lib
sed -i .orig -e 's#/Users/jhr/Work/Tools#%%PREFIX%%/share#' CATALOG
sed -i .orig \
-e 's/STRID="CML"/STRID="RunCML"/' \
-e 's/SIGID="CML"/SIGID="RunCML"/' \
-e 's/FILE=CML-SIG/FILE=RUNCML-SIG/' \
ML-Doc/run-cml.mldoc
echo '<!ENTITY RUNCML SDATA "RUNCML">' >> Entities.sgml
echo '<!ENTITY RUNCML-SIG SDATA "run-cml-sig.sml">' >> Entities.sgml
find ML-Doc -name '*.mldoc' -print | mk-mldoc-makefile
make