Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
######################## GNU General Public License 2.0 ########################
## ##
## Copyright (C) 2022 Kevin Matthes ##
## ##
## This program is free software; you can redistribute it and/or modify ##
## it under the terms of the GNU General Public License as published by ##
## the Free Software Foundation; either version 2 of the License, or ##
## (at your option) any later version. ##
## ##
## This program is distributed in the hope that it will be useful, ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
## GNU General Public License for more details. ##
## ##
## You should have received a copy of the GNU General Public License along ##
## with this program; if not, write to the Free Software Foundation, Inc., ##
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ##
## ##
################################################################################

################################################################################
##
## AUTHOR Kevin Matthes
## BRIEF Settings for the Git repository.
## COPYRIGHT GPL-2.0
## DATE 2022
## FILE .gitignore
## NOTE See `LICENSE' for full license.
## See `README.md' for project details.
##
################################################################################

# Build artifacts.
build/
target/

*.a
*.bak
*.dll
*.exe
*.hi
*.lib
*.mod
*.o
*.obj
*.smod
*.so



# Documentation artifacts.
*.asy
*.eps
*.pdf



# Doxygen / Haddock directories.
html/
latex/
man/



# LaTeX artifacts.
*.aux
*.bbl
*.bcf
*.blg
*.fdb_latexmk
*.fls
*.lof
*.log
*.lol
*.lot
*.out
*.run.xml
*.synctex(busy)
*.synctex.gz
*.tdo
*.toc

################################################################################
43 changes: 42 additions & 1 deletion .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,54 @@
################################################################################

# Synonyms for the configured recipes.
alias ver := bump
alias a := all
alias b := library
alias build := library
alias d := doxygen
alias l := library
alias ver := bump
alias version := bump



# Compiler flags.
f18 := '-std=f2018'
flags := '-Wall -Werror -Wextra -Wpedantic'
lib := '-c -fPIC'

# Targets.
library := 'libcndmem.a'

# Settings for the supported language modes.
f18-lib := f18 + ' ' + lib + ' ' + flags



# The default recipe to execute.
@default: all

# Execute all configured recipes.
@all: doxygen library

# Increment the version numbers.
@bump part:
bump2version {{part}}
scriv collect

# Compile the given source file and add it to the library.
@compile source_file:
gfortran {{f18-lib}} {{source_file}}
ar rsv {{library}} *.o
rm -rf *.o

# Create the Doxygen documentation for this project.
@doxygen:
doxygen doxygen.cfg
cd latex/ && latexmk -f -r ../.latexmkrc --silent refman
cp latex/refman.pdf doxygen.pdf

# Compile the target library.
@library:
just compile src/lib.f08

################################################################################
39 changes: 39 additions & 0 deletions .latexmkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
######################## GNU General Public License 2.0 ########################
## ##
## Copyright (C) 2022 Kevin Matthes ##
## ##
## This program is free software; you can redistribute it and/or modify ##
## it under the terms of the GNU General Public License as published by ##
## the Free Software Foundation; either version 2 of the License, or ##
## (at your option) any later version. ##
## ##
## This program is distributed in the hope that it will be useful, ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
## GNU General Public License for more details. ##
## ##
## You should have received a copy of the GNU General Public License along ##
## with this program; if not, write to the Free Software Foundation, Inc., ##
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ##
## ##
################################################################################

################################################################################
##
## AUTHOR Kevin Matthes
## BRIEF The settings for the LaTeX compilation system.
## COPYRIGHT GPL-2.0
## DATE 2022
## FILE .latexmkrc
## NOTE See `LICENSE' for full license.
## See `README.md' for project details.
##
################################################################################

# Set the maximum count of compilation runs to the Doxygen default value.
$max_repeat = 8;

# Use `pdflatex` as LaTeX compiler.
$pdf_mode = 1;

################################################################################
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,38 @@ version is as follows:
> with this program; if not, write to the Free Software Foundation, Inc.,
> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

## Software Requirements

| Requirement | Type | Role |
|:------------------|:-------------:|:--------------------------------------|
| bump2version | Python CLI | automatic version increment |
| Doxygen | application | source code documentation |
| GFortran | application | Fortran 2018 compiler |
| Just | Rust binary | execution of the build instructions |
| Latexmk | application | LaTeX compilation of Doxygen manual |
| Scriv | Python CLI | changelog management |
| TeX Live (full) | package | LaTeX environment for Doxygen manual |

This library is written in Fortran 2018 such that its build requires a compiler
supporting this standard. This project relies on **GFortran** therefore.

The library build is organised with **Just**. The corresponding `.justfile`
does not only take care for the compilation of the library but also for its
documentation and testing.

The documentation is generated by **Doxygen**. The configured output formats
are listed in the following.

* HTML
* LaTeX
* UNIX manual pages

In order to finalise the LaTeX documentation, an appropriate LaTeX distribution
is required. A *full* installation of **TeX Live** is recommended. This
project employs **Latexmk** as LaTeX build manager for the manual finalisation.

In order to simplify the maintenance, **bump2version** as well as **Scriv** are
used to automate the release generation. Scriv will compile the changelog on
release after all version numbers were incremented by bump2version.

<!----------------------------------------------------------------------------->
10 changes: 10 additions & 0 deletions changelog.d/feature:src.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Added
.....

- create ``.gitignore``

- create library source file

- Doxygen: Fortran setup

- Latexmk settings
Loading