VFP=V5,9994
ENGINE=teTeX/TeXLive
NONSTOP=nonstop
AUTREOS=
CMDMAKE=gmake
IENCODING=latin9
VID=$$
LCCTYPE=
SHELL=/bin/sh
CMDO=
ISteTeX=YES
ISMiKTeX=
VISMiKTeX=
ATP=~/texmf
TEXMFLOCAL=/texmf-local
HOMETEXMF=~/texmf
NECESSARYFPCMD=FrenchPro 
INVALIDHOM=
TEXSYSCFG=~/texmf/tex/latex/base/texsys.cfg
TEXMF={!!~/.texlive2005/texmf-config,!!~/.texlive2005/texmf-var,~/texmf,!!/texmf-config,!!/texmf-var,!!/texmf,!!/texmf-local,!!/texmf-dist}
MYTEXMFCNF=~/texmf/web2c/texmf.cnf
MYFMTUTILCNF=~/texmf/web2c/fmtutil.cnf
MYFRLDAT=~/texmf/mltex/french/config/frlicense.dat
MYFMTINIDIR=
MYFMTINI=
MIKTEXFMTDIR=
MIKTEXCNFDIR=
MYMIKTEXDIR=
MYCNFINIDIR=
CNFINIDIR=
MYCNFINIS=
MYCNFINIP=
MYCNFINIL=
WHEREPFMT=~/texmf//source/french/initex
WHERELFMT=~/texmf//source/french/initex
INITEXDIR=~/texmf//source/french/initex
CHECKCNF=checkcnf
TOOLINE=openout_any = a
OO=OO
TIPID=TEXINPUTS.fretex
TILID=TEXINPUTS.frelatex
TIPLINE="TEXINPUTS.fretex = .;""$$""TEXMF/{mltex,etex,tex}/{french,plain,generic,}//"
TIPL0=
TIPL1=
TIPL2=
TIPL3=
TILLINE="TEXINPUTS.frelatex = .;""$$""TEXMF/{mltex,etex,tex}/{french,latex,generic,}//"
TILL0=
TILL1=
TILL2=
TILL3=
PLAINLINE=fretex          etex            language.dat    -translate-file=cp227.tcx -mltex *fretex.ini 
PL0=
PL1=
PL2=
PL3=
PL4=
PL5=
PL6=
REFPLINE=fretex          etex            language.dat    -translate-file=cp227.tcx -mltex *fretex.ini 
LATEXLINE=frelatex        etex            language.dat    -translate-file=cp227.tcx -mltex *frelatex.ini 
LA0=
LA1=
LA2=
LA3=
LA4=
LA5=
LA6=
REFLLINE=frelatex        etex            language.dat    -translate-file=cp227.tcx -mltex *frelatex.ini 
TEXMFPLINE=TEXINPUTS.fretex = .;$TEXMF/{mltex,etex,tex}/{french,plain,generic,}//
PLAINOPT=fretex          etex            language.dat    -translate-file=cp227.tcx -mltex *fretex.ini 
PLAINMOT=etex
FORMATLINE=frelatex        etex            language.dat    -translate-file=cp227.tcx -mltex *frelatex.ini 
TEXMFFLINE=TEXINPUTS.frelatex = .;$TEXMF/{mltex,etex,tex}/{french,latex,generic,}//
FORMATOPT=frelatex        etex            language.dat    -translate-file=cp227.tcx -mltex *frelatex.ini 
FORMATMOT=etex
TEXMFMAIN=/texmf
TMFCONFIG=
TMFVAR=~/.texlive2005/texmf-var
MYPWD=~/texmf//source/french
BAT=
MIK=
TEXHASH=texhash 
TEXHASHCMD=texhash  ~/texmf
TEXHASHBAT=texhash 
THISFILE=~/texmf//source/french/makefile.gen
MAKENAME=makefile.gen
MAKEFILEORG=GNUmakefile
THELOG=GNUmakefile.log
MAXLOGS=YES
PMOTEUR=etex
LMOTEUR=etex
PTEXBINARY=/usr/local/bin2/etex
LTEXBINARY=/usr/local/bin2/etex
RPLTTS=
RLLTTS=
TSSHELLSDIR=
BINEXT=
EXTINI=.ini
SHELLEXT=
ECHO=/bin/sh ~/texmf//source/french/echoandlog makefile.gen:
EXEC=/bin/sh ~/texmf//source/french/execandbat
NL=
LANG=fr_FR
LANGMSG=fr
LOGINNAME=login=bernard
UMASK=0022
TYPEL=
TSYS=
CMD=/bin/sh -ec
INSTALLCMD=/usr/bin/install -c
CAT=cat
CP=/usr/bin/install -c
WCP=
MODBIN=-m 755
MODTXT=-m 644
MOD4ME=gu+rx
INTERACTIVE=
CC=gcc
ERRNOCC=echo
Coptions=-ll
RM=rm -f
CAT=cat
LEX=flex -8
MKDIRS=mkdir -p
VI=vi
NOECHO=@
NOERR=-
MKS=-s
NOAUTOMAIL=yes
TEXCMD=tex
PRINTDVI=dvips
NBPAGES=50
NUMPAGES=-n50
INDEXCMD=makeindex -s ../inputs/mkindex/fridx1.ist
INITID=e
SEDFMTPDF=sed -e s/\pdfoutput=0/\pdfoutput=1/  
SEDFMTFR=cat 
PINITCMD=etex -ini
LINITCMD=etex -ini
CMDLINK=echo  
TEXINPUTS=~/texmf//source/french//:/texmf-local/tex/latex//:/texmf-local/tex/plain//:~/texmf/tex/latex//:~/texmf/tex/latex//:/texmf-dist/tex/plain/base//:~/texmf/tex/generic/hyphen//:/texmf-var/tex/generic/config//:.//
SETINPUTS=TEXINPUTS=~/texmf//source/french//:/texmf-local/tex/latex//:/texmf-local/tex/plain//:~/texmf/tex/latex//:~/texmf/tex/latex//:/texmf-dist/tex/plain/base//:~/texmf/tex/generic/hyphen//:/texmf-var/tex/generic/config//:.//;export TEXINPUTS
RESETINPUTS=TEXINPUTS=;export TEXINPUTS
USHYPHFILE=ushyph.tex
USHYPH1FILE=
USHYPHDIR=~/texmf/tex/generic/hyphen
TEXOPTS=mltex
FONTENCODING=OT1
FNT=
KPSEPATH=~/texmf/mltex
SRCROOT=/texmf-local
WSRCROOT=
DESTIDIR=~/texmf/mltex/french/base
DESTDIR=
DESTDIRDIR=~/texmf/mltex/french/base
DESTLEDIR=~/texmf/tex/latex/frenchle
FORMATS=~/texmf/web2c
TEXDOCS=~/texmf/doc/french/base
HYPHDIR=~/texmf/tex/generic/hyphen
LATEXDIR=~/texmf/tex/latex
PLAINDIR=/texmf-dist/tex/plain/base
LATEXDIRL=/texmf-local/tex/latex
PLAINDIRL=/texmf-local/tex/plain
PDFCFILE=pdftexconfig.tex
PDFTEXDIR=/texmf-var/tex/generic/config
INPUTDIR=~/texmf/mltex/french/base
CONFIGDIR=~/texmf/mltex/french/config
ISTDIR=~/texmf/mltex/french/base
FORMAT=latex
PFMTEXT=fmt
LFMTEXT=fmt
EXTENDEDMODE=
EXTENDEDFMT=
PEXTF=*
LEXTF=*
PEXTEF=-efmt=fretex
LEXTEF=-efmt=frelatex
PFMTNAME=fretex
LFMTNAME=frelatex
INITEXOPT=-mltex
INITDIR=
TEXTCX=-translate-file=cp227.tcx
DVNF=/dev/null
DNF=/dev/null
LNS=ln -s
BINARIES=/usr/local/bin2
BINDIR=~/texmf/bin
CODEC=OSTYPE=darwin
SUPERUSERD=sudo 
SUPERUSERF=
KEYBOARDDIR=${INPUTSDIR}/keyboard
FRENCHDIR=${INPUTSDIR}/french
MLPDIR=${INPUTSDIR}/mlp
MSGDIR=${INPUTSDIR}/msg
OTHERDIR=${INPUTSDIR}/other
MKINDEXDIR=${INPUTSDIR}/mkindex
LF=unix2dos
LFARG=
# Installation of FrenchPro style files for Unix & LaTeX, Bernard Gaulle
#
# Laisser ce fichier "Makefile.in" intact car il est utilisé tel quel par
# le fichier "GNUmakefile" (commande GNU "make -f GNUmakefile"/"gmake").
# Si vous n'avez pas de commande GNU make a disposition vous pouvez
# utiliser la commande "make" sur une copie du fichier makefile.gen (que
# vous appelerez de preference "makefile").
#
########################################################################
# The file "Makefile.in" is used as input file when you type: 
# "gmake -f GNUmakefile"
# (assuming you have that GNU command also named make in few systems).
#
# DON'T MODIFY that "Makefile.in" file, just a copy of the "makefile.gen" 
# file (usually "makefile") but only if you _don't have_ any GNU make 
# command ("gmake" or GNU "make -f GNUmakefile") and are unable to use 
# that "GNUmakefile" file at all.
#                                                   Last mods 2007/03/29
########################################################################
#   generation of files
########################################################################

# Don't work everywhere, use a silent command or argument. 
#.ifdef defined=$DONTECHO
#NOECHO=@
#.endif
# Messages en Francais
E300fr="          B I E N V E N U E pour l'installation de FrenchPro ${VFP}"
E301fr="${NL} 301- Les messages sont enregistres dans ${THELOG}"
E30fr="${NL} 30- Le repertoire de destination n'est pas initialise." 
E31fr="${NL} 31- Merci d'editer d'abord ce fichier $(THISFILE) !" 
E32fr="${NL} 32- La generation est faite, voulez-vous installer le tout : \"$(CMDMAKE) -f ${MAKENAME} install\" ?"
E33fr="${NL} 33- Verifications pour les fichiers formats \
		${PFMTNAME}.$(PFMTEXT) et ${LFMTNAME}.$(LFMTEXT)"
E34fr="${NL} 34- Le fichier de motifs de cesure US choisi est ${USHYPH1FILE}" 
E35fr="${NL} 35- OK, pas d'autre format a (re)creer."
E36fr="${NL} 36- (modifiez la variable "'$$'"INITID si vous en voulez un autre)"
E37fr="${NL} 37- ERREUR a la creation du format ${PFMTNAME} (${PFMTNAME}.$(PFMTEXT) non trouve)." 
E38fr="${NL} 38*- Le format ${PFMTNAME} a ete genere." 
E39fr="${NL} 39*- Il peut etre recree, apres l'installation, par la commande :"
E40fr="${NL} 40*- \"${CMDO} ${NECESSARYFPCMD}fmtutil${TSYS} --byfmt ${PFMTNAME} --fmtdir ${FORMATS}\""

