Skip to content

Commit

Permalink
Merge pull request #657 from milancurcic/remove-manual-make
Browse files Browse the repository at this point in the history
Remove support for manual make builds
  • Loading branch information
milancurcic authored May 19, 2022
2 parents 5ad2837 + 0a43a54 commit 8e0d8dd
Show file tree
Hide file tree
Showing 23 changed files with 3 additions and 594 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
- os: ubuntu-latest
gcc_v: 10
build: cmake-inline
- os: ubuntu-latest
gcc_v: 10
build: make
env:
FC: gfortran-${{ matrix.gcc_v }}
CC: gcc-${{ matrix.gcc_v }}
Expand Down Expand Up @@ -95,15 +92,6 @@ jobs:
if: ${{ contains(matrix.build, 'cmake') }}
run: cmake --install ${{ env.BUILD_DIR }}

- name: Test manual makefiles
if: ${{ matrix.build == 'make' }}
run: |
make -f Makefile.manual -j
make -f Makefile.manual test
make -f Makefile.manual clean
env:
ADD_FYPPFLAGS: "-DMAXRANK=4"

intel-build:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
33 changes: 0 additions & 33 deletions Makefile.manual

This file was deleted.

36 changes: 0 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
- [Requirements](#requirements)
- [Supported compilers](#supported-compilers)
- [Build with CMake](#build-with-cmake)
- [Build with make](#build-with-make)
- [Build with fortran-lang/fpm](#build-with-fortran-langfpm)
* [Using stdlib in your project](#using-stdlib-in-your-project)
* [Documentation](#documentation)
Expand Down Expand Up @@ -168,32 +167,6 @@ If at some point you wish to recompile `stdlib` with different options, you migh
want to delete the `build` folder. This will ensure that cached variables from
earlier builds do not affect the new build.


### Build with make

Alternatively, you can build using provided Makefiles:

```sh
make -f Makefile.manual
```

You can limit the maximum rank by setting ``-DMAXRANK=<num>`` in the ``ADD_FYPPFLAGS`` environment variable (which can reduce the compilation time):

```sh
make -f Makefile.manual ADD_FYPPFLAGS=-DMAXRANK=4
```

You can also specify the compiler and compiler-flags by setting the ``FC`` and ``FFLAGS`` environmental variables. Among other things, this facilitates use of compiler optimizations that are not specified in the Makefile.manual defaults.
```sh
make -f Makefile.manual ADD_FYPPFLAGS=-DMAXRANK=4 FC=gfortran FFLAGS="-O3"
```

On some systems, ``make`` selects the wrong default compiler. If you encounter error messages like ``make[1]: f77: No such file or directory`` set ``FC`` to your preferred compiler (e.g., ``gfortran``) or try

```sh
make -f Makefile.manual --no-builtin-variables
```

### Build with [fortran-lang/fpm](https://github.com/fortran-lang/fpm)

Fortran Package Manager (fpm) is a package manager and build system for Fortran.
Expand Down Expand Up @@ -230,15 +203,6 @@ target_link_libraries(
To make the installed stdlib project discoverable add the stdlib directory to the ``CMAKE_PREFIX_PATH``.
The usual install location of the package files is ``$PREFIX/lib/cmake/fortran_stdlib``.

For non-CMake build systems (like make) you can use the exported pkg-config file by setting ``PKG_CONFIG_PATH`` to include the directory containing the exported pc-file.
The usual install location of the pc-file is ``$PREFIX/lib/pkgconfig``.
In make you can obtain the required compile and link arguments with

```make
STDLIB_CFLAGS := $(shell pkg-config --cflags fortran_stdlib)
STDLIB_LIBS := $(shell pkg-config --libs fortran_stdlib)
```

## Documentation

Documentation is a work in progress (see issue [#4](https://github.com/fortran-lang/stdlib/issues/4)) but already available at [stdlib.fortran-lang.org](https://stdlib.fortran-lang.org).
Expand Down
27 changes: 3 additions & 24 deletions WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,10 @@ You are welcome to propose changes to this workflow by opening an
[issue](https://github.com/fortran-lang/stdlib/issues).


## Build system

This project supports two build systems right now, CMake and make.
Eventually, stdlib will be using the Fortran package manager
([fpm](https://github.com/fortran-lang/fpm)) as build system as well.
The effort of supporting fpm is tracked in issue
[#279](https://github.com/fortran-lang/stdlib/issues/279).
## Build systems

This project supports two build systems,
[fpm](https://github.com/fortran-lang/fpm) and CMake.

### CMake build files

Expand Down Expand Up @@ -113,20 +109,3 @@ The project is usable as CMake subproject. Explicit references to
break subproject builds.
An example project is available [here](https://github.com/fortran-lang/stdlib-cmake-example)
to test the CMake subproject integration.


### Make build files

The build files for ``make`` are using the name ``Makefile.manual`` to
not conflict with the in-tree build of CMake.
This project uses recursive make to transverse the subdirectory structure
from the top-level makefile, called ``Makefile.manual``, and the build
happens in-tree, *i.e.* build artifacts are present along with the source code.

New source files are added in ``src/Makefile.manual`` and include manual
dependency definitions through the object files to allow parallel
compilation.
Tests are generated by the make include file ``src/tests/Makefile.manual.test.mk``
and defined in the subdirectories of the ``src/tests`` as entries in ``PROGS_SRC``.
New subdirectories have to be explicitly added to ``src/tests/Makefile.manual``
or are ignored.
Loading

0 comments on commit 8e0d8dd

Please sign in to comment.