From 5cd75b184f5af39ed54608515c047b4a23baff4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Novotn=C3=BD?= <witiko@gmail.com> Date: Wed, 16 Mar 2016 21:29:44 +0100 Subject: [PATCH] Added the `docs`, `install-base`, and `install-docs` targets and updated the `README`. The `make all install-base` command can now be used to perform just a base installation. Using the `make docs install-docs` command afterwards will typeset and install the documentation as well. --- Makefile | 73 +++++++++++++++++++++++++++++++++++++------------------ README.md | 64 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 97 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index ada7267..d9f53b0 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ SUBMAKES_REQUIRED=logo/mu locale style style/mu SUBMAKES_EXTRA=guide/mu example/mu SUBMAKES_TEST=test test/mu/blind test/mu/compare SUBMAKES=$(SUBMAKES_REQUIRED) $(SUBMAKES_EXTRA) $(SUBMAKES_TEST) -.PHONY: all complete clean dist dist-implode implode \ - install uninstall tests $(SUBMAKES) +.PHONY: all complete docs clean dist dist-implode implode \ + install install-base install-docs uninstall tests $(SUBMAKES) CLASSFILES=fithesis.cls fithesis2.cls fithesis3.cls STYLEFILES=style/*.sty style/*/*.sty style/*/*.clo @@ -74,10 +74,15 @@ all: $(SUBMAKES_REQUIRED) make $(CLASSFILES) # This pseudo-target creates the class files and typesets the -# technical documentation and the guides. +# technical documentation, the user guides, and the user examples. complete: all make $(PDFS) clean +# This pseudo-target typesets the technical documentation and the +# user guides. +docs: + make $(DOCS) clean + # This pseudo-target calls a submakefile. $(SUBMAKES): make -C $@ all @@ -134,55 +139,77 @@ $(CTANARCHIVE): $(SOURCES) $(MAKES) $(TESTS) $(EXAMPLES) \ (cd "$$DIR" && zip -r -v -nw $@ *) && \ mv "$$DIR"/$@ . && rm -rf "$$DIR" -# This pseudo-target installs the class files and the technical -# documentation into the TeX directory structure, whose root -# directory is specified within the "to" argument. Specify -# "nohash=true", if you wish to forgo the reindexing of the package -# database. -install: +# This pseudo-target installs the class, locale, style, and logo +# files - as well as the technical documentation and user guides - +# into the TeX directory structure, whose root directory is +# specified within the "to" argument. Specify "nohash=true", if you +# wish to forgo the reindexing of the package database. +install: install-base install-docs + +# This pseudo-target installs the class, locale, style, and logo +# files into the TeX directory structure, whose root directory is +# specified within the "to" argument. Specify "nohash=true", if you +# wish to forgo the reindexing of the package database. +install-base: @if [ -z "$(to)" ]; then \ - printf "Usage: make install to=DIRECTORY"; \ + printf "Usage: make install-base to=DIRECTORY\n"; \ printf "Detected TeXLive directory: %s\n" $(TEXLIVEDIR); \ exit 1; \ fi - # Class, locale, style and logo files + @# Class, locale, style and logo files mkdir -p "$(to)/tex/latex/fithesis" cp --parents --verbose $(LATEXFILES) "$(to)/tex/latex/fithesis" - # Source files + @# Source files mkdir -p "$(to)/source/latex/fithesis" cp --parents --verbose $(SOURCES) "$(to)/source/latex/fithesis" - # Documentation - mkdir -p "$(to)/doc/latex/fithesis" - cp --parents --verbose $(DOCS) "$(to)/doc/latex/fithesis" - - # Rebuild the hash + @# Rebuild the hash [ "$(nohash)" = "true" ] || texhash -# This pseudo-target installs the class files and the technical +# This pseudo-target installs the the technical and user # documentation into the TeX directory structure, whose root # directory is specified within the "to" argument. Specify # "nohash=true", if you wish to forgo the reindexing of the package # database. +install-docs: + @if [ -z "$(to)" ]; then \ + printf "Usage: make install-docs to=DIRECTORY\n"; \ + printf "Detected TeXLive directory: %s\n" $(TEXLIVEDIR); \ + exit 1; \ + fi + + @# Documentation + mkdir -p "$(to)/doc/latex/fithesis" + cp --parents --verbose $(DOCS) "$(to)/doc/latex/fithesis" + + @# Rebuild the hash + [ "$(nohash)" = "true" ] || texhash + + +# This pseudo-target uninstalls the class, locale, style, and logo +# files - as well as the technical documentation and user guides - +# from the TeX directory structure, whose root directory is +# specified within the "from" argument. Specify "nohash=true", if +# you wish to forgo the reindexing of the package database. uninstall: @if [ -z "$(from)" ]; then \ - printf "Usage: make uninstall from=DIRECTORY"; \ + printf "Usage: make uninstall from=DIRECTORY\n"; \ printf "Detected TeXLive directory: %s\n" $(TEXLIVEDIR); \ exit 1; \ fi - # Class, locale, style and logo files + @# Class, locale, style and logo files rm -rf "$(from)/tex/latex/fithesis" - # Source files + @# Source files rm -rf "$(from)/source/latex/fithesis" - # Documentation + @# Documentation rm -rf "$(from)/doc/latex/fithesis" - # Rebuild the hash + @# Rebuild the hash [ "$(nohash)" = "true" ] || texhash # This pseudo-target removes any existing auxiliary files. diff --git a/README.md b/README.md index 66f25f0..28a7cca 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ the Masaryk University (Brno, Czech Republic). The class has been designed for easy extensibility by style and locale files of other academic institutions. -# Installation # -## Requirements ## +# Requirements # To install the package, you are going to need a POSIX.2-compliant environment as well as the following tools: @@ -23,18 +22,19 @@ the guide files within the `guide/` subdirectory. (For running the test suite using the `make tests` command, the `faketime` and `comparepdf` commands are also required.) -## Procedure ## +# Installation # -To begin the installation, execute the following command from within +To install the package, execute the following command from within the current directory: - make complete - make install to=[[TDS]] + make all + make install-base to=[[TDS]] nohash=true + +where `[[TDS]]` is a path in the TeX directory structure to which +you are going to install the package (such as `/usr/share/texmf`). -and replace `[[TDS]]` with a path to the TeX directory structure into -which you want to install the package (such as `/usr/share/texmf`). -If necessary, update the file name database of your TeX -distribution: +After successfully running the commands, update the file name +database of your TeX distribution, if necessary: * In MiKTeX: - Using the GUI: In the Start Menu go to the MiKTeX entry and @@ -47,17 +47,47 @@ distribution: - Using the command prompt: Execute either `initexmf -u` or `initexmf -u --admin` depending on whether you are installing the package into a single-user private directory tree or into - a shared shared directory tree on a multi-user system, - respectively. - * In TeX Live: + a shared shared directory tree on a multi-user system. + * In TeX Live and MacTeX: - Execute `texhash` with superuser privileges (`sudo texhash`). +You may now also wish to typeset and install the user and technical +documentation of the package. You can do that by running: + + make docs + make install-docs to=[[TDS]] nohash=true + +where `[[TDS]]` is again a path in the TeX directory structure to +which you are going to install the documentation and will likely be +the same as before. + +After successfully running the commands, update the file name +database of your TeX distribution, if necessary. + +# Uninstallation # + To uninstall the package, execute the following command from within the current directory: make uninstall from=[[TDS]] -and replace `[[TDS]]` with a path to the TeX directory structure into -which you want to install the package (such as `/usr/share/texmf`). -If necessary, update the file name database of your TeX -distribution. +where `[[TDS]]` is a path in the TeX directory structure to which +you are going to install the package (such as `/usr/share/texmf`). + +After successfully running the commands, update the file name +database of your TeX distribution, if necessary: + + * In MiKTeX: + - Using the GUI: In the Start Menu go to the MiKTeX entry and + open either the settings or the admin settings depending on + whether you are installing the package into a single-user + private directory tree or into a shared directory tree on a + multi-user system, respectively. The "MiKTeX Options" window + will open. Switch to the "General" tab and click the "Refresh + FNDB" button. + - Using the command prompt: Execute either `initexmf -u` or + `initexmf -u --admin` depending on whether you are installing + the package into a single-user private directory tree or into + a shared shared directory tree on a multi-user system. + * In TeX Live and MacTeX: + - Execute `texhash` with superuser privileges (`sudo texhash`). -- GitLab