E310fr="${NL}310- ERREUR a la creation du format ${LFMTNAME} (${LFMTNAME}.$(LFMTEXT) non trouve)." 
E311fr="${NL}311*- Le format ${LFMTNAME} a ete genere." 
E312fr="${NL}312- Verifiez eventuellement le fichier ${MYFMTUTILCNF}."
E313fr="${NL}313- Le traducteur kb8to7 est genere."
E314fr="${NL}314- Le traducteur kb7to8 est genere."
E315fr="${NL}315- Attention : kb7to8<=>kb8to7 n'est pas neutre !" 
E316fr="${NL}316- Le test de torture est cree en 8-bits"
E317fr="${NL}317- Le fichier des abreviations est converti en 8-bits"
E318fr="${NL}318- A n'importe quel moment vous pouvez faire \"$(CMDMAKE) -f ${MAKENAME} uninstall\""
E319fr="${NL}319- Les formats ${PFMTNAME} et ${LFMTNAME} sont juste installes."
E320fr="${NL}320- La commande \"${PFMTNAME}\" est prete a l'emploi." 
E321fr="${NL}321- A NOTER que vous pouvez avoir besoin, a la fin, de sortir de session et de vous relogger."  
E322fr="${NL}322- SANS LICENCE ${TYPEL} : UTILISATION VALABLE 1 MOIS, A L'ESSAI."
E323fr="${NL}323- La commande \"${LFMTNAME}\" est prete a l'emploi." 
E324fr="${NL}324- Le codage des fontes ("'$$'"FONTENCODING) est force a ${FONTENCODING}"
E325fr="${NL}325- Les fichiers de configuration sont installes."
E326fr="${NL}326*- Pour localiser les fichiers de FrenchPro utiliser la commande :"
E327fr="${NL}327*- \"${NECESSARYFPCMD}kpsewhich -path ${KPSEPATH}// fichier\"" 
E328fr="${NL}328-          F E L I C I T A T I O N S "
E329fr="${NL}329- Tout est installe (sauf les contribs et les fichiers de test)." 
E329bfr="${NL}329*- Les binaires sont dans : \"${BINDIR}\"." 
E329cfr="${NL}329*- La variable d'environnement "'${VID}'"PATH n'a pas ete changee ; "
E329dfr="${NL}329*- elle est a modifier si necessaire ou sinon vous pouvez"
E329efr="${NL}329*- (comme administrateur/root) recopier les binaires dans " 
E329ffr="${NL}329*- la librairie commune : ${BINARIES} ; pour cela executez " 
E329gfr="${NL}329*- le shell \"${MYPWD}/movebin.sh\"." 
E330fr="${NL}330- NE PAS EFFACER les fichiers source (${MYPWD}) ! "
E331fr="${NL}331- Je vous suggere maintenant \"$(CMDMAKE) -f ${MAKENAME} reftest\""
E331bfr="${NL}331- pour valider le \"test de torture\"."
E332fr="${NL}332- Merci d'envoyer le formulaire d'enregistrement a B.Gaulle"
E333fr="${NL}333- (remplir le fichier REGISTER et l'envoyer a frenchprobg@free.fr)"
E334fr="${NL}334- (ou \"$(CMDMAKE) -f ${MAKENAME} sendmessage\")"
E335fr="${NL}335- Le repertoire racine ("'$$'"DESTDIR) sera : \"${ATP}\""
E336fr="${NL}336- "'$$'"TEXMFLOCAL etait \"${TEXMFLOCAL}\"" 
E337fr="${NL}337- "'$$'"HOMETEXMF etait \"${HOMETEXMF}\" ${INVALIDHOM}" 
E338fr="${NL}338- "'$$'"TEXMF etait \"${TEXMF}\"" 
E339fr="${NL}339- Le codage d'entree est mis a ${IENCODING} ("'$$'"${CODEC})"
E340fr="${NL}340- Les binaires iront dans : \"${BINDIR}\" ("'$$'"BINDIR)" 
E341fr="${NL}341- ERREUR : ${BINDIR} ("'$$'"BINDIR) est en protection ecriture" 
E342fr="${NL}342- Verifier les autorisations ou changer la variable." 
E343fr="${NL}343- ERREUR : ${DESTDIR} ("'$$'"ATP) est en protection ecriture" 
E344fr="${NL}344- "'$$'"TEXMFMAIN etait \"${TEXMFMAIN}\"" 
E345fr="${NL}345- kb7to8 et kb8to7 sont installes"
E346fr="${NL}346- La documentation est installee"
E347fr="${NL}347- Les fichiers d'inputs de FrenchPro sont installes" 
E348fr="${NL}348- Les styles makeindex sont installes"
E349fr="${NL}349- La desinstallation est faite (source non touche)"
E350fr="${NL}350- Le test de torture est fait"
E351fr="${NL}351- Je suggere que vous imprimiez les (${NBPAGES} premieres pages de chaque,"
E352fr="${NL}352- test et reference): \"$(CMDMAKE) -f ${MAKENAME} printed\""
E353fr="${NL}353- Compilation de la licence avec LaTeX standard"
E354fr="${NL}354- (ou \"$(CMDMAKE) -f ${MAKENAME} sendmessage\")"
E355fr="${NL}355- Merci de comparer les sorties imprimees et puis"
E356fr="${NL}356- Ne pas faire attention ici au message event. de warning -29- :"
E357fr="${NL}357- Etes-vous pret maintenant a \"$(CMDMAKE) -f ${MAKENAME} sendmessage\" ?"
E358fr="${NL}358- Controle des fichiers fmtutil.cnf et texmf.cnf"
E359fr="${NL}359- ERREUR : format ${PFMTNAME} inconnu dans ${MYFMTUTILCNF}"
E360fr="${NL}360- ERREUR : format ${LFMTNAME} inconnu dans  ${MYFMTUTILCNF}"
E361fr="${NL}361- ATTENTION : option ${INITEXOPT} non trouvee dans ${MYFMTUTILCNF}"
E362fr="${NL}362- pour le format ${PFMTNAME}."
E363fr="${NL}363- pour le format ${LFMTNAME}."
E364fr="${NL}364- OK pour le format ${PFMTNAME}."
E365fr="${NL}365- OK pour le format ${LFMTNAME}."
E366fr="${NL}366- ERREUR : ligne ${PFMTNAME} manquante dans ${MYTEXMFCNF}"
E367fr="${NL}367- ERREUR : ligne ${LFMTNAME} manquante dans ${MYTEXMFCNF}"
E368fr="${NL}368- Voir documentation dans engines/tetex.pdf"
E369fr="${NL}369- ERREUR: ${MYTEXMFCNF} est protege en ecriture" 
E370fr="${NL}370- Arret de l'installation (ERREUR a corriger)."
E371fr="${NL}371- ${MYFMTUTILCNF} a ete complete avec ${PFMTNAME}."
E372fr="${NL}372- ${MYFMTUTILCNF} a ete complete avec ${LFMTNAME}."
E373fr="${NL}373- ${MYTEXMFCNF} a ete complete avec TEXINPUTS.${PFMTNAME}."
E374fr="${NL}374- ${MYTEXMFCNF} a ete complete avec TEXINPUTS.${LFMTNAME}."
E375fr="${NL}375- OK pour les fichiers de configuration."
E376fr="${NL}376- ("'$$'"PRINTER=\"${PRINTER}\") fichiers prets a imprimer dans le repertoire tst."
E377fr="${NL}377- ERREUR : la commande \"${PFMTNAME}${BINEXT}\" n'est pas trouvee." 
E378fr="${NL}378- ERREUR : la commande \"${LFMTNAME}${BINEXT}\" n'est pas trouvee." 
E379fr="${NL}379- Fin du nettoyage des repertoires."
E380fr="${NL}380- ERREUR : le nom d'utilisateur a change."
E381fr="${NL}381- Mise-a-jour de la base de donnees des fichiers."
E382fr="${NL}382- Retrait des fichiers FrenchPro installes."
E383fr="${NL}383- Controle des fichiers : ${MYFMTINI}, ${MYCNFINIS}."
E384fr="${NL}384- ${MYFMTINIDIR}/${MYFMTINI} a ete complete avec ${PFMTNAME}."
E385fr="${NL}385- ${MYFMTINIDIR}/${MYFMTINI} a ete complete avec ${LFMTNAME}."
E386fr="${NL}386- ${MYCNFINIDIR}/${MYCNFINIP} a ete complete pour ${PFMTNAME}."
E387fr="${NL}387- ${MYCNFINIDIR}/${MYCNFINIL} a ete complete pour ${LFMTNAME}."
E388fr="${NL}388- La commande ${NECESSARYFPCMD}a ete installee."
E388bfr="${NL}388- La pseudo commande ${NECESSARYFPCMD} a ete installee."
E389fr="${NL}389*- Voici les commandes FrenchPro a utiliser pour ${INITID}(la)tex"
E390fr="${NL}390*- avec Plain : \"${NECESSARYFPCMD}${PFMTNAME} fichier.tex\""
E391fr="${NL}391*- avec LaTeX : \"${NECESSARYFPCMD}${LFMTNAME} fichier.tex\""
E392fr="${NL}392*- Il peut etre recree, apres l'installation, par la commande :"
E393fr="${NL}393*- \"${CMDO} ${NECESSARYFPCMD}fmtutil${TSYS} --byfmt ${LFMTNAME} --fmtdir ${FORMATS}\""
E394fr="${NL}394- Retrait de ${PFMTNAME} dans ${MYFMTUTILCNF}."
E395fr="${NL}395- Retrait de ${LFMTNAME} dans ${MYFMTUTILCNF}."
E396fr="${NL}396- Remplacement du lien ${PFMTNAME}."
E397fr="${NL}397- Remplacement du lien ${LFMTNAME}."
E398fr="${NL}398- Remplacement du lien TeXShop altpdffr${PMOTEUR}."
E399fr="${NL}399- Remplacement du lien TeXShop altpdffr${FORMAT}."
E400fr="${NL}400- Anomalie de compilation du test de torture."
E401fr="${NL}401- Considerez l'utilisation de TL2004=NO."
E402fr="${NL}402- Considerez l'utilisation de TL2003=NO."
E403fr="${NL}403- Installation du moteur ${PFMTNAME} pour TeXShop."
E404fr="${NL}404- Installation du moteur ${LFMTNAME} pour TeXShop."
E405fr="${NL}405- Pour un resume d'installation faire : \
                  ${CMDMAKE} -f ${MAKENAME} INFO"
#
E500fr="${NL}500*- L'installation de FrenchPro s'est terminee avec succes."
E501fr="${NL}501*- Ceci est un rappel des informations importantes :"
E502fr="${NL}502*- ======================================================="
E503fr="${NL}503*- L'installation de FrenchPro n'est pas terminee !"

# Messages in English
E300en="          W E L C O M E  for  FrenchPro Installation ${VFP}"
E301en="${NL}301- Messages are logged to ${THELOG}"
E30en="${NL} 30- Destination directories not set." 
E31en="${NL} 31- Please edit the $(THISFILE) first!" 
E32en="${NL} 32- Generation is done, do you want to install it: \"$(CMDMAKE) -f ${MAKENAME} install\"?"
E33en="${NL} 33- Few checkings for formats \
		${PFMTNAME}.$(PFMTEXT) and ${LFMTNAME}.$(LFMTEXT)"
E34en="${NL} 34- Assuming US hyphen file is ${USHYPH1FILE}" 
E35en="${NL} 35- Okay, no more formats need to be (re)built."
E36en="${NL} 36- (modify "'$$'"INITID variable if you want any other)"
E37en="${NL} 37- ERROR creating format ${PFMTNAME} (${LFMTNAME}.$(LFMTEXT) not found)." 
E38en="${NL} 38- The ${PFMTNAME} format has been generated." 
E39en="${NL} 39- It can be rebuilt after installation with the command:"
E40en="${NL} 40- \"${CMDO} ${NECESSARYFPCMD}fmtutil${TSYS} --byfmt ${PFMTNAME} --fmtdir ${FORMATS}\""

E310en="${NL}310- ERROR creating format ${LFMTNAME} (${LFMTNAME}.$(LFMTEXT) not found)." 
E311en="${NL}311*- The ${LFMTNAME} format has been generated." 
E312en="${NL}312- Check possible error in ${MYFMTUTILCNF}."
E313en="${NL}313- kb8to7 translator is generated."
E314en="${NL}314- kb7to8 translator is generated."
E315en="${NL}315- WARNING non-neutral kb7to8<=>kb8to7!" 
E316en="${NL}316- Torture-test created in 8bit"
E317en="${NL}317- Abbreviations file converted to 8bit"
E318en="${NL}318- At any time you can \"$(CMDMAKE) -f ${MAKENAME} uninstall\""
E319en="${NL}319- Formats ${PFMTNAME} and ${LFMTNAME} just installed."
E320en="${NL}320- \"${PFMTNAME}\" command ready to use." 
E321en="${NL}321- NOTICE you may need to exit and re-login at end." 
E322en="${NL}322- WITHOUT ${TYPEL} LICENSE: 1 MONTH USAGE, FOR TRIAL."
E323en="${NL}323- \"${LFMTNAME}\" command ready to use." 
E324en="${NL}324- Font encoding ("'$$'"FONTENCODING) is forced to ${FONTENCODING}"
E325en="${NL}325- Configuration files installed."
E326en="${NL}326*- To locate FrenchPro files use the command:"
E327en="${NL}327*- \"${NECESSARYFPCMD}kpsewhich -path ${KPSEPATH}// file\"" 
E328en="${NL}328-          C O N G R A T U L A T I O N S "
E329en="${NL}329- All is installed (except contribs and tests files)." 
E329ben="${NL}329*- Binaries are located in: \"${BINDIR}\"." 
E329cen="${NL}329*- The "'${VID}'"PATH environment variable has not been changed;"
E329den="${NL}329*- you can update it if necessary, otherwise you may copy"
E329een="${NL}329*- (as administrator/root) all new binaries into the " 
E329fen="${NL}329*- common library: ${BINARIES}; to do that just execute " 
E329gen="${NL}329*- the following shell \"${MYPWD}/movebin.sh\"." 
E330en="${NL}330- DON'T DELETE the source files (${MYPWD})! "
E331en="${NL}331- I suggest you \"$(CMDMAKE) -f ${MAKENAME} reftest\" now"
E331ben="${NL}331- for validation of the \"torture test\"."
E332en="${NL}332- Thanks to send the registration message to B.Gaulle"
E333en="${NL}333- (fill in REGISTER file and mail it to frenchprobg@free.fr)"
E334en="${NL}334- (or \"$(CMDMAKE) -f ${MAKENAME} sendmessage\")"
E335en="${NL}335- Root directory ("'$$'"DESTDIR) will be: \"${ATP}\""
E336en="${NL}336- "'$$'"TEXMFLOCAL was \"${TEXMFLOCAL}\"" 
E337en="${NL}337- "'$$'"HOMETEXMF was \"${HOMETEXMF}\"  ${INVALIDHOM}" 
E338en="${NL}338- "'$$'"TEXMF was \"${TEXMF}\"" 
E339en="${NL}339- Input-encoding is set to ${IENCODING} ("'$$'"${CODEC})"
E340en="${NL}340- Binaries will be put in: \"${BINDIR}\" ("'$$'"BINDIR)" 
E341en="${NL}341- ERROR: ${BINDIR} ("'$$'"BINDIR) is write protected" 
E342en="${NL}342- check permissions or set variable." 
E343en="${NL}343- ERROR: ${DESTDIR} ("'$$'"ATP) is write protected" 
E344en="${NL}344- "'$$'"TEXMFMAIN was \"${TEXMFMAIN}\"" 
E345en="${NL}345- kb7to8 and kb8to7 installed"
E346en="${NL}346- Documentation installed"
E347en="${NL}347- FrenchPro inputs installed" 
E348en="${NL}348- Makeindex styles installed"
E349en="${NL}349- unistallation done (source untouched)"
E350en="${NL}350- Torture test done"
E351en="${NL}351- I suggest you print them (first ${NBPAGES} pages of each,"
E352en="${NL}352- test and reference): \"$(CMDMAKE) -f ${MAKENAME} printed\""
E353en="${NL}353- Compiling the license with standard LaTeX"
E354en="${NL}354- (or \"$(CMDMAKE) -f ${MAKENAME} sendmessage\""
E355en="${NL}355- Please compare the printed outputs and then"
E356en="${NL}356- Don't care if any warning message -29- just below:"
E357en="${NL}357- Are you ready to \"$(CMDMAKE) -f ${MAKENAME} sendmessage\" now?"
E358en="${NL}358- Controling fmtutil.cnf and texmf.cnf files"
E359en="${NL}359- ERROR: unknown format ${PFMTNAME} in ${MYFMTUTILCNF}"
E360en="${NL}360- ERROR: unknown format ${LFMTNAME} in ${MYFMTUTILCNF}"
E361en="${NL}361- WARNING: option ${INITEXOPT} not found in ${MYFMTUTILCNF"}
E362en="${NL}362- for the format ${PFMTNAME}."
E363en="${NL}363- for the format ${LFMTNAME}."
E364en="${NL}364- OK for the format ${PFMTNAME}."
E365en="${NL}365- OK for the format ${LFMTNAME}."
E366en="${NL}366- ERROR: missing line ${PFMTNAME} in ${MYTEXMFCNF}"
E367en="${NL}367- ERROR: missing line ${LFMTNAME} in ${MYTEXMFCNF}"
E368en="${NL}368- Look at documentation in engines/tetex.pdf"
E369en="${NL}369- ERROR: ${MYTEXMFCNF} is write protected" 
E370en="${NL}370- Installation stopped (ERROR to be corrected)."
E371en="${NL}371- ${MYFMTUTILCNF} has been extended for ${PFMTNAME}."
E372en="${NL}372- ${MYFMTUTILCNF} has been extended for ${LFMTNAME}."
E373en="${NL}373- ${MYTEXMFCNF} has been extended for ${PFMTNAME}."
E374en="${NL}374- ${MYTEXMFCNF} has been extended for ${LFMTNAME}."
E375en="${NL}375- Okay for the configuration files."
E376en="${NL}376- ("'$$'"PRINTER=\"${PRINTER}\") files are ready to print in tst directory."
E377en="${NL}377- ERROR: the \"${PFMTNAME}${BINEXT}\" command is not found." 
E378en="${NL}378- ERROR: the \"${LFMTNAME}${BINEXT}\" command is not found." 
E379en="${NL}379- Cleaning directories ended successfully."
E380en="${NL}380- ERROR: user name has changed."
E381en="${NL}381- Updating the files data base."
E382en="${NL}382- Removing all FrenchPro files already installed."
E383en="${NL}383- Controling files: ${MYFMTINI}, ${MYCNFINIS}."
E384en="${NL}384- ${MYFMTINIDIR}/${MYFMTINI} has been extended for ${PFMTNAME}."
E385en="${NL}385- ${MYFMTINIDIR}/${MYFMTINI} has been extended for ${LFMTNAME}."
E386en="${NL}386- ${MYCNFINIDIR}/${MYCNFINIP} has been extended for '${TIPLINE}'."
E387en="${NL}387- ${MYCNFINIDIR}/${MYCNFINIL} has been extended for '${TILLINE}'."
E388en="${NL}388- The ${NECESSARYFPCMD}command has been installed."
E388ben="${NL}388- The ${NECESSARYFPCMD}pseudo command has been installed."
E389en="${NL}389*- Here are the FrenchPro commands to use for ${INITID}(la)tex"
E390en="${NL}390*- with Plain: \"${NECESSARYFPCMD}${PFMTNAME} file.tex\""
E391en="${NL}391*- with LaTeX: \"${NECESSARYFPCMD}${LFMTNAME} file.tex\""
E392en="${NL}392*- After installation: it can be rebuilt with the command:"
E393en="${NL}393*- \"${CMDO} ${NECESSARYFPCMD}fmtutil${TSYS} --byfmt ${LFMTNAME} --fmtdir ${FORMATS}\""
E394en="${NL}394- ${PFMTNAME} removed from ${MYFMTUTILCNF}."
E395en="${NL}395- ${LFMTNAME} removed from ${MYFMTUTILCNF}."
E396en="${NL}396- Replacing link ${PFMTNAME}."
E397en="${NL}397- Replacing link ${LFMTNAME}."
E398en="${NL}398- Replacing TeXShop link altpdffr${PMOTEUR}."
E399en="${NL}399- Replacing TeXShop link altpdffr${FORMAT}."
E400en="${NL}400- Anormal end compiling the torture test."
E401en="${NL}401- Consider TL2004=NO paramter use."
E402en="${NL}402- Consider TL2003=NO parameter use."
E403en="${NL}403- Engine ${PFMTNAME} installed for TeXShop."
E404en="${NL}404- Engine ${LFMTNAME} installed for TeXShop."
E405en="${NL}405- For a digest of installation do the following: \
                  ${CMDMAKE} -f ${MAKENAME} INFO"
#
E500en="${NL}500*- FrenchPro had been installed successfully."
E501en="${NL}501*- This is a remainer about important informations:"
E502en="${NL}502*- ================================================"
E503en="${NL}503*- FrenchPro installation is not completed!"

DOCDIR=${MYPWD}/doc
INPUTSDIR=${MYPWD}/inputs
FRENCHBINDIR=${MYPWD}/bin
TSTDIR=${MYPWD}/tst
BS="\\\\"

default:	preclean welcome checkSU loginit batinitX continue done

continue:	$(IENCODING) $(FONTENCODING) \
		french ${CHECKCNF} \
		genformats trialts${OO} translators translate\
		torturetestfile done
	${NOECHO}if test "${AUTREOS}" = "Windows" ; then \
	${LF} ${MYPWD}/${THELOG} ${LFARG} >>${DNF}; \
	fi

nonstopcontinueI:	$(IENCODING) $(FONTENCODING) \
		french ${CHECKCNF} \
		genformats trialts${OO} translators translate\
		torturetestfile nonstopinstallI postclean cmdinfo
	${NOECHO}if test "${AUTREOS}" = "Windows" ; then \
	${LF} ${MYPWD}/${THELOG} ${LFARG} >>${DNF}; \
	fi

nonstopcontinueII:	$(IENCODING) $(FONTENCODING) \
		french ${CHECKCNF} \
		genformats \
		nonstopinstallII postclean cmdinfo
	${NOECHO}if test "${AUTREOS}" = "Windows" ; then \
	${LF} ${MYPWD}/${THELOG} ${LFARG} >>${DNF}; \
	fi

nonstopcontinueIII:	$(IENCODING) $(FONTENCODING) \
		french ${CHECKCNF} \
		genformats \
		nonstopinstallIII ALLDONE
	${NOECHO}if test "${AUTREOS}" = "Windows" ; then \
	${LF} ${MYPWD}/${THELOG} ${LFARG} >>${DNF}; \
	fi

loginit:	
	${NOECHO} touch ${MYPWD}/${THELOG} 
	${NOECHO} touch ${MYPWD}/echoandlog 
	${NOECHO} touch	${MYPWD}/execandbat
	${NOECHO} rm ${MYPWD}/${THELOG} ${MYPWD}/echoandlog \
		${MYPWD}/execandbat
	${NOECHO} touch ${MYPWD}/${THELOG} ${MYPWD}/echoandlog
	${NOECHO}echo "#!/bin/sh -v" >> ${MYPWD}/echoandlog
	${NOECHO}echo echo "$$"1 "$$"2 >> ${MYPWD}/echoandlog
	${NOECHO}echo echo "$$"1 "$$"2 \>\> ${MYPWD}/${THELOG} \
                                           >> ${MYPWD}/echoandlog
	${NOECHO}chmod ${MOD4ME} ${MYPWD}/echoandlog
	@${ECHO} ${E301${LANGMSG}}

preclean:	
	${NOERR}${NOECHO}${RM} ${MYPWD}/done
	${NOECHO}touch ${MYPWD}/uninstall.sh ; ${RM} ${MYPWD}/uninstall.sh
	${NOECHO}touch ${MYPWD}/uninstall.sh ; chmod ${MOD4ME} ${MYPWD}/uninstall.sh	
	${NOECHO}echo "#!/bin/sh -v" >> ${MYPWD}/uninstall.sh
	${NOECHO}if test -z "$(BAT)" ;\
		then echo " " ; \
		else \
	        touch ${MYPWD}/install.bat ; ${RM} ${MYPWD}/install.bat ; \
	        touch ${MYPWD}/uninstall.bat ; ${RM} ${MYPWD}/uninstall.bat ; \
	fi
	${NOECHO}touch ${MYPWD}/uninstall.sh ; ${RM} ${MYPWD}/movebin.sh
	${NOECHO}touch ${MYPWD}/uninstall.sh ; chmod ${MOD4ME} ${MYPWD}/movebin.sh	
	${NOECHO}echo "#!/bin/sh -v" >> ${MYPWD}/movebin.sh


welcome:
	@${ECHO} "$$""LANG=\"${LANG}\" OS=${THEOSTYPE} umask=\"${UMASK}\" ${LOGINNAME}"
	@${ECHO} "$$""SHELL=\"${SHELL}\""
	@${ECHO} "$$""LANG=\"${LANG}\" ${LOGINNAME}"
	@${ECHO} " "
	@${ECHO} ${E300${LANGMSG}}
	@${ECHO} " "

checkSU:	
	${NOECHO}if test -z "$(LOGINNAME)" ;\
		then ${ECHO} " " ;\
		else \
			if ! test 'whoami'=$(LOGINNAME) ;\
			then ${ECHO} ${E380${LANGMSG}} ; exit 1 ;\
			fi ;\
		fi

batinitX:	
	@${ECHO} ${E1} 
	${NOECHO}${RM} ${MYPWD}/install.cmd
	${NOECHO} touch ${MYPWD}/install.cmd ${MYPWD}/execandbat
	${NOECHO}echo "#!/bin/sh -v" >> ${MYPWD}/execandbat
	${NOECHO}echo "$$"* >> ${MYPWD}/execandbat
	${NOECHO}if test -z "$(BAT)" ;\
		then ${ECHO} " " ; \
		else \
		echo echo "$$"* \>\> ${MYPWD}/install.cmd \
				     >> ${MYPWD}/execandbat ;\
	fi
	${NOECHO}chmod ${MOD4ME} ${MYPWD}/execandbat
	${NOECHO}if test "${AUTREOS}" = "Windows" ; then \
	${LF} ${MYPWD}/${THELOG} ${LFARG} >>${DNF}; \
	fi


# Apply option for keyboard encoding
$(IENCODING): 	
	${NOECHO}${EXEC} cd ${KEYBOARDDIR} 
	${NOECHO}cd ${KEYBOARDDIR} ; \
	sed s/kbencoding{latin9}/kbencoding{$(IENCODING)}/ \
		<keyboard.org >keyboard.dat
	${NOECHO}cd ${KEYBOARDDIR} ; \
		${EXEC} ${CP} ${MODTXT} keyboard.dat french.keyboard.dat
	${NOECHO}if test ! -f  ${KEYBOARDDIR}/qwerty.kbc ; then \
	         touch ${KEYBOARDDIR}/qwerty.kbc ;\
	         fi
	${NOECHO}cd ${KEYBOARDDIR} ; \
	sed s/kbencoding{latin9}/kbencoding{qwerty}/ \
		<keyboard.org >english.keyboard.dat

$(FONTENCODING):	
	${NOECHO}cd initex ; rm plaintex.cfg ; \
	sed -e "s0%??0\\\\def\\\\encodingdefault\{$(FONTENCODING)\}0" \
		<hyphen.org >plaintex.cfg ;\
	sed -e "s9%??9\\\\def\\\\encodingdefault\{$(FONTENCODING)\}\\\\fontencoding\{$(FONTENCODING)\}\\\\selectfont9" \
		<hyphen.org >hyphen.cfg
	@${ECHO} ${E324${LANGMSG}}

french:		
	${NOECHO}if test ! "${DESTDIRDIR}" -o ! "$(FORMATS)" ; then \
	${ECHO} ${E30${LANGMSG}}; \
	${ECHO} ${E31${LANGMSG}}; \
	exit 1 ; \
	fi

done:	
	@${ECHO} ${E32${LANGMSG}}

checkcnf:
	${NOECHO}if test -z "${INITEXOPT}" ; then ${ECHO} " " ; \
	else \
		if test -z "$(ISteTeX)" ; then ${ECHO} " "; else \
		$(MAKE) -f ${MAKENAME} checkcnfGO ${MKS} ; \
		fi ; \
	fi
	${NOECHO}if test -z "$(ISMiKTeX)" ; then ${ECHO} " "; else \
		${MKDIRS} ${MYCNFINIDIR} ;\
		${EXEC} ${MKDIRS} ${MYFMTINIDIR} ;\
		$(MAKE) -f ${MAKENAME} checkfmtGO ${MKS} ; \
	fi 

checkfmtGO:	
	@${ECHO} ${E383${LANGMSG}} 
	${NOECHO}if test -z "${PLAINLINE}" ; then \
		$(MAKE) -f ${MAKENAME} SETFPini ${MKS} ; \
	fi
	${NOECHO}if test -z "${LATEXLINE}" ; then \
		$(MAKE) -f ${MAKENAME} SETFLini ${MKS} ; \
	fi
	${NOECHO}if test -z "${TEXMFPLINE}" ; then \
		$(MAKE) -f ${MAKENAME} SETTPini ${MKS} ; \
	fi
	${NOECHO}if test -z "${TEXMFFLINE}" ; then \
		$(MAKE) -f ${MAKENAME} SETTLini ${MKS} ; \
	fi


checkcnfGO:	 	
	@${ECHO} ${E358${LANGMSG}} 
	${NOECHO}if test -z "${PLAINLINE}" ; then \
		if test -w "${MYFMTUTILCNF}"  ; then ${ECHO} " ";\
		else ${ECHO} ${E369${LANGMSG}};\
		     ${ECHO} ${E370${LANGMSG}}; exit 1 ;\
		fi ;\
		$(MAKE) -f ${MAKENAME} SETFPcnf ${MKS} ; \
	else \
		if test -z "${PLAINMOT}" ; then \
		$(MAKE) -f ${MAKENAME} reSETFPcnf SETFPcnf ${MKS} ; \
		else \
			if test -z "${PLAINOPT}" ; then \
			$(MAKE) -f ${MAKENAME} SETFPcnf ${MKS} ; \
			fi ;\
		fi ;\
	fi 
	${NOECHO}if test -z "${FORMATLINE}" ; then \
		if test -w "${MYFMTUTILCNF}"  ; then ${ECHO} " ";\
		else ${ECHO} ${E369${LANGMSG}};\
		     ${ECHO} ${E370${LANGMSG}}; exit 1 ;\
		fi ;\
		$(MAKE) -f ${MAKENAME} SETFLcnf ${MKS} ; \
	else \
		if test -z "${FORMATMOT}" ; then \
		$(MAKE) -f ${MAKENAME} reSETFLcnf SETFLcnf ${MKS} ; \
		else \
			if test -z "${FORMATOPT}" ; then \
			$(MAKE) -f ${MAKENAME} SETFLcnf ${MKS} ; \
			fi ;\
		fi ;\
	fi 
	${NOECHO}if test -z "${TEXMFPLINE}" ; then \
		$(MAKE) -f ${MAKENAME} SETTPcnf ${MKS} ; \
	fi
	${NOECHO}if test -z "${TEXMFFLINE}" ; then \
		$(MAKE) -f ${MAKENAME} SETTLcnf ${MKS} ; \
	fi
	@${ECHO} ${E375${LANGMSG}} 


SETFPini:	
	${NOECHO}${SHELL} -ec "echo '${REFPLINE}' >>${MYFMTINIDIR}/${MYFMTINI}" 
	${NOECHO}${SHELL} -ec "echo ${PL0} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${PL1} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${PL2} >>${MYFMTINIDIR}/${MYFMTINI}" 
	${NOECHO}${SHELL} -ec "echo ${PL3} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${PL4} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${PL5} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${PL6} >>${MYFMTINIDIR}/${MYFMTINI}"
# our lf is unable to process the path ${MYFMTINIDIR}
	${NOECHO}cd ${MYFMTINIDIR} ; ${LF} ${MYFMTINI} ${LFARG} >>${DNF}
	${NOECHO}if test ! -z "${VISMiKTeX}" ; then \
	${EXEC} ${MKDIRS} ${MIKTEXFMTDIR} ;\
	${EXEC} ${CP} ${MODTXT} ${MYFMTINIDIR}/${MYFMTINI} ${MIKTEXFMTDIR} ;\
	fi
	@${ECHO} ${E384${LANGMSG}}

SETFLini:	
	${NOECHO}${SHELL} -ec "echo '${REFLLINE}' >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${LA0} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${LA1} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${LA2} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${LA3} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${LA4} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${LA5} >>${MYFMTINIDIR}/${MYFMTINI}"
	${NOECHO}${SHELL} -ec "echo ${LA6} >>${MYFMTINIDIR}/${MYFMTINI}"
# our lf is unable to process the path ${MYFMTINIDIR}
	${NOECHO}cd ${MYFMTINIDIR} ; ${LF} ${MYFMTINI} ${LFARG} >>${DNF}
	${NOECHO}if test ! -z "${VISMiKTeX}" ; then \
	${EXEC} ${MKDIRS} ${MIKTEXFMTDIR} ;\
	${EXEC} ${CP} ${MODTXT} ${MYFMTINIDIR}/${MYFMTINI} ${MIKTEXFMTDIR} ;\
	fi
	@${ECHO} ${E385${LANGMSG}}

