summaryrefslogtreecommitdiff
path: root/support/imaketex/texmkmf.cpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/imaketex/texmkmf.cpp
Initial commit
Diffstat (limited to 'support/imaketex/texmkmf.cpp')
-rw-r--r--support/imaketex/texmkmf.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/support/imaketex/texmkmf.cpp b/support/imaketex/texmkmf.cpp
new file mode 100644
index 0000000000..b1cd55b391
--- /dev/null
+++ b/support/imaketex/texmkmf.cpp
@@ -0,0 +1,60 @@
+XCOMM!/bin/sh
+
+XCOMM
+XCOMM Copyright 1993 Rainer Klute
+XCOMM <klute@irb.informatik.uni-dortmund.de>
+XCOMM
+XCOMM generate a Makefile from an Imakefile using Imake-TeX rules
+XCOMM
+XCOMM $Id: texmkmf.cpp,v 0.91 1993/03/17 11:03:42 klute Exp klute $
+
+usage="usage: $0 [-a] [top_of_sources_pathname [current_directory]]"
+
+topdir=
+curdir=.
+do_all=
+
+case "$1" in
+-a)
+ do_all="yes"
+ shift
+ ;;
+esac
+
+case $# in
+ 0) ;;
+ 1) topdir=$1 ;;
+ 2) topdir=$1 curdir=$2 ;;
+ *) echo "$usage" 1>&2; exit 1 ;;
+esac
+
+case "$topdir" in
+ -*) echo "$usage" 1>&2; exit 1 ;;
+esac
+
+if [ -f Makefile ]; then
+ echo mv Makefile Makefile.bak
+ mv Makefile Makefile.bak
+fi
+
+if [ "$topdir" = "" ]; then
+ args="-DUseInstalled "CONFIGDIRSPEC
+else
+ args="-I$topdir/config -DTOPDIR=$topdir -DCURDIR=$curdir"
+fi
+
+echo imake $args
+case "$do_all" in
+yes)
+ imake $args &&
+ echo "make Makefiles" &&
+ make Makefiles &&
+ echo "make includes" &&
+ make includes &&
+ echo "make depend" &&
+ make depend
+ ;;
+*)
+ imake $args
+ ;;
+esac