Skip to content

Commit

Permalink
Update makefile. Some housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
rnixx committed Jun 2, 2024
1 parent 77bcf01 commit 7775d77
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 102 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ DOCS_TARGET_FOLDER?=docs/html

# Documentation Python requirements to be installed (via pip).
# No default value.
DOCS_REQUIREMENTS?=sphinx-conestack-theme myst-parser sphinxcontrib-mermaid
DOCS_REQUIREMENTS?=

## core.mxfiles

Expand Down Expand Up @@ -214,14 +214,16 @@ MXMAKE_FOLDER?=.mxmake
# Sentinel files
SENTINEL_FOLDER?=$(MXMAKE_FOLDER)/sentinels
SENTINEL?=$(SENTINEL_FOLDER)/about.txt
$(SENTINEL): Makefile
$(SENTINEL): $(firstword $(MAKEFILE_LIST))
@mkdir -p $(SENTINEL_FOLDER)
@echo "Sentinels for the Makefile process." > $(SENTINEL)

##############################################################################
# mxenv
##############################################################################

export OS:=$(OS)

# Determine the executable path
ifeq ("$(VENV_ENABLED)", "true")
export VIRTUAL_ENV=$(abspath $(VENV_FOLDER))
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# -- Project information -----------------------------------------------------

project = "mxmake"
copyright = "2022-2023, mxstack Contributors"
copyright = "2022-2024, mxstack Contributors"
author = "mxstack Contributors"

# The full version, including alpha/beta/rc tags
Expand Down
6 changes: 2 additions & 4 deletions docs/source/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

The sources are in a GIT DVCS with its main branches at [Github](http://github.com/mxstack/mxmake).


## Copyright & Licence

- Copyright (c) 2022-2023 MXStack Contributors
- Copyright (c) 2022-2024 MXStack Contributors
- under 2-Clause BSD License (aka Simplified BSD License)
- see LICENSE.md


## Contributors

- Robert Niederreiter
- Jens Klein
- Jens Klein
4 changes: 3 additions & 1 deletion docs/source/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ Added or removed topics are checked or unchecked accordingly on the next run.
The settings section is where customization is happening.
Domains can provide configurable settings.
Setting names must be unique among all domains.
Thus they are often prefixed.
Thus they are usually prefixed.

Each setting provides a description and an optional default value.

For details read the chapter [on topics and it's domains](topics-and-domains).

Do not add custom settings to settings section.
They will be lost on next `mxmake init` respective `mxmake update` run.

## How to use on the Windows operating system

Expand Down
2 changes: 0 additions & 2 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ For details on *mxdev* read its documentation.

In addition to the Makefile, *mxmake* also creates helper scripts for development, such as scripts for testing.


## Table of Contents

```{toctree}
Expand All @@ -30,5 +29,4 @@ dependencies
make
contributing
usage-old
```
2 changes: 1 addition & 1 deletion docs/source/make.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ However, there are instances where the steps in the build process do not create
In such cases, it becomes difficult to determine if a target needs to be rebuilt.
To overcome this challenge, other methods, such as using sentinel files, can be employed to keep track of the state of the build process.

```{info}
```{note}
Sentinel files are used to indicate whether a target has been built, or if a process has been completed.
```

Expand Down
92 changes: 3 additions & 89 deletions docs/source/usage-old.rst
Original file line number Diff line number Diff line change
@@ -1,63 +1,6 @@
Usage (mostly outdated)
=======================

Basics
------

To bootstrap a new project with *mxmake*, create a project for your project:

.. code-block:: sh
$ wget https://raw.githubusercontent.com/mxstack/mxmake/main/makefiles/Makefile
$ wget https://raw.githubusercontent.com/mxstack/mxmake/main/examples/mx.ini
Optionally create ``mk`` folder and inside create ``project.mk`` for project
specific settings, includes and custom make targets. If this file is present it
gets included when running make:

.. code-block:: sh
$ mkdir mk
$ cd mk
$ wget https://raw.githubusercontent.com/mxstack/mxmake/main/examples/project.mk
After proper :ref:`Configuration` of the ini file, run:

.. code-block:: sh
$ make install
This installs a Python virtual environment, generates the relevant files,
checks out the sources defined in ``mx.ini`` and installs everything using
pip.

To run the test suite, type:

.. code-block:: sh
$ make test
Run code coverage and create coverage report:

.. code-block:: sh
$ make coverage
Cleanup the development environment:

.. code-block:: sh
$ make clean
Cleanup everything including the sources:

.. code-block:: sh
$ make full-clean
See :ref:`Targets` for more information about the available make targets.


.. _Configuration:

Configuration
Expand Down Expand Up @@ -86,41 +29,13 @@ See :ref:`Templates` for documations about the available templates.
See `here <https://github.com/mxstack/mxdev>`_ for more documentation
about the ``mxdev`` config file.


Make
----

``mxmake`` provides a generic `Makefile` for managing common install and
development tasks. This file contains a set of unified make targets for working
on your project.

At the end of the `Makefile`, a file named `project.mk` gets included if
present. It is expected in the `mk` folder of your project. This file is
supposed to contain project specific includes, setting overrides and additional
cutom targets.

An example `project.mk` can be found
`here <https://github.com/mxstack/mxmake/tree/master/examples>`_.

The generic ``mxmake`` `Makefile` and a set of useful domain specific make files
to be included in your project can be found
`here <https://github.com/mxstack/mxmake/tree/master/makefiles>`_.


.. _Targets:

Targets
~~~~~~~

The available make targets are build with ``make <targetname>``.

.. _Templates:

Templates
---------

The following section describes the templates which can be build by ``mxmake``.


.. _run-tests:

run-tests
Expand All @@ -131,7 +46,7 @@ utilizes ``zope-testrunner``, thus expects it to be installed.

The generation target is ``scripts/run-tests.sh``.

Invocation of the test run is done via :ref:`test` make target.
Invocation of the test run is done via `test` make target.

Configuration looks like so:

Expand All @@ -155,7 +70,6 @@ Configuration looks like so:
# relative path to package checkout directory to search for tests
mxmake-test-path = src
.. _run-coverage:

run-coverage
Expand All @@ -167,7 +81,7 @@ packages to be installed.

The generation target is ``scripts/run-coverage.sh``.

Invocation of the coverage run is done via :ref:`coverage` make target.
Invocation of the coverage run is done via `coverage` make target.

Configuration looks like so:

Expand Down
2 changes: 1 addition & 1 deletion mx.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This project file is for mxmake development itself.
###############################################################################
[settings]
main-package = -e .[test]
main-package = -e .[test,docs]

mxmake-templates =
run-tests
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ dependencies = [
dynamic = ["readme"]

[project.optional-dependencies]
docs = ["Sphinx", "sphinxcontrib-mermaid"]
docs = [
"myst-parser",
"sphinx-conestack-theme==1.0.1",
"Sphinx",
"sphinxcontrib-mermaid",
]
test = ["zope.testrunner"]

[project.urls]
Expand Down

0 comments on commit 7775d77

Please sign in to comment.