SETTPini:	
	${RM} ${MYCNFINIDIR}/${MYCNFINIP}X ; touch ${MYCNFINIDIR}/${MYCNFINIP}X
	${NOECHO}${SHELL} -ec 'echo ${TIPLINE}   >>${MYCNFINIDIR}/${MYCNFINIP}X'
	${NOECHO}${SHELL} -ec 'echo ${TIPL0}     >>${MYCNFINIDIR}/${MYCNFINIP}X'
	${NOECHO}${SHELL} -ec 'echo ${TIPL1}     >>${MYCNFINIDIR}/${MYCNFINIP}X'
	${NOECHO}${SHELL} -ec 'echo ${TIPL2}     >>${MYCNFINIDIR}/${MYCNFINIP}X'
	${NOECHO}${SHELL} -ec 'echo ${TIPL3}     >>${MYCNFINIDIR}/${MYCNFINIP}X'
	${NOECHO}sed -e "s/!/${BS}/g" \
		   <${MYCNFINIDIR}/${MYCNFINIP}X >>${MYCNFINIDIR}/${MYCNFINIP}
# our lf is unable to process the path ${MYFMTINIDIR}
	${NOECHO}cd ${MYCNFINIDIR} ; ${LF} ${MYCNFINIP} ${LFARG} >>${DNF}
	${NOECHO}if test ! -z "${VISMiKTeX}" ; then \
	${EXEC} ${MKDIRS} ${MIKTEXCNFDIR} ;\
	${EXEC} ${CP} ${MODTXT} ${MYCNFINIDIR}/${MYCNFINIP} ${MIKTEXCNFDIR} ;\
	fi
	@${ECHO} ${E386${LANGMSG}}
	${NOECHO}${RM} ${MYCNFINIDIR}/${MYCNFINIP}X 

SETTLini:	
	${RM} ${MYCNFINIDIR}/${MYCNFINIL}X ; touch ${MYCNFINIDIR}/${MYCNFINIL}X
	${NOECHO}${SHELL} -ec 'echo ${TILLINE} >>${MYCNFINIDIR}/${MYCNFINIL}X'
	${NOECHO}${SHELL} -ec 'echo ${TILL0}   >>${MYCNFINIDIR}/${MYCNFINIL}X'
	${NOECHO}${SHELL} -ec 'echo ${TILL1}   >>${MYCNFINIDIR}/${MYCNFINIL}X'
	${NOECHO}${SHELL} -ec 'echo ${TILL2}   >>${MYCNFINIDIR}/${MYCNFINIL}X'
	${NOECHO}${SHELL} -ec 'echo ${TILL3}   >>${MYCNFINIDIR}/${MYCNFINIL}X'
	${NOECHO}sed -e "s/!/${BS}/g" \
		   <${MYCNFINIDIR}/${MYCNFINIL}X >>${MYCNFINIDIR}/${MYCNFINIL}
# our lf is unable to process the path ${MYFMTINIDIR}
	${NOECHO}cd ${MYCNFINIDIR} ; ${LF} ${MYCNFINIL} ${LFARG} >>${DNF}
	${NOECHO}if test ! -z "${VISMiKTeX}" ; then \
	${EXEC} ${MKDIRS} ${MIKTEXCNFDIR} ;\
	${EXEC} ${CP} ${MODTXT} ${MYCNFINIDIR}/${MYCNFINIL} ${MIKTEXCNFDIR} ;\
	fi
	@${ECHO} ${E387${LANGMSG}}
	${NOECHO}${RM} ${MYCNFINIDIR}/${MYCNFINIL}X 

reSETFPcnf:	
	${NOECHO}if test ! -f "${MYFMTUTILCNF}ORI" ; then \
		${CP} ${MODTXT} ${MYFMTUTILCNF} ${MYFMTUTILCNF}ORI ;\
	fi 
	${NOECHO}${CP} ${MODTXT} ${MYFMTUTILCNF} ${MYFMTUTILCNF}temp 
	${NOECHO}grep -v "${PLAINLINE}" <${MYFMTUTILCNF}temp >${MYFMTUTILCNF}
	${NOECHO}${RM} ${MYFMTUTILCNF}temp 
	@${ECHO} ${E394${LANGMSG}}
	${NOECHO}if test ! -z "${TMFCONFIG}" ; then \
		    if test ! -f "${TMFCONFIG}/web2c/fmtutil.cnf" ; then \
	            ${LNS} ${MYFMTUTILCNF} ${TMFCONFIG}/web2c/fmtutil.cnf ;\
		    ${TEXHASHCMD} ${TMFCONFIG} ;\
	echo "rm ${TMFCONFIG}/web2c/fmtutil.cnf"  >> ${MYPWD}/uninstall.sh ; \
		    fi ;\
	fi 

reSETFLcnf:	
	${NOECHO}if test ! -f "${MYFMTUTILCNF}ORI" ; then \
		${CP} ${MODTXT} ${MYFMTUTILCNF} ${MYFMTUTILCNF}ORI ;\
	fi 
	${NOECHO}${CP} ${MODTXT} ${MYFMTUTILCNF} ${MYFMTUTILCNF}temp 
	${NOECHO}grep -v "${FORMATLINE}" <${MYFMTUTILCNF}temp >${MYFMTUTILCNF}
	${NOECHO}${RM} ${MYFMTUTILCNF}temp 
	@${ECHO} ${E395${LANGMSG}}

SETFPcnf:	
	${NOECHO}if test ! -f "${MYFMTUTILCNF}ORI" ; then \
		${CP} ${MODTXT} ${MYFMTUTILCNF} ${MYFMTUTILCNF}ORI ;\
	fi 
	${NOECHO}${SHELL} -ec "echo '${REFPLINE}' >>${MYFMTUTILCNF}"
	@${ECHO} ${E371${LANGMSG}}
	${NOECHO}if test ! -z "${TMFCONFIG}" ; then \
		    if test -d "${TMFCONFIG}/web2c/" ; then \
		      if test ! -f "${TMFCONFIG}/web2c/fmtutil.cnf" ; then \
	              ${LNS} ${MYFMTUTILCNF} ${TMFCONFIG}/web2c/fmtutil.cnf ;\
		      ${TEXHASHCMD} ${TMFCONFIG} ;\
	echo "rm ${TMFCONFIG}/web2c/fmtutil.cnf"  >> ${MYPWD}/uninstall.sh ; \
		      fi ;\
		     fi ;\
	fi 

SETFLcnf:	
	${NOECHO}if test ! -f "${MYFMTUTILCNF}ORI" ; then \
		${CP} ${MODTXT} ${MYFMTUTILCNF} ${MYFMTUTILCNF}ORI ;\
	fi 
	${NOECHO}${SHELL} -ec "echo '${REFLLINE}' >>${MYFMTUTILCNF}"
	@${ECHO} ${E372${LANGMSG}}
	${NOECHO}if test ! -z "${TMFCONFIG}" ; then \
		    if test -d "${TMFCONFIG}/web2c/" ; then \
		      if test ! -f "${TMFCONFIG}/web2c/fmtutil.cnf" ; then \
	              ${LNS} ${MYFMTUTILCNF} ${TMFCONFIG}/web2c/fmtutil.cnf ;\
		      ${TEXHASHCMD} ${TMFCONFIG} ;\
	echo "rm ${TMFCONFIG}/web2c/fmtutil.cnf"  >> ${MYPWD}/uninstall.sh ; \
		      fi ;\
		    fi ;\
	fi 

SETTPcnf:	
	${NOECHO}if test ! -f "${MYTEXMFCNF}ORI" ; then \
		${CP} ${MODTXT} ${MYTEXMFCNF} ${MYTEXMFCNF}ORI ;\
	fi 
	${NOECHO}cat ${MYTEXMFCNF} | sed -e "s/^${TIPID}/%${TIPID}/" >${MYTEXMFCNF}COPYFP
	${NOECHO}${CP} ${MODTXT} ${MYTEXMFCNF}COPYFP ${MYTEXMFCNF}
	${NOECHO}${RM} ${MYTEXMFCNF}COPYFP
	@${SHELL} -ec 'echo ${TIPLINE} >>${MYTEXMFCNF}'
	@${ECHO} ${E373${LANGMSG}}
	${NOECHO}if test ! -z "${TMFCONFIG}" ; then \
		    if test -d "${TMFCONFIG}/web2c/" ; then \
		      if test ! -f "${TMFCONFIG}/web2c/texmf.cnf" ; then \
	              ${LNS} ${MYTEXMFCNF} ${TMFCONFIG}/web2c/texmf.cnf ;\
		      ${TEXHASHCMD} ${TMFCONFIG} ;\
	echo "rm ${TMFCONFIG}/web2c/texmf.cnf"  >> ${MYPWD}/uninstall.sh ; \
		      fi ;\
		    fi ;\
	fi 

SETTLcnf:	
	${NOECHO}if test ! -f "${MYTEXMFCNF}ORI" ; then \
		${CP}  ${MODTXT} ${MYTEXMFCNF} ${MYTEXMFCNF}ORI ;\
	fi 
	${NOECHO}cat ${MYTEXMFCNF} | sed -e "s/^${TILID}/%${TILID}/" >${MYTEXMFCNF}COPYFP
	${NOECHO}${CP} ${MODTXT} ${MYTEXMFCNF}COPYFP ${MYTEXMFCNF}
	${NOECHO}${RM} ${MYTEXMFCNF}COPYFP
	@${SHELL} -ec 'echo ${TILLINE} >>${MYTEXMFCNF}'
	@${ECHO} ${E374${LANGMSG}}
	${NOECHO}if test ! -z "${TMFCONFIG}" ; then \
		    if test -d "${TMFCONFIG}/web2c/" ; then \
		      if test ! -f "${TMFCONFIG}/web2c/texmf.cnf" ; then \
	              ${LNS} ${MYTEXMFCNF} ${TMFCONFIG}/web2c/texmf.cnf ;\
		      ${TEXHASHCMD} ${TMFCONFIG} ;\
	echo "rm ${TMFCONFIG}/web2c/texmf.cnf"  >> ${MYPWD}/uninstall.sh ; \
		      fi ;\
		    fi ;\
	fi 

SETTOO:	
	${CP} ${MODTXT} ${MYTEXMFCNF} ${MYTEXMFCNF}COPYFP
	@${SHELL} -ec "echo '${TOOLINE}' >>${MYTEXMFCNF}" 

RESETTOO:	
	${NOECHO}if test -f "${MYTEXMFCNF}COPYFP" ; then \
		${CP} ${MODTXT} ${MYTEXMFCNF}COPYFP ${MYTEXMFCNF} ;\
		${RM} ${MYTEXMFCNF}COPYFP ;\
	fi


genformats: 
	${NOECHO}if test -z "$(MIK)" ; then \
		$(MAKE) -f ${MAKENAME} preformats  ${MKS} ; \
		$(MAKE) -f ${MAKENAME} formats  ${MKS} ; \
	fi

preformats: 	
	@${ECHO} ${E33${LANGMSG}}
	${NOERR}${NOECHO}if test -z "${USHYPH1FILE}" ; then ${ECHO} "${NL} "; else \
		if test ! -f ${INITEXDIR}/${USHYPHFILE} ; then \
	${LNS} ${USHYPHDIR}/${USHYPH1FILE} ${INITEXDIR}/${USHYPHFILE} 2>>${DNF};\
		${ECHO} ${E34${LANGMSG}};\
		fi\
	fi
# insure that frpdf*.fr have \pdfoutput=1
	${NOECHO}cd ${INITEXDIR} ; for f in frpdf*.fr ; \
	do \
	g=`basename $$f .fr` ; \
	${CP} ${MODTXT} $$f $$g.tmp  ; \
	${SEDFMTPDF} <$$g.tmp  > $$f ; \
	${RM} $$g.tmp ;\
	done


formats: FPLAIN FAUTRE
	${NOECHO}if test -z "${USHYPH1FILE}" ; then ${ECHO} " "; else \
		if test -f ${INITEXDIR}/${USHYPHFILE} ; then \
		rm ${INITEXDIR}/${USHYPHFILE} ;\
		fi \
	fi
	${NOECHO}if test -z "${NONSTOP}" ; then \
	${ECHO} ${E35${LANGMSG}} ;\
	${ECHO} ${E36${LANGMSG}} ;\
	fi

trialtsOO:	SETTOO trialts RESETTOO
	@${ECHO}

trialts:	
	${NOECHO}${EXEC} cd ${FRENCHDIR}
	@${ECHO} ${E353${LANGMSG}}
	@${ECHO} ${E356${LANGMSG}}
#	${NOECHO}cd ${FRENCHDIR} ; mv frlicense.dat "++.tex" ;\
#		${EXEC} ${FORMAT} "++.tex" ; mv "++.tex" frlicense.dat ;\
#		if test "${MAXLOGS}" = "YES" ; then \
#		${CAT} "++.log" >>${MYPWD}/${THELOG} ; \
#		fi
#		${EXEC} ${RM} "++.log"
	${NOECHO}cd ${FRENCHDIR} ;\
		${EXEC} ${FORMAT} -no-mktex=FMT frlicense.dat ;\
		if test "${MAXLOGS}" = "YES" ; then \
		${CAT} "frlicense.log" >>${MYPWD}/${THELOG} ; \
		fi
		${EXEC} ${RM} "frlicense.log"
	${NOECHO}${EXEC} cd ${MYPWD}
	${NOECHO} cat ${FRENCHDIR}/frlicense.dat | grep "pt" | wc > trialinit

FPLAIN:
	${NOECHO}${EXEC} cd ${INITEXDIR} 
	${NOECHO}cd ${INITEXDIR} ; ${EXEC} ${RM} ${WHEREPFMT}/${PFMTNAME}.$(PFMTEXT)
	${NOECHO}cd ${INITEXDIR} ; ${EXEC} ${COPYPDFTEXCFG}
### CONFIGDIR is not modified here, so removed below.
###		echo "rm ${CONFIGDIR}/${PFMTNAME}.fr"  >> ${MYPWD}/uninstall.sh ; \
	${NOECHO}if test "${PFMTNAME}.fr" = "frtex${FNT}.fr" ; \
		then ${ECHO} "${NL} "; \
		else \
		echo "rm ${INITEXDIR}/${PFMTNAME}.fr"  >> ${MYPWD}/uninstall.sh ; \
		${EXEC} ${SEDFMTFR} <${INITEXDIR}/frtex${FNT}.fr  \
		                    > ${INITEXDIR}/${PFMTNAME}.fr ; \
	fi
	${NOECHO}if test -z "${SETINPUTS}" ; then ${ECHO} " " ; else \
		 ${EXEC} set ${SETINPUTS} ;\
		 fi
### CONFIGDIR is not modified here, so removed.
###	${NOECHO}echo "rm ${CONFIGDIR}/${PFMTNAME}.ini"  >> ${MYPWD}/uninstall.sh
	${NOECHO}${EXEC} ${CP} ${MODTXT} ${INITEXDIR}/iniproto \
			"${INITEXDIR}/${PFMTNAME}${EXTINI}"
#
	${NOERR}${NOECHO}if test -z "$(ISMiKTeX)" ; then  \
		${EXEC} echo "${INITDIR}${PINITCMD} ${PEXTEF} ${INITEXOPT} \
			      ${TEXTCX} \"${PEXTF}${PFMTNAME}.fr\" \dump" ;\
		${SETINPUTS}; cd ${INITEXDIR} ;\
	   	${INITDIR}${PINITCMD} ${PEXTEF} ${INITEXOPT} \
			      ${TEXTCX} "${PEXTF}${PFMTNAME}.fr" \dump ;\
	else \
		${TEXHASHCMD} ;\
		${EXEC} echo "${INITDIR}${PINITCMD}${PFMTNAME}" ;\
		${SETINPUTS}; cd ${INITEXDIR} ;\
	   	       ${INITDIR}${PINITCMD}${PFMTNAME} ;\
	   	       ${INITDIR}${PINITCMD}${PFMTNAME} >>${MYPWD}/${THELOG};\
	fi 
#	${NOERR}${NOECHO}if test -z "$(ISMiKTeX)" ; then  \
#		${EXEC} echo "${INITDIR}${PINITCMD} ${PEXTEF} ${INITEXOPT} \
#			      ${TEXTCX} \"${PEXTF}${PFMTNAME}.fr\" \dump" ;\
#		${SETINPUTS}; cd ${INITEXDIR} ;\
#	   	${INITDIR}${PINITCMD} ${PEXTEF} ${INITEXOPT} \
#			      ${TEXTCX} "${PEXTF}${PFMTNAME}.fr" \dump ;\
#	else \
#		${TEXHASHCMD} ;\
#		${EXEC} echo "${INITDIR}${PINITCMD}${PFMTNAME}" ;\
#		${SETINPUTS}; cd ${INITEXDIR} ;\
#	   	       ${INITDIR}${PINITCMD}${PFMTNAME} ;\
#	   	       ${INITDIR}${PINITCMD}${PFMTNAME} >>${MYPWD}/${THELOG};\
#	fi 
	${NOERR}${NOECHO} cd ${INITEXDIR} ;\
		if test "${MAXLOGS}" = "YES" ; then \
			if test -f ${PFMTNAME}.log ; then \
			${CAT} ${PFMTNAME}.log >>${MYPWD}/${THELOG} ;\
			fi ;\
		fi
# As pdftex can make a fatal error without ending with any error code:
	-${NOECHO} cd ${INITEXDIR} ;\
		if test -f ${PFMTNAME}.log ; then \
		grep "Fatal error" <${PFMTNAME}.log && exit 1 ;\
		fi
#
	${NOECHO}if test -z "${RESETINPUTS}" ; then ${ECHO} " " ; else \
		 ${EXEC} set ${RESETINPUTS} ;\
		 fi
	${NOECHO}${EXEC} cd ${MYPWD}
	${NOECHO}if test ! -f ${WHEREPFMT}/${PFMTNAME}.$(PFMTEXT) ; then \
	${ECHO} ${E37${LANGMSG}}; ${ECHO} ${E312${LANGMSG}} ;\
		if test -f ${WHEREPFMT}/${PFMTNAME}.e$(PFMTEXT) ; then \
		${ECHO} ${E401${LANGMSG}};\
		fi ;\
	${ECHO} ${E370${LANGMSG}}; exit 1 ;\
	else \
	${ECHO} ${E38${LANGMSG}};\
	fi
	${NOECHO}if test -z "$(ISteTeX)" ; then ${ECHO} " "; else \
	${ECHO} ${E39${LANGMSG}};\
	${ECHO} ${E40${LANGMSG}};\
	fi
	${NOECHO}${EXEC} cd ${INITEXDIR}
	${NOECHO}cd ${INITEXDIR} ; ${EXEC} ${DELPDFTEXCFG}

FAUTRE:   
	${NOECHO}${EXEC} cd ${INITEXDIR}
	${NOECHO}cd ${INITEXDIR} ; ${EXEC} ${RM} ${WHERELFMT}/${LFMTNAME}.$(LFMTEXT)
	${NOECHO}cd ${INITEXDIR} ; ${EXEC} ${COPYPDFTEXCFG}
### CONFIGDIR is not modified here, so removed.
###		echo "rm ${CONFIGDIR}/${LFMTNAME}.fr"  >> ${MYPWD}/uninstall.sh ; \
	${NOECHO}if test "${LFMTNAME}.fr" = "fr$(FORMAT).fr" ; \
		then ${ECHO} "${NL} "; \
		else \
		echo "rm ${INITEXDIR}/${LFMTNAME}.fr"  >> ${MYPWD}/uninstall.sh ; \
		${EXEC} ${SEDFMTFR} <${INITEXDIR}/fr$(FORMAT).fr  \
		                    > ${INITEXDIR}/${LFMTNAME}.fr ; \
		fi
	${NOECHO}if test -z "$(BAT)" ; then ${ECHO} " " ; else \
	    if test ! "${INITEXDIR}/fr$(FORMAT).fr" = "${INITEXDIR}/${LFMTNAME}.fr" ; then \
	        ${EXEC} ${CP} ${MODTXT} ${INITEXDIR}/fr$(FORMAT).fr \
		${INITEXDIR}/${LFMTNAME}.fr ; \
	    fi ;\
	         fi
	${NOECHO}if test -z "${SETINPUTS}" ; then ${ECHO} " " ; else \
		 ${EXEC} set ${SETINPUTS} ;\
		 fi
### CONFIGDIR is not modified here, so removed.
###	${NOECHO}echo "rm ${CONFIGDIR}/${LFMTNAME}.ini"  >> ${MYPWD}/uninstall.sh
	${NOECHO}${EXEC} ${CP}  ${MODTXT} ${INITEXDIR}/iniproto \
			"${INITEXDIR}/${LFMTNAME}${EXTINI}"
### "./" used below to avoid teTeX bug not allowing extended mode. ###
#
	${NOERR}${NOECHO}if test -z "$(ISMiKTeX)" ; then  \
		${EXEC} echo "${INITDIR}$(LINITCMD) ${LEXTEF} $(INITEXOPT) \
		              ${TEXTCX} \"${LEXTF}${LFMTNAME}.fr\"" ;\
		${SETINPUTS};  cd ${INITEXDIR} ; \
	        ${INITDIR}$(LINITCMD) ${LEXTEF} $(INITEXOPT) \
	                      ${TEXTCX} "${LEXTF}./${LFMTNAME}.fr" ;\
	else \
		${TEXHASHCMD} ;\
		${EXEC} echo "${INITDIR}$(LINITCMD)${LFMTNAME}" ;\
		${SETINPUTS};  cd ${INITEXDIR} ; \
		       ${INITDIR}$(LINITCMD)${LFMTNAME} ;\
		       ${INITDIR}$(LINITCMD)${LFMTNAME} >>${MYPWD}/${THELOG};\
	fi
	${NOERR}${NOECHO} cd ${INITEXDIR} ;\
		if test "${MAXLOGS}" = "YES" ; then \
			if test -f ${LFMTNAME}.log ; then \
			${CAT} ${LFMTNAME}.log >>${MYPWD}/${THELOG} ;\
			fi ;\
		fi
# As pdftex can make a fatal error without ending with any error code:
	-${NOECHO} cd ${INITEXDIR} ;\
		if test -f ${LFMTNAME}.log ; then \
		grep "Fatal error" <${LFMTNAME}.log && exit 1 ;\
		fi
#
	${NOECHO}if test -z "${RESETINPUTS}" ; then ${ECHO} " " ; else \
		 ${EXEC} set ${RESETINPUTS} ;\
		 fi
	${NOECHO}${EXEC} cd ${MYPWD}
	${NOECHO}if test ! -f ${WHERELFMT}/${LFMTNAME}.$(LFMTEXT) ; then \
	${ECHO} ${E310${LANGMSG}}; ${ECHO} ${E312${LANGMSG}} ;\
		if test -f ${WHERELFMT}/${LFMTNAME}.e$(LFMTEXT) ; then \
		${ECHO} ${E402${LANGMSG}};\
		fi ;\
	${ECHO} ${E370${LANGMSG}}; exit 1 ;\
	else \
	${ECHO} ${E311${LANGMSG}};\
	fi
	${NOECHO}if test -z "$(ISteTeX)" ; then ${ECHO} " "; else \
	${ECHO} ${E392${LANGMSG}};\
	${ECHO} ${E393${LANGMSG}};\
	fi
	${NOECHO}${EXEC} cd ${INITEXDIR}
	${NOECHO}cd ${INITEXDIR} ; ${EXEC} ${DELPDFTEXCFG}

# Generate translators 7bit ("a la TeX") <=> 8bit
translators: ${FRENCHBINDIR}/kb8to7 ${FRENCHBINDIR}/kb7to8 

translate: ${FRENCHDIR}/frabbrev.tex RecodeMsgFiles

kb8to7.lex kb7to8.lex:
	${NOECHO}if test -z "$(ISMiKTeX)" ; then ${ECHO} " "; else \
	         touch kb2lex.tmp ; ${TEXHASHCMD} ;\
	fi 
	${NOECHO}if test -z "$(BAT)" ; then ${ECHO} " " ; \
		if test -z "${SETINPUTS}" ; then ${ECHO} " " ; else \
		${EXEC} set ${SETINPUTS} ;\
		fi ; \
	${EXEC} echo ${TEXCMD} ${TEXTCX} kb2lex ; \
	${SETINPUTS}; ${TEXCMD} ${TEXTCX} kb2lex ; \
		if test -z "${RESETINPUTS}" ; then ${ECHO} " " ; else \
		${EXEC} set ${RESETINPUTS} ;\
		fi ;\
	else \
	${SETINPUTS}; ${TEXCMD} ${TEXTCX} kb2lex ; \
	fi

${FRENCHBINDIR}/kb8to7: kb8to7.lex
# This shell is provided by Frederic Boulanger   99/03/05
# Use now $LEX and $CC. by Ronan.Keryell@enst-bretagne.fr, 16/2/2000.
# Replace ^^yz by ^^yz|\xyz in kb8to7 so that both the hex code and the
# actual character are replaced by their 7 bit form.
# Moved to\^\^\1 to avoid to take in account only the begining 
# line characater, --bg 14/03/2003.
	${NOECHO}sed -e 's/^\^\^\([0-9a-f][0-9a-f]\)/\\^\\^\1\|\\x\1/' \
			kb8to7.lex > tmp.lex
	${NOERR}${NOECHO}${RM} kb8to7.lex
	${NOECHO}mv tmp.lex kb8to7.lex
# lex -v kb8to7.lex;cc -o kb8to7 lex.yy.c -ll
	${NOECHO}if test ! -z "$(LEX)" ; then \
		$(LEX) kb8to7.lex || exit 1 ;\
		touch  kb8to7.c ; ${RM} kb8to7.c ;\
		mv lex.yy.c kb8to7.c ;\
	fi
	${NOERR}${NOECHO}${EXEC} ${MKDIRS} ${FRENCHBINDIR}
	${NOECHO}if test ! -z "$(CC)" ; then \
		$(CC) -o kb8to7 kb8to7.c ${Coptions} || exit 1 ;\
		mv kb8to7 ${FRENCHBINDIR}/kb8to7 ;\
		${ECHO} ${E313${LANGMSG}} ;\
	else \
		${ERRNOCC}; \
	fi

${FRENCHBINDIR}/kb7to8:	kb7to8.lex
# Replace printf("^^yz") by printf("%c",0xyz) in kb7to8 so that the actual
# character is printed instead of its hex code.
#	${NOECHO}echo "Replacing TeX ^^hexa codes, if any, by binary codes."
	${NOECHO}sed -e 's/"\^\^\([0-9a-f][0-9a-f]\)"/"%c",0x\1/' \
		kb7to8.lex > tmp.lex
	${NOERR}${NOECHO}${RM} kb7to8.lex
	${NOECHO}mv tmp.lex kb7to8.lex
	${NOECHO}if test ! -z "$(LEX)" ; then \
		$(LEX) kb7to8.lex || exit 1 ;\
		touch kb7to8.c ; ${RM} kb7to8.c ;\
		mv lex.yy.c kb7to8.c ;\
	fi
	${NOERR}${NOECHO}${EXEC} ${MKDIRS} ${FRENCHBINDIR}
	${NOECHO}if test ! -z "$(CC)" ; then \
		$(CC) -o kb7to8 kb7to8.c ${Coptions} || exit 1 ;\
		mv kb7to8 ${FRENCHBINDIR}/kb7to8 ;\
		${ECHO} ${E314${LANGMSG}} ;\
	else \
		${ERRNOCC}; \
	fi

# Here is an option to avoid using any LEX utility:
#kb2latin9:	
#	${CC} -o kb7to8 kb7to8.c ${Coptions}
#	${CC} -o kb8to7 kb8to7.c ${Coptions}

# The torture test file provided should be translated in 8bit
# as well as the abbreviations file:
torturetestfile:	${TSTDIR}/french.tst ${FRENCHDIR}/frabbrev.tex

${TSTDIR}/french.tst:
	${NOECHO}${FRENCHBINDIR}/kb8to7 \
		< ${TSTDIR}/fxench.tst > ${TSTDIR}/fyench.tst
	${NOECHO}${FRENCHBINDIR}/kb7to8 \
		< ${TSTDIR}/fyench.tst > ${TSTDIR}/f8ench.tst
	${NOECHO}${FRENCHBINDIR}/kb8to7 \
		< ${TSTDIR}/f8ench.tst > ${TSTDIR}/f7ench.tst
	${NOERR}${NOECHO}diff ${TSTDIR}/fyench.tst \
		${TSTDIR}/f7ench.tst > tst/diff.log
	${NOECHO}if test -s ${TSTDIR}/diff.log ; then \
	     ${ECHO} ${E315${LANGMSG}};exit 1;\
	else rm ${TSTDIR}/fyench.tst ;\
	fi
	${NOECHO}mv ${TSTDIR}/f8ench.tst ${TSTDIR}/french.tst 
	${NOECHO}${RM} ${TSTDIR}/f7ench.tst
	@${ECHO} ${E316${LANGMSG}}

${FRENCHDIR}/frabbrev.tex:
	${NOECHO}${FRENCHBINDIR}/kb7to8 \
		< ${FRENCHDIR}/fxabbrev.tex > ${FRENCHDIR}/frabbrev.tex
	@${ECHO} ${E317${LANGMSG}}

