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
Branches
Tags
No related merge requests found
#*============================================================================= #*=============================================================================
# Makefile for ecsdocs LaTeX Style # Makefile for ecsdocs LaTeX Style
# Date: 11/05/2002 # 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 TEXMF = C:/Apps/texlive/texmf-local
STYLE = ecsdocs STYLE = ecsdocs
#*============================================================================= #*====================DEFINE EXPECTED OUTPUT FILES=============================
CLSFILES = ecsthesis.cls \ CLSFILES = ecsthesis.cls \
ecsminithesis.cls \ ecsminithesis.cls \
...@@ -64,20 +70,25 @@ DOCDIR = "$(TEXMF)/doc/latex/$(STYLE)" ...@@ -64,20 +70,25 @@ DOCDIR = "$(TEXMF)/doc/latex/$(STYLE)"
BSTDIR = "$(TEXMF)/bibtex/bst/$(STYLE)" BSTDIR = "$(TEXMF)/bibtex/bst/$(STYLE)"
BIBDIR = "$(TEXMF)/bibtex/bib/$(STYLE)" BIBDIR = "$(TEXMF)/bibtex/bib/$(STYLE)"
#*=========================================================================== #*====================== LATEX INSTALLATION CONFIG ==========================
LATEX = pdflatex LATEX = pdflatex
PDFTEXIFY = texify --pdf PDFTEXIFY = texify --pdf
MAKEINDEX = makeindex MAKEINDEX = makeindex
#*=========================================================================== #*==================== DIFFERENT MAKE CONFIGURATIONS ========================
all: $(GENFILES) $(DOCFILES) all: $(GENFILES) $(DOCFILES)
dist: $(STYLE).zip dist: $(STYLE).zip
test: $(GENFILES) $(TESTFILES) 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 $(LATEX) $(STYLE).ins
$(DOCFILES): $(STYLE).dtx $(DOCFILES): $(STYLE).dtx
...@@ -89,14 +100,14 @@ $(DOCFILES): $(STYLE).dtx ...@@ -89,14 +100,14 @@ $(DOCFILES): $(STYLE).dtx
%.pdf: %.tex %.pdf: %.tex
$(PDFTEXIFY) $*.tex $(PDFTEXIFY) $*.tex
#*=========================================================================== #*========================== ZIP REQUIREMENTS ===============================
$(STYLE).zip: $(GENFILES) $(DOCFILES) $(STYLE).zip: $(GENFILES) $(DOCFILES)
$(MAKE) clean $(MAKE) clean
zip $@ $(SRCFILES) $(GENFILES) $(DOCFILES) zip $@ $(SRCFILES) $(GENFILES) $(DOCFILES)
#*=========================================================================== #*============================= CLEAN TYPES =================================
clean: clean:
-$(RM) *.aux *.log *.ind *.idx *.glo *.gls *.ilg *.toc *.bak *.lol *.lot *.out *.lof *.bbl *.blg -$(RM) *.aux *.log *.ind *.idx *.glo *.gls *.ilg *.toc *.bak *.lol *.lot *.out *.lof *.bbl *.blg
...@@ -106,7 +117,7 @@ veryclean: clean ...@@ -106,7 +117,7 @@ veryclean: clean
distclean: veryclean distclean: veryclean
-$(RM) *.cls *.tex *.eps *.bib *.bst *.zip -$(RM) *.cls *.tex *.eps *.bib *.bst *.zip
#*=========================================================================== #*======================= INSTALL INTO TEXMF DIRECTORY ======================
install: $(GENFILES) $(DOCFILES) install: $(GENFILES) $(DOCFILES)
install -d $(CLSDIR) install -d $(CLSDIR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment