| 1 |
# Makefile.in |
| 2 |
# @configure_input@ |
| 3 |
|
| 4 |
# Copyright 2007, 2008, 2011 by Heiko Oberdiek. |
| 5 |
# |
| 6 |
# The file is part of project mkjobtexmf. |
| 7 |
# It's free software; you may redistribute it and/or |
| 8 |
# modify it under the same terms as Perl itself |
| 9 |
# (Perl Artistic License/GNU General Public License, version 2). |
| 10 |
|
| 11 |
VPATH = @srcdir@ |
| 12 |
srcdir = @srcdir@ |
| 13 |
SHELL = @SHELL@ |
| 14 |
|
| 15 |
prefix = @prefix@ |
| 16 |
datarootdir = @datarootdir@ |
| 17 |
exec_prefix = @exec_prefix@ |
| 18 |
bindir = @bindir@ |
| 19 |
mandir = @mandir@ |
| 20 |
manext = 1 |
| 21 |
man1dir = $(mandir)/man$(manext) |
| 22 |
|
| 23 |
INSTALL = @INSTALL@ |
| 24 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
| 25 |
INSTALL_DATA = @INSTALL_DATA@ |
| 26 |
|
| 27 |
PRJ = mkjobtexmf |
| 28 |
SRC_FILE = $(PRJ).pl |
| 29 |
SRC_FILES = $(SRC_FILE) $(PRJ).ltx clean-case.pl version.pl |
| 30 |
DOC_FILES = $(PRJ).txt $(PRJ).man $(PRJ).html $(PRJ).pdf README |
| 31 |
ALL_FILES = $(DOC_FILES) configure |
| 32 |
AUTOSRC_FILES = configure.ac Makefile.in install-sh |
| 33 |
DISTRIB_FILES = $(SRC_FILES) $(ALL_FILES) $(AUTOSRC_FILES) |
| 34 |
PDFLATEX = TEXINPUTS=$(srcdir): pdflatex |
| 35 |
LUALATEX = TEXINPUTS=$(srcdir): lualatex |
| 36 |
TMP_FILE = __temp__.pl |
| 37 |
FILE_DATE_VERSION = date-version.txt |
| 38 |
|
| 39 |
default all: |
| 40 |
|
| 41 |
include $(wildcard $(srcdir)/$(PRJ).mk) |
| 42 |
|
| 43 |
configure: configure.ac |
| 44 |
autoconf |
| 45 |
|
| 46 |
Makefile: Makefile.in configure |
| 47 |
./configure |
| 48 |
|
| 49 |
doc: $(DOC_FILES) |
| 50 |
|
| 51 |
$(FILE_DATE_VERSION): $(SRC_FILE) |
| 52 |
./version.pl |
| 53 |
autoconf |
| 54 |
./configure |
| 55 |
|
| 56 |
$(PRJ).txt: $(SRC_FILE) |
| 57 |
pod2text -l $< $@ |
| 58 |
|
| 59 |
$(PRJ).man: $(SRC_FILE) $(FILE_DATE_VERSION) |
| 60 |
pod2man -d "$(shell cat $(FILE_DATE_VERSION))" $< $@ |
| 61 |
|
| 62 |
html: $(PRJ).html |
| 63 |
$(PRJ).html: $(SRC_FILE) ./clean-case.pl |
| 64 |
./clean-case.pl $< $(TMP_FILE) |
| 65 |
pod2html --title=$(PRJ) --infile=$(TMP_FILE) --outfile=$@ |
| 66 |
|
| 67 |
$(PRJ).pdf: $(PRJ).ltx $(PRJ).tex |
| 68 |
$(LUALATEX) $< |
| 69 |
makeindex $(PRJ) |
| 70 |
$(LUALATEX) $< |
| 71 |
makeindex $(PRJ) |
| 72 |
$(LUALATEX) $< |
| 73 |
makeindex $(PRJ) |
| 74 |
$(LUALATEX) $< |
| 75 |
makeindex $(PRJ) |
| 76 |
$(LUALATEX) $< |
| 77 |
|
| 78 |
$(PRJ).tex: $(SRC_FILE) |
| 79 |
./clean-case.pl $< $(TMP_FILE) |
| 80 |
pod2latex -out $@ $(TMP_FILE) |
| 81 |
recode latin1..utf8 $@ |
| 82 |
|
| 83 |
distrib: $(PRJ).zip |
| 84 |
|
| 85 |
$(PRJ).zip: $(DISTRIB_FILES) |
| 86 |
zip -9j $@ $+ |
| 87 |
|
| 88 |
install: |
| 89 |
$(INSTALL) -d $(bindir) $(man1dir) |
| 90 |
$(INSTALL_SCRIPT) $(srcdir)/$(PRJ).pl $(bindir)/$(PRJ) |
| 91 |
$(INSTALL_DATA) $(srcdir)/$(PRJ).man $(man1dir)/$(PRJ).1 |
| 92 |
|
| 93 |
check: $(SRC_FILE) |
| 94 |
podchecker $< |
| 95 |
|
| 96 |
uninstall: |
| 97 |
-rm -f $(bindir)/$(PRJ) $(man1dir)/$(PRJ).1 |
| 98 |
|
| 99 |
clean: |
| 100 |
-rm -f $(PRJ).aux $(PRJ).log $(PRJ).toc |
| 101 |
-rm -f $(PRJ).idx $(PRJ).ind $(PRJ).ilg |
| 102 |
-rm -f pod2htmd.tmp pod2htmi.tmp |
| 103 |
|
| 104 |
distclean: clean |
| 105 |
-rm -f Makefile config.status config.log config.cache |
| 106 |
-rm -f $(PRJ).tex |
| 107 |
|
| 108 |
realclean: distclean |
| 109 |
-rm -f $(ALL_FILES) $(PRJ).zip |
| 110 |
|
| 111 |
mostlyclean: clean |
| 112 |
|
| 113 |
.PHONY: default all doc distrib install check uninstall \ |
| 114 |
clean distclean realclean mostlyclean test html |