RecodeMsgFiles:
	@cd ${FRENCHDIR} ; for f in *-msg.tex ;\
	do \
	if test ! -f $$f.7b ; then \
		touch $$f.7b ; cp $$f $$f.7b ;\
	fi ; \
	chmod 644 $$f ;\
	sed -e "s/msgencoding{TeX}/msgencoding{${IENCODING}}/" \
		<$$f.7b | ${FRENCHBINDIR}/kb7to8${BINEXT} >$$f ;\
	chmod 444 $$f ;\
	done
	@cd ${MSGDIR} ; for f in *-msg.tex ;\
	do \
	if test ! -f $$f.7b ; then \
		touch $$f.7b ; cp $$f $$f.7b ;\
	fi ; \
	chmod 644 $$f ;\
	sed -e "s/msgencoding{TeX}/msgencoding{${IENCODING}}/" \
		<$$f.7b | ${FRENCHBINDIR}/kb7to8 >$$f ;\
	chmod 444 $$f ;\
	done
	@cd ${KEYBOARDDIR} ; for f in *-msg.tex ;\
	do \
	if test ! -f $$f.7b ; then \
		touch $$f.7b ; cp $$f $$f.7b ;\
	fi ; \
	chmod 644 $$f ;\
	sed -e "s/msgencoding{TeX}/msgencoding{${IENCODING}}/" \
		<$$f.7b | ${FRENCHBINDIR}/kb7to8 >$$f ;\
	chmod 444 $$f ;\
	done

#############################################################################
# installation of files
#############################################################################
installmin: install-begin install-fmt 

installminI:	install-hyphen install-config
	@${ECHO} " "

install-begin: 	
	${NOERR}${NOECHO}${EXEC} ${MKDIRS} ${KPSEPATH}
	${NOERR}${NOECHO}${EXEC} ${MKDIRS} ${KPSEPATH}/french
	${NOERR}${NOECHO}${EXEC} ${MKDIRS} ${BINDIR}
	@${ECHO} ${E318${LANGMSG}}
# In case FrenchPro shell is not yet created by pre-install2 :
	${NOECHO}if test ! "${AUTREOS}" = "Windows" \
                      -a ! "${NECESSARYFPCMD}" = "" ; then \
		if test ! -f ${BINDIR}/${NECESSARYFPCMD}${SHELLEXT}; then \
		echo "rm ${BINDIR}/${NECESSARYFPCMD}${SHELLEXT}" \
                                                >> ${MYPWD}/uninstall.sh ;\
		echo "#!/bin/sh " > ${BINDIR}/${NECESSARYFPCMD}${SHELLEXT};\
		echo echo "$$"*  >> ${BINDIR}/${NECESSARYFPCMD}${SHELLEXT};\
		echo      "$$"*  >> ${BINDIR}/${NECESSARYFPCMD}${SHELLEXT};\
		chmod ${MOD4ME}     ${BINDIR}/${NECESSARYFPCMD}${SHELLEXT};\
		${ECHO} ${E388b${LANGMSG}} ; \
		echo      "${CP} ${INTERACTIVE} ${MODBIN} \
	${BINDIR}/${NECESSARYFPCMD}${SHELLEXT} ${BINARIES}" >> movebin.sh ;\
		fi ; \
	fi
	@${ECHO} " "

install-fmt:
	${NOECHO}if test ! -z "$(ISMiKTeX)" ; then ${ECHO} " "; else \
	         $(MAKE) -f ${MAKENAME} install-fmtGO  ${MKS} ;\
	fi 
	${NOECHO}$(MAKE) -f ${MAKENAME} install-links  ${MKS} 

install-fmtGO:	
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${FORMATS}
	${NOECHO}${EXEC} cd ${INITEXDIR}
# With teTeX put link in $TEXMFVAR or $TEXMFSYSVAR (not made for BAT=YES)
	${NOECHO}if test ! -f ${INITEXDIR}/${PFMTNAME}.$(PFMTEXT) ;\
		 then ${ECHO} " " ;\
                 else \
	         ${EXEC} ${CP} ${INTERACTIVE} ${MODTXT} \
		 	 ${INITEXDIR}/${PFMTNAME}.$(PFMTEXT) $(FORMATS) ;\
		 if test -w "${TMFVAR}/web2c/${PFMTNAME}.$(PFMTEXT)" ; then \
		 ${RM} "${TMFVAR}/web2c/${PFMTNAME}.$(PFMTEXT)" ;\
		 fi ;\
	  	 if test -d "${TMFVAR}" ; then \
		 ${MKDIRS} ${TMFVAR}/web2c ; \
		 ${LNS} ${FORMATS}/${PFMTNAME}.$(PFMTEXT) \
		   ${TMFVAR}/web2c/${PFMTNAME}.$(PFMTEXT) ;\
		 echo "rm ${TMFVAR}/web2c/${PFMTNAME}.$(PFMTEXT)" \
					 >> ${MYPWD}/uninstall.sh ;\
		 ${TEXHASHCMD} ${TMFVAR} ;\
		 fi ;\
	fi 
	${NOECHO}echo "rm $(FORMATS)/${PFMTNAME}.$(PFMTEXT)"  >> ${MYPWD}/uninstall.sh
	${NOECHO}echo "rm ${TMFVAR}/web2c/${PFMTNAME}.$(PFMTEXT)"  >> ${MYPWD}/uninstall.sh
# With teTeX put link in $TEXMFVAR or $TEXMFSYSVAR (not made for BAT=YES)
	${NOECHO}if test ! -f ${INITEXDIR}/${LFMTNAME}.$(LFMTEXT) ;\
		 then ${ECHO} " " ;\
                 else \
	         ${EXEC} ${CP} ${INTERACTIVE} ${MODTXT} \
		         ${INITEXDIR}/${LFMTNAME}.$(LFMTEXT) $(FORMATS) ;\
		 if test -w "${TMFVAR}/web2c/${LFMTNAME}.$(LFMTEXT)" ; then \
		 ${RM} "${TMFVAR}/web2c/${LFMTNAME}.$(LFMTEXT)" ;\
		 fi ;\
		 if test -d "${TMFVAR}" ; then \
		 ${MKDIRS} ${TMFVAR}/web2c ; \
		 ${LNS} ${FORMATS}/${LFMTNAME}.$(LFMTEXT) \
		   ${TMFVAR}/web2c/${LFMTNAME}.$(LFMTEXT) ;\
		 echo "rm ${TMFVAR}/web2c/${LFMTNAME}.$(LFMTEXT)" \
					 >> ${MYPWD}/uninstall.sh ;\
		 ${TEXHASHCMD} ${TMFVAR} ;\
		 fi ;\
	fi 
	${NOECHO}echo "rm $(FORMATS)/${LFMTNAME}.$(LFMTEXT)"  >> ${MYPWD}/uninstall.sh
	${NOECHO}echo "rm $(TMFVAR)/web2c/${LFMTNAME}.$(LFMTEXT)"  >> ${MYPWD}/uninstall.sh
	${NOECHO}${EXEC} cd ${MYPWD}

postclean:	
	${NOERR}${RM} ${INITEXDIR}/${PFMTNAME}.$(PFMTEXT) 
	${NOERR}${RM} ${INITEXDIR}/${LFMTNAME}.$(LFMTEXT) 

install-links: 		
	${NOECHO}if test ! -z "$(ISMiKTeX)" ; then ${CMDLINK}; else \
	$(MAKE) -f ${MAKENAME} install-links-std  ${MKS} ;\
	fi 

install-links-std: 		BINPLAIN BINLATEX 
	@${ECHO} " "
	@${ECHO} ${E319${LANGMSG}}
	@${ECHO} " "

BINPLAIN:	 
# TeXshop link and scripts
	${NOERR}${NOECHO}if test -f ${BINDIR}/altpdffr${PMOTEUR} ; then \
	${ECHO} ${E398${LANGMSG}};\
	${EXEC} ${RM} ${BINDIR}/altpdffr${PMOTEUR} ;\
	fi
	${NOERR}${NOECHO}if test ! -f ${BINDIR}/altpdffr${PMOTEUR} ; then \
		if test ! -z "$(RPLTTS)" ; then \
	${LNS} ${RPLTTS} ${BINDIR}/altpdffr${PMOTEUR} 2>>${DNF};\
	echo      "${CP} ${INTERACTIVE} ${MODBIN} \
	${BINDIR}/altpdffr${PMOTEUR} ${BINARIES}" >> movebin.sh ;\
		fi ;\
	fi
	${NOECHO}if test ! -z "${TSSHELLSDIR}" ; then \
	echo "rm ${TSSHELLSDIR}/${PFMTNAME}.engine" >> ${MYPWD}/uninstall.sh ;\
	touch ${TSSHELLSDIR}/${PFMTNAME}.engine ;\
	${RM} ${TSSHELLSDIR}/${PFMTNAME}.engine ;\
	echo "#!/bin/tcsh " >> ${TSSHELLSDIR}/${PFMTNAME}.engine ;\
	echo " "           >> ${TSSHELLSDIR}/${PFMTNAME}.engine ;\
	echo "set path= (${BINDIR} ""$$""path)" \
					>> ${TSSHELLSDIR}/${PFMTNAME}.engine ;\
	echo "${NECESSARYFPCMD} ${PFMTNAME} ""$$""1"  \
					>> ${TSSHELLSDIR}/${PFMTNAME}.engine ;\
	chmod ${MOD4ME} ${TSSHELLSDIR}/${PFMTNAME}.engine ;\
	${ECHO} ${E403${LANGMSG}} ;\
	fi
# for BAT=yes it is assumed that links are already running
# since i'm unable to set them. 
	${NOERR}${NOECHO}if test -f ${BINDIR}/${PFMTNAME}${BINEXT} ; then \
	${ECHO} ${E396${LANGMSG}};\
	${EXEC} ${RM} ${BINDIR}/${PFMTNAME}${BINEXT} ;\
	fi
	${NOECHO}if test -z "$(BAT)" ; then \
	   if test ! -f ${BINDIR}/${PFMTNAME}${BINEXT} ; then \
	   ${EXEC} ${LNS} ${PTEXBINARY} ${BINDIR}/${PFMTNAME}${BINEXT} 2>>${DNF};\
	   echo "rm ${BINDIR}/${PFMTNAME}${BINEXT}" >> ${MYPWD}/uninstall.sh ;\
	   echo "${CP} ${INTERACTIVE} ${MODBIN} \
	       ${BINDIR}/${PFMTNAME}${BINEXT} ${BINARIES}" >> movebin.sh ;\
	   fi ;\
	else \
	   if test ! -f ${BINDIR}/${PFMTNAME}${BINEXT} ; then \
	   ${LNS} ${PTEXBINARY} ${BINDIR}/${PFMTNAME}${BINEXT} 2>>${DNF};\
	   echo "rm ${BINDIR}/${PFMTNAME}${BINEXT}" >> ${MYPWD}/uninstall.sh ;\
	   echo "${CP} ${INTERACTIVE} ${MODBIN} \
	       ${BINDIR}/${PFMTNAME}${BINEXT} ${BINARIES}" >> movebin.sh ;\
	   fi ;\
	fi
#
	if test -x ${BINDIR}/${PFMTNAME}${BINEXT} ; then \
	${ECHO} ${E320${LANGMSG}};\
	${ECHO} ${E321${LANGMSG}};\
	else \
	${ECHO} ${E377${LANGMSG}}; exit 1 ;\
	fi 

BINLATEX:	
# TeXshop link and shells
	${NOERR}${NOECHO}if test -f ${BINDIR}/altpdffr${FORMAT} ; then \
	${ECHO} ${E399${LANGMSG}};\
	${EXEC} ${RM} ${BINDIR}/altpdffr${FORMAT} ;\
	fi
	${NOERR}${NOECHO}if test ! -f ${BINDIR}/altpdffr${FORMAT} ; then \
		if test ! -z "$(RLLTTS)" ; then \
	${LNS} ${RLLTTS} ${BINDIR}/altpdffr${FORMAT} 2>>${DNF};\
	   echo "${CP} ${INTERACTIVE} ${MODBIN} \
	       ${BINDIR}/altpdffr${FORMAT} ${BINARIES}" >> movebin.sh ;\
		fi ;\
	fi
	${NOECHO}if test ! -z "${TSSHELLSDIR}" ; then \
	echo "rm ${TSSHELLSDIR}/${LFMTNAME}.engine" >> ${MYPWD}/uninstall.sh ;\
	touch ${TSSHELLSDIR}/${LFMTNAME}.engine ;\
	${RM} ${TSSHELLSDIR}/${LFMTNAME}.engine ;\
	echo "#!/bin/tcsh " >> ${TSSHELLSDIR}/${LFMTNAME}.engine ;\
	echo " "           >> ${TSSHELLSDIR}/${LFMTNAME}.engine ;\
	echo "set path= (${BINDIR} ""$$""path)" \
					>> ${TSSHELLSDIR}/${LFMTNAME}.engine ;\
	echo "${NECESSARYFPCMD} ${LFMTNAME} ""$$""1"  \
					>> ${TSSHELLSDIR}/${LFMTNAME}.engine ;\
	chmod ${MOD4ME} ${TSSHELLSDIR}/${LFMTNAME}.engine ;\
	${ECHO} ${E403${LANGMSG}} ;\
	fi
# for BAT=yes it is assumed that links are already running
# since i'm unable to set them. 
	${NOERR}${NOECHO}if test -f ${BINDIR}/${LFMTNAME}${BINEXT} ; then \
	${ECHO} ${E397${LANGMSG}};\
	${EXEC} ${RM} ${BINDIR}/${LFMTNAME}${BINEXT} ;\
	fi
	${NOECHO}if test -z "$(BAT)" ; then \
	   if test ! -f ${BINDIR}/${LFMTNAME}${BINEXT} ; then \
	   ${EXEC} ${LNS} ${LTEXBINARY} ${BINDIR}/${LFMTNAME}${BINEXT} 2>>${DNF};\
	   echo "rm ${BINDIR}/${LFMTNAME}${BINEXT}" >> ${MYPWD}/uninstall.sh ;\
	   echo "${CP} ${INTERACTIVE} ${MODBIN} \
	       ${BINDIR}/${LFMTNAME}${BINEXT} ${BINARIES}" >> movebin.sh ;\
	   fi ;\
	else \
	   if test ! -f ${BINDIR}/${LFMTNAME}${BINEXT} ; then \
	   ${LNS} ${LTEXBINARY} ${BINDIR}/${LFMTNAME}${BINEXT} 2>>${DNF};\
	   echo "rm ${BINDIR}/${LFMTNAME}${BINEXT}" >> ${MYPWD}/uninstall.sh ;\
	   echo "${CP} ${INTERACTIVE} ${MODBIN} \
	       ${BINDIR}/${LFMTNAME}${BINEXT} ${BINARIES}" >> movebin.sh ;\
	   fi ;\
	fi
#
	${NOECHO}if test -x ${BINDIR}/${LFMTNAME}${BINEXT} ; then \
	${ECHO} ${E323${LANGMSG}};\
	${ECHO} ${E321${LANGMSG}};\
	else \
	${ECHO} ${E378${LANGMSG}}; exit 1 ;\
	fi

install-hyphen:	
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${HYPHDIR}
	${NOECHO}${EXEC} cd ${INITEXDIR} 
	${NOECHO}cd ${INITEXDIR}; ${EXEC}\
		 ${CP} ${INTERACTIVE} ${MODTXT} frhyph.tex $(HYPHDIR)
	${NOECHO}echo "rm $(HYPHDIR)/frhyph.tex"  >> ${MYPWD}/uninstall.sh
	${NOECHO}cd ${INITEXDIR}; ${EXEC}\
		 ${CP} ${INTERACTIVE} ${MODTXT} frhyph1.tex $(HYPHDIR)
	${NOECHO}echo "rm $(HYPHDIR)/frhyph1.tex"  >> ${MYPWD}/uninstall.sh
	${NOECHO}cd ${INITEXDIR} ; ${EXEC}\
		${CP} ${INTERACTIVE} ${MODTXT} zerohyph.tex $(HYPHDIR)
	${NOECHO}echo "rm $(HYPHDIR)/zerohyph.tex"  >> ${MYPWD}/uninstall.sh
	${NOECHO}cd ${INITEXDIR} ; ${EXEC}\
		${CP} ${INTERACTIVE} ${MODTXT} hypht1.tex $(HYPHDIR)
	${NOECHO}echo "rm $(HYPHDIR)/hypht1.tex"  >> ${MYPWD}/uninstall.sh
	${NOECHO}if test ! -f  ${INITEXDIR}/frhyph.tex.ORI ; then \
		mv ${INITEXDIR}/frhyph.tex ${INITEXDIR}/frhyph.tex.ORI ;\
		mv ${INITEXDIR}/frhyph1.tex ${INITEXDIR}/frhyph1.tex.ORI ;\
		mv ${INITEXDIR}/zerohyph.tex ${INITEXDIR}/zerohyph.tex.ORI ;\
		mv ${INITEXDIR}/hypht1.tex ${INITEXDIR}/hypht1.tex.ORI ;\
	fi
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${DESTIDIR}
# usually, there is no need to copy these files elsewhere, but
# single user may want to reformat without going to the installation proc.
	${NOECHO}cd ${INITEXDIR} ; for f in *.tex ; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTIDIR} ; \
	cp  ${DVNF}  ${DESTIDIR}/$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTIDIR} ; \
	echo "rm ${DESTIDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
	${NOECHO}cd ${INITEXDIR} ; mv frhyph.tex.ORI frhyph.tex 
	${NOECHO}cd ${INITEXDIR} ; mv frhyph1.tex.ORI frhyph1.tex 
	${NOECHO}cd ${INITEXDIR} ; mv zerohyph.tex.ORI zerohyph.tex 
	${NOECHO}cd ${INITEXDIR} ; mv hypht1.tex.ORI hypht1.tex 
	${NOECHO}${EXEC} cd ${FRENCHDIR}

keepdat:	
	@if test "${MYFRLDAT}" != ""  ; then \
	mv 	${MYFRLDAT} ${MYFRLDAT}ORI ;\
	fi

install-config:	keepdat
# copy config files
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${CONFIGDIR}
	${NOECHO}${EXEC} cd ${FRENCHDIR}
	${NOECHO}cd ${FRENCHDIR} ; for f in *.dat ; \
	do \
	echo ${CP} ${MODTXT} $$f ${CONFIGDIR} ; \
	cp  ${DVNF}  ${CONFIGDIR}/$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${CONFIGDIR} ; \
	echo "rm ${CONFIGDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
#
	@if test -f "${MYFRLDAT}ORI" ; then \
	touch ${MYFRLDAT} ; rm 	${MYFRLDAT} ;\
	mv    ${MYFRLDAT}ORI ${MYFRLDAT} ;\
	fi
#
	${NOECHO}${EXEC} cd ${KEYBOARDDIR}
	${NOECHO}cd ${KEYBOARDDIR} ; for f in *.dat ; \
	do \
	echo ${CP} ${MODTXT} $$f ${CONFIGDIR} ; \
	cp  ${DVNF}  ${CONFIGDIR}/$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${CONFIGDIR} ; \
	echo "rm ${CONFIGDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
	${NOECHO}${EXEC} cd ${INITEXDIR}
# create .ini and copy them to $CONFIGDIR
	${NOECHO}cd ${INITEXDIR} ; for f in fr*.fr ml*.fr; \
	do \
	g=`basename $$f .fr` ; \
	echo "rm ${CONFIGDIR}/$$g${EXTINI}"  >> ${MYPWD}/uninstall.sh ;\
	echo ${CP} ${MODTXT} iniproto \
		${CONFIGDIR}/$$g${EXTINI}  ; \
	${EXEC} ${CP} ${MODTXT} iniproto \
		${CONFIGDIR}/$$g${EXTINI}  ; \
	done
### there is no need here to copy again *.ini
	${NOECHO}cd ${INITEXDIR} ; for f in *.cfg *.fr; \
	do \
	echo ${CP} ${MODTXT} $$f ${CONFIGDIR} ; \
	cp  ${DVNF}  ${CONFIGDIR}/$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${CONFIGDIR} ; \
	echo "rm ${CONFIGDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${DESTDIRDIR}
	@${ECHO} " "
	@${ECHO} ${E325${LANGMSG}}
	@${ECHO} " "
	${NOECHO}${EXEC} cd ${MYPWD}

nonstopinstallI: preinstall2 installmin installminI install-bin install-doc \
		 install-le install-base install-index 
	@${ECHO} " "

nonstopinstallII: install-fmt
	@${ECHO} " "

nonstopinstallIII: install-fmt 
	@${ECHO} " "

install: 	preinstall installmin installminI install-bin install-doc \
		install-le install-base install-index ALLDONE
	@${ECHO} " "

cmdinfo:	
	@${ECHO} ${E389${LANGMSG}}
	@${ECHO} ${E390${LANGMSG}}
	@${ECHO} ${E391${LANGMSG}}
	@${ECHO} " "

ALLDONE:		
	${NOECHO}if test -z "$(ISteTeX)" ;\
	 then ${ECHO} " " ; \
	else ${ECHO} ${E326${LANGMSG}};\
	     ${ECHO} ${E327${LANGMSG}};\
	     ${ECHO} ${E381${LANGMSG}}; ${EXEC} $(TEXHASHCMD); \
	     echo "$(TEXHASHCMD)"  >> ${MYPWD}/uninstall.sh ;\
	 fi
	@${ECHO} " "
	@${ECHO} ${E389${LANGMSG}}
	@${ECHO} ${E390${LANGMSG}}
	@${ECHO} ${E391${LANGMSG}}
	@${ECHO} " "
	@${ECHO} ${E328${LANGMSG}}
	@${ECHO} " "
	@${ECHO} ${E329${LANGMSG}}
	@${ECHO} ${E329b${LANGMSG}}
	@${ECHO} ${E329c${LANGMSG}}
	@${ECHO} ${E329d${LANGMSG}}
	@${ECHO} ${E329e${LANGMSG}}
	@${ECHO} ${E329f${LANGMSG}}
	@${ECHO} ${E329g${LANGMSG}}
	@${ECHO} ${E330${LANGMSG}}
	@${ECHO} ${E322${LANGMSG}}
	${NOECHO}if test -z "${NONSTOP}" ; then \
		${ECHO} ${E331${LANGMSG}} ;\
		${ECHO} ${E331b${LANGMSG}} ;\
		touch ${MYPWD}/done ;\
	else \
		${ECHO} ${E405${LANGMSG}} ;\
		touch ${MYPWD}/done  ;\
	fi
	${NOERR}${NOECHO}if test -z "${NOAUTOMAIL}" ; then \
                  if test -s ${MYPWD}/trialinit ;\
		then cd ${FRENCHDIR} ; cat frlicense.dat | \
		mail -s "french pro installed" frenchprobg@free.fr ;\
		  fi ;\
	fi
	${NOECHO}if test -z "$(BAT)" ; then ${ECHO} " "; else \
	touch install.bat ;\
	cat $(MYPWD)/install.cmd | sed \
		-e "s!${CP} ${INTERACTIVE} ${MODBIN}!copy!" \
		-e "s!${CP} ${MODBIN}!copy!" \
		-e "s!${CP} ${MODTXT}!copy!" \
		-e "s!${CAT}!type!" \
		-e "s!grep !%SOURCE%${BS}bin${BS}grep !" \
		-e "s!mv !rename !" \
		-e "s!${RM} !del !" \
		-e "s!echo !!" \
		-e "s!${MKDIRS} !mkdir !"\
		-e "s!texhash !${TEXHASHBAT}!"\
		-e "s!TEXINPUTS=!set TEXINPUTS=!"\
		-e "s!${TEXINPUTS}!DOLLARTI!g" \
		-e "s!${MYCNFINIDIR}/!DOLLARMK!g" \
		-e "s!${MIKTEXCNFDIR}!%ROOT%%MYTEXMF%${BS}miktex${BS}config!g" \
		-e "s!${LATEXDIR}!%ROOT%%MYTEXMF%${BS}tex${BS}latex!g" \
		-e "s!${HYPHDIR}!%ROOT%%MYTEXMF%${BS}tex${BS}generic${BS}hyphen!g" \
		-e "s!${PLAINDIR}!%ROOT%%MYTEXMF%${BS}tex${BS}plain${BS}base!g" \
		-e "s!${FORMATS}!%ROOT%%MYVTEXMF%${BS}web2c!g" \
		-e "s!kb7to8!kb7to8\.exe!g" \
		-e "s!kb8to7!kb8to7\.exe!g" \
		-e "s!${SRCROOT}/bin!%ROOT%%MYLTEXMF%%MYLBIN%!g" \
		-e "s!${SRCROOT}!%ROOT%%MYLTEXMF%!g" \
		-e "s!${FRENCHDIR}!${INPUTSDIR}!" \
		-e "s!${KEYBOARDDIR}!${INPUTSDIR}!" \
		-e "s!${MLPDIR}!${INPUTSDIR}!" \
		-e "s!${MSGDIR}!${INPUTSDIR}!" \
		-e "s!${OTHERDIR}!${INPUTSDIR}!" \
		-e "s!${MKINDEXDIR}!${INPUTSDIR}!" \
		-e "s!${MYPWD}!%SOURCE%!g" \
		-e "s!DOLLARTI!${TEXINPUTS}!g" \
		-e "s!DOLLARMK!%SOURCE%${BS}miktex${BS}config${BS}!g" \
		-e "s!${MYPWD}!%ORIGIN%!g" \
		-e "s!${LATEXDIR}!%ORIGOUT%%MYTEXMF%${BS}tex${BS}latex!g" \
		-e "s!${USHYPHDIR}!%ORIGOUT%%MYTEXMF%${BS}tex${BS}generic${BS}hyphen!g" \
		-e "s!${PLAINDIR}!%ORIGOUT%%MYTEXMF%${BS}tex${BS}plain${BS}base!g" \
		-e "s!:!;!g"\
		-e "sI/I${BS}Ig" \
		>> install.bat ;\
	touch uninstall.bat ;\
	cat uninstall.sh | sed \
		-e "s!\#\!/bin/sh -v!!" \
		-e "s!${FORMATS}!%ROOT%%MYVTEXMF%${BS}web2c!g" \
		-e "s!${FRENCHBINDIR}!%ROOT%%MYLBIN%!g" \
		-e "s!kb7to8!kb7to8.exe!g" \
		-e "s!kb8to7!kb8to7.exe!g" \
		-e "s!${SRCROOT}/bin!%ROOT%%MYLTEXMF%%MYLBIN%!g" \
		-e "s!${SRCROOT}!%ROOT%%MYLTEXMF%!g" \
		-e "s!texhash !${TEXHASHBAT}!"\
		-e "s!rm !del !" \
		-e "sI/I${BS}Ig" \
		>> uninstall.bat ;\
	fi
	${NOECHO}if test "${AUTREOS}" = "Windows" ; then \
	${LF} ${MYPWD}/uninstall.sh ${LFARG} >>${DNF}; \
	fi
	@${ECHO} ${E332${LANGMSG}}
	@${ECHO} ${E333${LANGMSG}}
	${NOECHO}if test ! "${AUTREOS}" = "Windows" ; then \
	${ECHO} ${E334${LANGMSG}} ;\
	fi

INFO:	
		echo ${MAKENAME}: ${E502${LANGMSG}} 
	${NOECHO}if test -f  ${MYPWD}/done ; then \
		if test -f  ${MYPWD}/${THELOG} ; then \
		echo ${MAKENAME}: ${E500${LANGMSG}} ;\
		echo ${MAKENAME}: ${E501${LANGMSG}} ;\
		grep "*-" < ${MYPWD}/${THELOG} | sed -e "/-\*\*-/d" ;\
		else \
		${CMDMAKE} -f ${MYPWD}/${MAKEFILEORG} help ;\
		fi ;\
	else \
		${ECHO} ${E503${LANGMSG}} ;\
	fi
		echo ${MAKENAME}: ${E502${LANGMSG}}

preinstall:	preinstall1 preinstall2
	@${ECHO} " "

preinstall1:	
	@${ECHO} ${E335${LANGMSG}}
	${NOECHO}if test -z "$(ISteTeX)" ;\
	 then ${ECHO} " " ; \
	else \
	${ECHO} ${E336${LANGMSG}};\
	${ECHO} ${E337${LANGMSG}};\
	${ECHO} ${E344${LANGMSG}};\
	fi
	@${ECHO} ${E338${LANGMSG}}
	@${ECHO} ${E339${LANGMSG}}

preinstall2:	create-bin
	@if test -w "${BINDIR}"  ; then \
	${ECHO} ${E340${LANGMSG}};\
	else ${ECHO} ${E341${LANGMSG}}; \
	     ${ECHO} ${E342${LANGMSG}}; exit 1 ;\
	fi
	@if test -w "${ATP}"  ; then ${ECHO} " ";\
	else ${ECHO} ${E343${LANGMSG}};\
	     ${ECHO} ${E342${LANGMSG}}; exit 1 ;\
	fi
	${NOECHO}if test "${AUTREOS}" = "Windows" ; then \
	${RM} ${DVNF} ; touch ${DVNF} ;\
	fi
	${NOECHO}if test -z "$(ISteTeX)" ;\
	then ${ECHO} " " ; \
	else \
		if test -z "${NECESSARYFPCMD}" ;\
		then ${ECHO} " " ; \
		else \
	${EXEC} ${CP} ${INTERACTIVE} ${MODBIN} \
		${NECESSARYFPCMD} ${BINDIR}/${NECESSARYFPCMD}${SHELLEXT};\
	   echo "${CP} ${INTERACTIVE} ${MODBIN} \
	       ${BINDIR}/${NECESSARYFPCMD}${SHELLEXT} ${BINARIES}" >> movebin.sh ;\
	${ECHO} ${E388${LANGMSG}};\
		fi ;\
	fi

create-bin:	
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${BINDIR}

