From: ecsgrt@luxor.latrobe.edu.au (Geoffrey Tobin)
Newsgroups: comp.text.tex
Subject: mfpic - simple unix Makefile, etc - mark 2 - Geoffrey Tobin.
Date: 13 Sep 92 03:52:35 GMT
Organization: La Trobe University

Jacques Galinas has posted a DOS batch file for mfpic, and Sunando Sen
has posted a modified batch file for 4dos.

The unix setup files included a Makefile, which I wrote, but even I'm
not happy with.  I append a shell archive containing a slightly
amended "Makefile", a new "README.UNIX", and a "mfmake" that takes
arguments.

Please direct (copies of) all flames, bug reports, suggestions, and
corrections regarding these three files to me, at

    ecsgrt@luxor.latrobe.edu.au

All the Best!
Geoffrey Tobin

#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 09/13/1992 03:48 UTC by gt@eesun4
# Source directory /home4/gt/TeX/graphics/MFpic/02
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    807 -r--r--r-- README.UNIX
#   3079 -r--r--r-- Makefile
#    141 -r-xr--r-- mfmake
#
# ============= README.UNIX ==============
if test -f 'README.UNIX' -a X"$1" != X"-c"; then
	echo 'x - skipping README.UNIX (File already exists)'
else
echo 'x - extracting README.UNIX (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'README.UNIX' &&
README.UNIX - 11:22 GMT Wed 9 Sep 1992 - Geoffrey Tobin.
For Unix Setup of mfpic version 0.2 of Wed 9 Sep 92.
X
Email to  ecsgrt@luxor.latrobe.edu.au  (Geoffrey Tobin).
X
1.  Setup files include:
X
setups.tex - instructions for use of mfpic under unix,
X             previewing via xdvi in X Windows,
X             printing via dvips for PostScript printers.
X
README.UNIX - this file.
X
Makefile - make file for mfpic under unix.
X
mfmake - (trivial) script to drive Makefile, ignoring errors.
X
X
2.  Explanation of mfmake :
X
Under unix, because "tex" returns an error after finding no TFM file
for the graphics on the first pass, and because this normally causes
"make" to terminate once tex exits, it is necessary to type
X
X    make -i
X
to ignore occurrences of the error, for the Makefile to be fully
processed.
X
SHAR_EOF
chmod 0444 README.UNIX ||
echo 'restore of README.UNIX failed'
Wc_c="`wc -c < 'README.UNIX'`"
test 807 -eq "$Wc_c" ||
	echo 'README.UNIX: original size 807, current size' "$Wc_c"
fi
# ============= Makefile ==============
if test -f 'Makefile' -a X"$1" != X"-c"; then
	echo 'x - skipping Makefile (File already exists)'
