Skip to content

Commit eb3f799

Browse files
authored
Merge pull request #259 from awvwgk/readme
Reorder README to focus on the Fortran fpm version
2 parents 105644c + ac2bcb8 commit eb3f799

File tree

1 file changed

+47
-40
lines changed

1 file changed

+47
-40
lines changed

README.md

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,45 +24,7 @@ __Note:__ On Linux and MacOS, you will need to enable executable permission befo
2424

2525
_e.g._ `$ chmod u+x fpm-v0.1.0-linux-x86_64`
2626

27-
### Build from source
28-
29-
#### Install Haskell
30-
31-
To install **Haskell Stack**, follow these
32-
[instructions](https://docs.haskellstack.org/en/stable/install_and_upgrade/),
33-
users without superuser (admin) permissions should follow the
34-
[manual installation](https://docs.haskellstack.org/en/stable/install_and_upgrade/#manual-download_2)
35-
procedure.
36-
37-
#### Download this repository
38-
39-
```bash
40-
$ git clone https://github.com/fortran-lang/fpm
41-
$ cd fpm/
42-
```
43-
44-
#### Build and test fpm
45-
46-
Bootstrap *fpm* using:
47-
48-
```bash
49-
$ cd bootstrap/
50-
$ stack build
51-
```
52-
53-
To test:
54-
55-
```bash
56-
$ stack test
57-
```
58-
59-
To install:
60-
61-
```bash
62-
$ stack install
63-
```
64-
65-
On Linux, the above command installs `fpm` to `${HOME}/.local/bin/`.
27+
For other platforms and architectures have a look at the [bootstrapping instructions](#bootstrapping-instructions).
6628

6729
### Creating a new project
6830

@@ -88,7 +50,52 @@ with the following contents and initialized as a git repository.
8850
The command `fpm run` can optionally accept the name of the specific executable
8951
to run, as can `fpm test`; like `fpm run specific_executable`. Command line
9052
arguments can also be passed to the executable(s) or test(s) with the option
91-
`--args "some arguments"`.
53+
`-- some arguments`.
9254

9355
See additional instructions in the [Packaging guide](PACKAGING.md) or
9456
the [manifest reference](manifest-reference.md).
57+
58+
59+
### Bootstrapping instructions
60+
61+
This guide explains the process of building *fpm* on a platform for the first time.
62+
If your platform and architecture are already supported, download the binary from the [release page](https://github.com/fortran-lang/fpm/releases) instead.
63+
64+
#### Download this repository
65+
66+
```bash
67+
$ git clone https://github.com/fortran-lang/fpm
68+
$ cd fpm/
69+
```
70+
71+
#### Build a bootstrap version of fpm
72+
73+
You can use the install script to perform the build of the Haskell version of *fpm* with:
74+
75+
```bash
76+
$ ./install.sh
77+
```
78+
79+
On Linux, the above command installs `fpm` to `${HOME}/.local/bin/`.
80+
81+
Now you can build the Fortran *fpm* version with
82+
83+
```bash
84+
$ cd fpm/
85+
$ fpm build
86+
```
87+
88+
Test that everything is working as expected
89+
90+
```bash
91+
$ fpm test
92+
```
93+
94+
Finally, install the Fortran *fpm* version with
95+
96+
```bash
97+
$ fpm run --runner cp -- ~/.local/bin
98+
```
99+
100+
Or choose another location if you do not want to overwrite the bootstrapping version.
101+
From now on you can rebuild *fpm* with your Fortran *fpm* version.

0 commit comments

Comments
 (0)