install-bin:	create-bin
	${NOERR}${NOECHO}cp ${DVNF}  ${BINDIR}/kb7to8 # clean for HP
	${NOERR}${NOECHO}${EXEC} \
	${CP} ${INTERACTIVE} ${MODBIN} ${FRENCHBINDIR}/kb7to8${BINEXT} ${BINDIR}
	${NOECHO}echo "rm ${BINDIR}/kb7to8${BINEXT}"  >> ${MYPWD}/uninstall.sh
	${NOECHO}echo "${CP} ${INTERACTIVE} ${MODBIN} \
	       ${BINDIR}/kb7to8${BINEXT} ${BINARIES}" >> movebin.sh 
	${NOERR}${NOECHO}cp ${DVNF}  ${BINDIR}/kb8to7 # clean for HP
	${NOERR}${NOECHO}${EXEC} \
	${CP} ${INTERACTIVE} ${MODBIN} ${FRENCHBINDIR}/kb8to7${BINEXT} ${BINDIR}
	${NOECHO}echo "rm ${BINDIR}/kb8to7${BINEXT}"  >> ${MYPWD}/uninstall.sh
	${NOECHO}echo "${CP} ${INTERACTIVE} ${MODBIN} \
	       ${BINDIR}/kb8to7${BINEXT} ${BINARIES}" >> movebin.sh 
	@${ECHO} " "
	@${ECHO} ${E345${LANGMSG}}
	@${ECHO} " "
	${NOECHO}${EXEC} cd ${MYPWD}

install-doc:	
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${TEXDOCS}
	${NOECHO}touch ALIRE.pdf
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${TEXDOCS}
#
	${NOECHO}${EXEC} ${CP} ${MODTXT} ALIRE.pdf frenchpro.pdf
	${NOECHO}cp  ${DVNF}  ${TEXDOCS}/frenchpro.pdf 
	${NOECHO}${EXEC} \
		${CP} ${MODTXT} frenchpro.pdf ${TEXDOCS}/frenchpro.pdf
	${NOECHO}echo "rm ${TEXDOCS}/frenchpro.pdf"  >> ${MYPWD}/uninstall.sh
	${NOECHO}${EXEC} \
		${RM} frenchpro.pdf 
#
	${NOECHO}cp  ${DVNF}  ${TEXDOCS}/frguide.pdf
	${NOECHO}${EXEC} \
		${CP} ${MODTXT} ${DOCDIR}/frguide.pdf ${TEXDOCS}/frguide.pdf
	${NOECHO}echo "rm ${TEXDOCS}/frguide.pdf"  >> ${MYPWD}/uninstall.sh
#
	${NOECHO}cp  ${DVNF}  ${TEXDOCS}/frenchle.pdf
	${NOECHO}${EXEC} \
		${CP} ${MODTXT} ${DOCDIR}/frenchle.pdf ${TEXDOCS}/frenchle.pdf
	${NOECHO}echo "rm ${TEXDOCS}/frenchle.pdf"  >> ${MYPWD}/uninstall.sh
#
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${DESTDIRDIR}
	@${ECHO} " "
	@${ECHO} ${E346${LANGMSG}}
	@${ECHO} " "
	${NOECHO}${EXEC} cd ${MYPWD}

install-le:	
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${DESTLEDIR}
	${NOECHO}${EXEC} cd ${FRENCHDIR}
	${NOECHO}cd ${FRENCHDIR} ; \
	for f in french.ldf frenchle.ldf frenchle.sty frenchle.cfg ; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTLEDIR} ; \
	cp  ${DVNF}  ${DESTLEDIR}/$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTLEDIR} ; \
	echo "rm ${DESTLEDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done	

install-base: 	
# ".doc" files are left in their original source place. 
	${NOECHO}${EXEC} cd ${INPUTSDIR}
	${NOECHO}cd ${INPUTSDIR} ; for f in *.tex ; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	${CP}  ${DVNF}  ${DESTDIRDIR}/$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	echo "rm ${DESTDIRDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
#
	${NOECHO}${EXEC} cd ${FRENCHDIR}
	${NOECHO}cd ${FRENCHDIR} ; \
	for f in *.tex *.sty *.all *.chk *.cmd *.ldf *.dmy; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	cp  ${DVNF}  ${DESTDIRDIR}/$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	echo "rm ${DESTDIRDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
# Babel mods
	${NOECHO}${EXEC} cd ${FRENCHDIR}
	${NOECHO}cd ${FRENCHDIR} ; \
	echo ${CP} ${MODTXT} frbabel.sty ${DESTDIRDIR}/babel.sty ; \
	cp  ${DVNF}  ${DESTDIRDIR}/babel.sty ; \
	${EXEC} ${CP} ${MODTXT} frbabel.sty ${DESTDIRDIR}/babel.sty ; \
	echo "rm ${DESTDIRDIR}/babel.sty"  >> ${MYPWD}/uninstall.sh
# The "frozen" directory is left on the side.
	${NOECHO}${EXEC} cd ${KEYBOARDDIR}
	${NOECHO}cd ${KEYBOARDDIR} ; for f in *.tex *.sty *.kbc ; \
	do \
	cp  ${DVNF}  ${DESTDIRDIR}/$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	echo "rm ${DESTDIRDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
# Install french.*.kbc files
	${NOECHO}cd ${KEYBOARDDIR} ; for f in *.kbc ; \
	do \
	cp  ${DVNF}  ${DESTDIRDIR}/french.$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIRDIR}/french.$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTDIRDIR}/french.$$f  ; \
	echo "rm ${DESTDIRDIR}/french.$$f"  >> ${MYPWD}/uninstall.sh ;\
	cp  ${DVNF}  ${DESTDIRDIR}/english.$$f ; \
	echo ${CP} ${MODTXT} qwerty.kbc ${DESTDIRDIR}/english.$$f ; \
	${EXEC} ${CP} ${MODTXT} qwerty.kbc ${DESTDIRDIR}/english.$$f  ; \
	echo "rm ${DESTDIRDIR}/english.$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
# The following is for FrenchPro V5,90 compatibility.
	${MKDIRS} ${MSGDIR}
	${NOECHO}${EXEC} cd ${MSGDIR}
	${NOECHO}cd ${MSGDIR} ; for f in *.sty *msg.tex ; \
	do \
	cp  ${DVNF}  ${DESTDIRDIR}/$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	echo "rm ${DESTDIRDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
#
	${NOECHO}${EXEC} cd ${MLPDIR}
	${NOECHO}cd ${MLPDIR} ; for f in *.sty *.mlp; \
	do \
	cp  ${DVNF}  ${DESTDIRDIR}/$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	echo "rm ${DESTDIRDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
#
	${NOECHO}${EXEC} cd ${OTHERDIR} 
	${NOECHO}cd ${OTHERDIR} ; for f in *.sty ; \
	do \
	cp  ${DVNF}  ${DESTDIRDIR}/$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	${EXEC} ${CP} ${MODTXT} $$f ${DESTDIRDIR} ; \
	echo "rm ${DESTDIRDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
	@${ECHO} " "
	@${ECHO} ${E347${LANGMSG}}
	@${ECHO} " "
	${NOECHO}${EXEC} cd ${MYPWD}

install-index:	
	${NOERR}${NOECHO}${EXEC} $(MKDIRS) ${ISTDIR}
	${NOECHO}${EXEC} cd ${MKINDEXDIR} 
	${NOECHO}cd ${MKINDEXDIR} ; for f in *.ist ; \
	do \
	echo ${CP} ${MODTXT} $$f ${ISTDIR} ; \
	cp  ${DVNF}  ${DESTDIRDIR}/$$f ; \
	${EXEC} ${CP} ${MODTXT} $$f ${ISTDIR} ; \
	echo "rm ${DESTDIRDIR}/$$f"  >> ${MYPWD}/uninstall.sh ;\
	done
	@${ECHO} " "
	@${ECHO} ${E348${LANGMSG}}
	@${ECHO} " "
	${NOECHO}${EXEC} cd ${MYPWD}

uninstall:	clean
	@${ECHO} ${E382${LANGMSG}}
	${NOECHO}chmod ${MOD4ME} uninstall.sh	
	${SHELL} ./uninstall.sh 2>>${DNF}
	@${ECHO} ${E349${LANGMSG}}

#############################################################################
# Optional parts
#############################################################################
reftest:	
	${NOECHO}${RM} ${TSTDIR}/frenchlb.aux
	${NOECHO}if test ! -f ${WHERELFMT}/${LFMTNAME}.$(LFMTEXT) ; then \
	${ECHO} ${E310${LANGMSG}}; ${ECHO} ${E312${LANGMSG}} ;\
		if test -f ${WHERELFMT}/${LFMTNAME}.e$(LFMTEXT) ; then \
		${ECHO} ${E402${LANGMSG}};\
		fi ;\
	${ECHO} ${E370${LANGMSG}} ; exit 1 ;\
	fi
	${NOECHO}${ECHO} "${BINDIR}/${NECESSARYFPCMD}${LFMTNAME} $(TEXTCX) frenchlb" 
	${NOECHO}cd ${TSTDIR} ; ${BINDIR}/${NECESSARYFPCMD}${LFMTNAME} $(TEXTCX) frenchlb 
	${NOECHO}if test ! -f ${TSTDIR}/frenchlb.aux ; then \
	${ECHO} ${E400${LANGMSG}}; exit 1 ;\
	fi
	${NOECHO}cd ${TSTDIR} ; ${INDEXCMD} frenchlb  ;\
	${BINDIR}/${NECESSARYFPCMD}${LFMTNAME} $(TEXTCX) frenchlb ; ${RM} *.glo *.idx *.lof *.lot *.toc *.aux
	@${ECHO} ${E350${LANGMSG}}
	@${ECHO} ${E351${LANGMSG}}
	@${ECHO} ${E352${LANGMSG}}
	@${ECHO} ${E332${LANGMSG}}
	@${ECHO} ${E333${LANGMSG}}
	@${ECHO} ${E354${LANGMSG}}

#############################################################################
printed:	
	@cd tst ; if [ "$$PRINTER" != "" ] ;\
	then ${PRINTDVI} -P $$PRINTER ${NUMPAGES} frenchrf ;\
	else ${PRINTDVI} frenchrf ${NUMPAGES} ; \
		fi ;
	@cd tst ; if [ "$$PRINTER" != "" ] ;\
	then ${PRINTDVI} -P $$PRINTER ${NUMPAGES} frenchlb ;\
	else ${PRINTDVI} ${NUMPAGES} frenchlb ; \
		${ECHO} ${E376${LANGMSG}} ; \
		fi ;
	@${ECHO} ${E355${LANGMSG}}
	@${ECHO} ${E333${LANGMSG}}
	${NOECHO}if test ! "${AUTREOS}" = "Windows" ; then \
	${ECHO} ${E357${LANGMSG}} ;\
	fi

#############################################################################
register: sendmessage

sendmessage:
	${VI} REGISTER
	-cat REGISTER | mail -s "(french) installation" frenchprobg@free.fr

#############################################################################
CleanRecodeMsgFiles:
	@cd ${FRENCHDIR} ; for f in *-msg.tex ;\
	do \
	if test -f $$f.7b ; then \
	chmod 644 $$f ;\
	rm $$f; mv $$f.7b $$f ;\
	chmod 444 $$f ;\
	fi ; \
	done
	@cd ${MSGDIR} ; for f in *-msg.tex ;\
	do \
	if test -f $$f.7b ; then \
	chmod 644 $$f ;\
	rm $$f; mv $$f.7b $$f ;\
	chmod 444 $$f ;\
	fi ; \
	done
	@cd ${KEYBOARDDIR} ; for f in *-msg.tex ;\
	do \
	if test -f $$f.7b ; then \
	chmod 644 $$f ;\
	rm $$f; mv $$f.7b $$f ;\
	chmod 444 $$f ;\
	fi ; \
	done

clean:	CleanRecodeMsgFiles
	${NOERR}${RM} ${TSTDIR}/fyench.tst ${TSTDIR}/f7ench.tst ${TSTDIR}/*.tmp\
		${TSTDIR}/f8ench.tst ${TSTDIR}/french.tst
	${NOERR}if test ! -z "${VISMiKTeX}" ; then \
		${RM} -R ${MYMIKTEXDIR} ;\
		fi
	${NOERR}$(RM) ${INPUTSDIR}/french/frabbrev.tex 
	${NOERR}$(RM) ${KEYBOARDDIR}/french.* # remove duplicated kbc/dat files
	${NOERR}$(RM) ${MYPWD}/trialinit
	${NOERR}${RM} ${INITEXDIR}/*.$(PFMTEXT) 
	${NOERR}${RM} ${INITEXDIR}/*.$(LFMTEXT) 
	${NOERR}${RM} ${INITEXDIR}/*~ 
	${NOERR}${RM} ${INITEXDIR}/plaintex.cfg
	${NOERR}${RM} ${INITEXDIR}/hyphen.cfg
	-cd ${INITEXDIR} ; cp hyphen.org hyphen.cfg
	-cd ${INITEXDIR} ; ${LNS} ./hyphen.cfg plaintex.cfg 2>>${DNF}
	${NOERR}${RM} ${INITEXDIR}/*${EXTINI}
	${NOERR}${RM} ${INITEXDIR}/*.log  ${INITEXDIR}/*.aux ${INITEXDIR}/*.tmp
	${NOERR}${RM} *.lex kb7to8 kb8to7 *.log *.aux lex.yy.c *.tmp *~
	-cd tst ; ${RM} frenchlb.dvi *.log *.aux *.lof *.lot *.toc *.idx *.glo *~
	-cd ${INITEXDIR}/tests ; ${RM} *.dvi *.log *.aux *~
	-cd doc ; ${RM} *~
	-cd contrib ; ${RM} *~
	-cd MlTeX ; ${RM} *~
	${NOERR}${RM} -r ${FRENCHBINDIR}
	${NOERR}${RM} $(MYPWD)/install.cmd 
	${NOERR}${RM} ${MYPWD}/getbinary
	${NOECHO}if test -f ${MYCNFINIDIR}/${MYCNFINIP}X ; then \
	         ${RM} ${MYCNFINIDIR}/${MYCNFINIP}X ;\
		 fi
	${NOECHO}if test -f ${MYCNFINIDIR}/${MYCNFINIL}X ; then \
	         ${RM} ${MYCNFINIDIR}/${MYCNFINIL}X ;\
		 fi
	${NOERR}${NOECHO}if test "${AUTREOS}" = "Windows" ; then \
	 ${RM} ${DVNF} ;\
		  fi
	${NOECHO}echo ${MAKENAME}: ${E379${LANGMSG}}

superclean:	clean
	${NOERR}${NOECHO}${RM} ${MYPWD}/done
	${NOERR}${RM} ${MYPWD}/${MAKENAME} ${MYPWD}/${THELOG} \
		${MYPWD}/uninstall.sh ${MYPWD}/movebin.sh
	${NOERR}${RM} ${MYPWD}/echoandlog ${MYPWD}/execandbat
	${NOERR}${NOECHO}if test -f ${MYPWD}/makefile.org ; then \
		mv ${MYPWD}/makefile.org ${MYPWD}/${MAKENAME} ;\
	fi
	${NOERR}${RM} ${MYPWD}/install.bat ${MYPWD}/uninstall.bat
#############################################################################