else
echo 'x - extracting Makefile (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
# Makefile for mfpic - 12:27 GMT Wed  9 Sep 1992 - Geoffrey Tobin.
# For mfpic version  0.2  of Wed 9 Sep 92.
#
# Email to  ecsgrt@luxor.latrobe.edu.au  (Geoffrey Tobin)
#
# The targets are:  dvi, ps, clean, manifest, zip, unzip, cat, shar,
#                   sh and unshar.
X
SRCS =  mfmake Makefile README graphbase.mf lamfpic.tex lapictures.tex \
X  mfpic.tex mfpicdoc.tex objects.tex pictures.tex setups.tex
X
SRC1 =  MANIFEST $(SRCS)
X
OUTPUT =  *.dvi  *log  *.aux  *.tfm  *.*gf  *.*pk  *.ps \
X          pics.mf lapics.mf objs.mf
X
# DVI -> PostScript converter.
# This is my favorite, Tom Rokicki's dvips.
# Available at labrea.stanford.edu, in directory ./pub.
# Also at many other sites.  Ask archie.  Archie is a database that
# lists much archived software worldwide.
X
DVIPS=dvips -Z
X
# ZIP and UNZIP programs.
# These are the portable versions.  Widely available.  Ask archie.
X
ZIP=zip
UNZIP=unzip
X
default:  dvi  pk
X
# DVI files.
# Make DVI files by default, because they are useful for all output
# drivers.
X
dvi:  setups.dvi mfpicdoc.dvi pictures lapictures objects
X
# Instructions for Setting up for Installation.
X
setups.dvi:  setups.tex
X	tex setups
X
# User Documentation.
X
mfpicdoc.dvi:  mfpicdoc.tex
X	tex mfpicdoc
X
# TeX test of mfpic.
X
pictures:  pictures.tex mfpic.tex graphbase.mf
X	tex pictures
X	mf '\mode=localfont; mag=magstep(1); input ./pics'
X	tex pictures
X
# LaTeX test of mfpic.
X
lapictures:  lapictures.tex lamfpic.tex mfpic.tex graphbase.mf
X	latex lapictures
X	mf '\mode=localfont; mag=magstep(0); input ./lapics'
X	latex lapictures
X
# TeX test of a variety of mfpic objects.
X
objects:  objects.tex mfpic.tex graphbase.mf
X	tex objects
X	mf '\mode=localfont; mag=magstep(0); input ./objs'
X	tex objects
X
# PK (packed) font format.
# Used by dvips and many other output drivers.
X
pk:   pics.360gf  lapics.300gf  objs.360gf
X	gftopk pics.360gf
X	gftopk lapics.300gf
X	gftopk objs.360gf
X
# PostScript files.
# PostScript previewers and printers are common, though not universal.
X
ps:  setups.ps  mfpicdoc.ps  pictures.ps  lapictures.ps  objects.ps
X
setups.ps:  setups.dvi
X	$(DVIPS) setups -o setups.ps
X
mfpicdoc.ps:  mfpicdoc.dvi
X	$(DVIPS) mfpicdoc -o mfpicdoc.ps
X
pictures.ps:  pictures.dvi pics.360pk
X	$(DVIPS) pictures -o pictures.ps
X
lapictures.ps:  lapictures.dvi pics.300pk
X	$(DVIPS) lapictures -o lapictures.ps
X
objects.ps:  objects.dvi objs.360pk
X	$(DVIPS) objects -o objects.ps
X
clean:
X	rm $(OUTPUT)
X
# The rest of this Makefile is intended for making a distribution,
# and for unpacking it.
X
manifest:  $(SRCS)
X	ls -l $(SRCS) > MANIFEST
X
# Zip file.
# Portable zip and unzip are free; Valeria in California is one site
# that has them.  See the comp.misc "archives" posting for sites.
X
zip:  $(SRC1)
X	$(ZIP) mfpic.zip $(SRC1)
X
unzip:  mfpic.zip
X	$(UNZIP) mfpic
X
# shar is available for both unix and DOS.
X
shar:  $(SRC1)
X	shar $(SRC1) > mfpic.shar
X
# Unshar using Bourne shell, of which there are versions for DOS!
X
sh:  mfpic.shar
X	sh mfpic.shar
X
# Or use "unshar", which is also available for DOS from Simtel-20.
X
unshar:  mfpic.shar
X	unshar mfpic.shar
SHAR_EOF
chmod 0444 Makefile ||
echo 'restore of Makefile failed'
Wc_c="`wc -c < 'Makefile'`"
test 3079 -eq "$Wc_c" ||
	echo 'Makefile: original size 3079, current size' "$Wc_c"
fi
# ============= mfmake ==============
if test -f 'mfmake' -a X"$1" != X"-c"; then
	echo 'x - skipping mfmake (File already exists)'
else
echo 'x - extracting mfmake (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'mfmake' &&
#! /bin/sh
#
# "mfmake" - 03:34 GMT Sun 13 Sep 1992 - Geoffrey Tobin.
# Email to  ecsgrt@luxor.latrobe.edu.au  (Geoffrey Tobin)
#
make -i $*
SHAR_EOF
chmod 0544 mfmake ||
echo 'restore of mfmake failed'
Wc_c="`wc -c < 'mfmake'`"
test 141 -eq "$Wc_c" ||
	echo 'mfmake: original size 141, current size' "$Wc_c"
fi
exit 0