Commit 5cd75b18 authored by Vít Novotný's avatar Vít Novotný
Browse files

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.
parent e57e561e
Loading
Loading
Loading
Loading
+50 −23
Original line number Diff line number Diff line
@@ -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.
+47 −17
Original line number Diff line number Diff line
@@ -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`).