Skip to content
Snippets Groups Projects
Commit 5dcd56e4 authored by Edward Longman's avatar Edward Longman
Browse files

Add Comments to Makefile and stop it looping through files when out of date

parent a6fc4a04
No related branches found
No related tags found
No related merge requests found
#*=============================================================================
# Makefile for ecsdocs LaTeX Style
# Date: 11/05/2002
# Author: Steve Gunn
#*=============================================================================
# Author: Steve Gunn and Edward Longman
# Use for rebuilding class files when the original dtx source has been changed
# Change TEXMF to represent the installation directory of texlive (or MiKTeX)
# The style is the name of the style for these templates.
# make
# all - creates all the necessart files to install the class
# install - moves all of the created files into the
#*======================BUILD AND INSTALL NAMES================================
TEXMF = C:/Apps/texlive/texmf-local
STYLE = ecsdocs
#*=============================================================================
#*====================DEFINE EXPECTED OUTPUT FILES=============================
CLSFILES = ecsthesis.cls \
ecsminithesis.cls \
......@@ -64,20 +70,25 @@ DOCDIR = "$(TEXMF)/doc/latex/$(STYLE)"
BSTDIR = "$(TEXMF)/bibtex/bst/$(STYLE)"
BIBDIR = "$(TEXMF)/bibtex/bib/$(STYLE)"
#*===========================================================================
#*====================== LATEX INSTALLATION CONFIG ==========================
LATEX = pdflatex
PDFTEXIFY = texify --pdf
MAKEINDEX = makeindex
#*===========================================================================
#*==================== DIFFERENT MAKE CONFIGURATIONS ========================
all: $(GENFILES) $(DOCFILES)
dist: $(STYLE).zip
test: $(GENFILES) $(TESTFILES)
$(GENFILES): $(STYLE).dtx $(STYLE).ins Makefile
#* .SECONDARY used to stop it building repeatedly
#* https://stackoverflow.com/questions/2973445/
#* gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file
$(GENFILES): $(STYLE).intermediate;
.SECONDARY: $(STYLE).intermediate
$(STYLE).intermediate: $(STYLE).dtx $(STYLE).ins Makefile
$(LATEX) $(STYLE).ins
$(DOCFILES): $(STYLE).dtx
......@@ -89,14 +100,14 @@ $(DOCFILES): $(STYLE).dtx
%.pdf: %.tex
$(PDFTEXIFY) $*.tex
#*===========================================================================
#*========================== ZIP REQUIREMENTS ===============================
$(STYLE).zip: $(GENFILES) $(DOCFILES)
$(MAKE) clean
zip $@ $(SRCFILES) $(GENFILES) $(DOCFILES)
#*===========================================================================
#*============================= CLEAN TYPES =================================
clean:
-$(RM) *.aux *.log *.ind *.idx *.glo *.gls *.ilg *.toc *.bak *.lol *.lot *.out *.lof *.bbl *.blg
......@@ -106,7 +117,7 @@ veryclean: clean
distclean: veryclean
-$(RM) *.cls *.tex *.eps *.bib *.bst *.zip
#*===========================================================================
#*======================= INSTALL INTO TEXMF DIRECTORY ======================
install: $(GENFILES) $(DOCFILES)
install -d $(CLSDIR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment