summaryrefslogtreecommitdiff
path: root/biblio/tib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'biblio/tib/Makefile')
-rw-r--r--biblio/tib/Makefile171
1 files changed, 171 insertions, 0 deletions
diff --git a/biblio/tib/Makefile b/biblio/tib/Makefile
new file mode 100644
index 0000000000..56b35b9470
--- /dev/null
+++ b/biblio/tib/Makefile
@@ -0,0 +1,171 @@
+############# CUSTOMIZATION SECTION
+
+SHELL = /bin/sh
+#
+TIBDIR = /usr/local/lib/texmf/tib
+DESTDIR = /usr/local/bin
+MANDIR = /usr/local/man
+TEXBIN = /usr/local/bin/tex
+
+############# End of customization section
+
+
+
+
+############ TOP-LEVEL GOALS
+
+all:
+ @echo "**************************************************************"
+ @echo ""
+ @echo " make sk produces tib with Sebastian Kremer's"
+ @echo " (sk@thp....) extensions"
+ @echo ""
+ @echo " make ja produces John Alexander's (...)"
+ @echo " original version."
+ @echo ""
+ @echo " make test tests the core system"
+ @echo ""
+ @echo " make install installs the executables ONLY"
+ @echo ""
+ @echo " make install.all installs the complete system"
+ @echo ""
+ @echo "**************************************************************"
+
+
+ja: progs
+ touch .made
+
+sk: progs add-ons
+ touch .sk
+ touch .made
+
+install: exinst install.them
+
+install.all: install.them install.macros install.doc install.man
+
+dvi: doc tibdoc.dvi
+
+manual: tib.cat
+
+test: progs
+ (cd test; make TEXBIN=$(TEXBIN) all)
+
+clean:
+ (cd src; make clean)
+ (cd test; make clean)
+
+veryclean:
+ (cd src; make veryclean)
+ (cd sk; make clean)
+ (cd test; make clean)
+ rm -f doc/tibdoc.tex tib.1 tib.cat doc/intro.tib \
+ tibabb tibdoc.dvi tibdoc.log .sk .made
+ if [ -f inputs/.patched ]; then \
+ (cd inputs; patch -R <../sk/tib-2.2-patch; rm -f .patched); \
+ fi
+
+########### Subordinate goals
+
+progs: src/tib.h
+ ( cd src; make DESTDIR=$(DESTDIR) all)
+ sed -e 's|BBBBB|$(TIBDIR)/inputs|' tibabb.sh > tibabb
+
+add-ons:
+ ( cd sk; make DESTDIR=$(DESTDIR) TIBDIR=$(TIBDIR) TEXBIN=$(TEXBIN) all)
+ if [ ! -f inputs/.patched ]; then \
+ ( cd inputs; patch <../sk/tib-2.2-patch; touch .patched );\
+ fi
+
+tibdoc.dvi:
+ $(TEXBIN) doc/tibdoc.tex
+
+
+doc: doc/tibdoc.tex doc/intro.tib
+
+doc/tibdoc.tex:
+ sed -e 's|AAAAA|$(TIBDIR)/doc|' \
+ -e 's|BBBBB|$(TIBDIR)/inputs|' \
+ -e 's|CCCCC|$(TIBDIR)/index/common|' \
+ tibdoc.tex > doc/tibdoc.tex
+
+tib.1:
+ sed -e 's|AAAAA|$(TIBDIR)/doc|g' \
+ -e 's|BBBBB|$(TIBDIR)/inputs|' \
+ -e 's|CCCCC|$(TIBDIR)/index/common|' \
+ -e 's|EEEEE|$(TIBDIR)/src|' \
+ -e 's|FFFFF|$(TIBDIR)/index/INDEX|' tib.man > tib.1
+
+doc/intro.tib:
+ sed -e 's|AAAAA|$(TIBDIR)/doc|g' intro.tib > doc/intro.tib
+
+src/tib.h:
+ sed -e 's|BBBBB|$(TIBDIR)/inputs|' \
+ -e 's|CCCCC|$(TIBDIR)/index/common|' \
+ -e 's|FFFFF|$(TIBDIR)/index/INDEX|' tib.h > src/tib.h
+
+.made: all
+
+exinst:
+ @echo ""
+ @echo "*** This command will only install the executables."
+ @echo ""
+ @echo "*** To install the complete system and/or the man-pages, do"
+ @echo " 'make install.all' and/or 'make install.man'"
+ @echo ""
+
+install.them: progs
+ install -s -m 755 -c src/tibdex $(DESTDIR)/tibdex
+ install -s -m 755 -c src/tiblook $(DESTDIR)/tiblook
+ install -s -m 755 -c src/tiblist $(DESTDIR)/tiblist
+ install -s -m 755 -c src/tib $(DESTDIR)/tib
+ install -c -m 755 tibabb $(DESTDIR)/tibabb
+ if [ -f .sk ]; then \
+ install -s -c -m 755 sk/swortcp $(TIBDIR)/swortcp; \
+ install -s -c -m 755 sk/ttb $(DESTDIR)/ttb; \
+ install -c -m 755 sk/texbib $(DESTDIR)/texbib; \
+ install -c -m 755 sk/texswlist $(DESTDIR)/texswlist; \
+ fi
+
+tibdir:
+ if [ ! -d $(TIBDIR) ]; then \
+ echo mkdir $(TIBDIR); \
+ mkdir $(TIBDIR); \
+ chmod a+rx $(TIBDIR); \
+ fi
+
+install.doc: doc tibdir
+ if [ ! -d $(TIBDIR)/doc ]; then \
+ echo mkdir $(TIBDIR)/doc; \
+ mkdir $(TIBDIR)/doc; \
+ chmod a+rx $(TIBDIR)/doc; \
+ fi;
+ install -c -m 644 ./doc/* $(TIBDIR)/doc
+
+install.macros: tibdir
+ if [ ! -d $(TIBDIR)/inputs ]; then \
+ echo mkdir $(TIBDIR)/inputs; \
+ mkdir $(TIBDIR)/inputs; \
+ chmod a+rx $(TIBDIR)/inputs; \
+ fi;
+ install -c -m 644 inputs/* $(TIBDIR)/inputs
+ if [ ! -d $(TIBDIR)/index ]; then \
+ echo mkdir $(TIBDIR)/index; \
+ mkdir $(TIBDIR)/index; \
+ chmod a+rx $(TIBDIR)/index; \
+ fi;
+ install -c -m 644 index/* $(TIBDIR)/index
+
+install.man: tib.1
+ install -c -m 644 tib.1 $(MANDIR)/man1/tib.1
+ if [ -f .sk ]; then \
+ install -c -m 644 sk/ttb.1 $(MANDIR)/man1/ttb.1;\
+ install -c -m 644 sk/texbib.1 $(MANDIR)/man1/texbib.1;\
+ install -c -m 644 sk/texswlist.1 $(MANDIR)/man1/texswlist.1;\
+ install -c -m 644 sk/tib.5 $(MANDIR)/man5/tib.5;\
+ install -c -m 644 sk/tib.7 $(MANDIR)/man5/tib-ext.5;\
+ fi
+
+tib.cat: tib.1
+ nroff -h -man tib.1>tib.cat
+
+### end of makefile