Skip to content

Commit 5564a4e

Browse files
authored
Merge pull request #54 from well-typed/jdral/no-ac-config-headers
Don't use `AC_CONFIG_HEADERS`
2 parents 1054474 + c3f55e5 commit 5564a4e

7 files changed

Lines changed: 193 additions & 4879 deletions

File tree

.github/workflows/haskell.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,22 @@ jobs:
170170
echo "--- Home directory size ---"
171171
du -sh $HOME
172172
173+
- name: Install dependencies (Ubuntu)
174+
if: runner.os == 'Linux'
175+
run: |
176+
sudo apt-get -y update
177+
sudo apt-get -y install build-essential
178+
179+
- if: runner.os == 'macOS'
180+
name: Install dependencies (MacOS)
181+
run: |
182+
brew install coreutils autoconf automake
183+
184+
- name: 🛠️ Configure (autoreconf)
185+
run: |
186+
autoreconf --version
187+
autoreconf -i
188+
173189
- name: 🛠️ Configure
174190
run: |
175191
cabal configure \

.github/workflows/windows.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ jobs:
242242
echo '== $PATH ======================================================================='
243243
echo "${PATH}" | tr ':' '\n'
244244
245+
- name: "[setup] Configure autoconf"
246+
shell: "C:/msys64/usr/bin/bash.exe -e {0}"
247+
run: |
248+
/usr/bin/pacman --noconfirm -Sy base-devel automake-wrapper autoconf-wrapper
249+
PATH=$PATH:/usr/bin /usr/bin/autoreconf --version
250+
PATH=$PATH:/usr/bin /usr/bin/autoreconf -i
251+
245252
- name: "[setup] Configure project"
246253
run: |
247254
cabal configure \

.gitignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,63 @@ cabal.project.local~
2323
.HTF/
2424
.ghc.environment.*
2525

26+
# https://github.com/github/gitignore/blob/main/Autotools.gitignore
27+
28+
# http://www.gnu.org/software/automake
29+
30+
Makefile.in
31+
/ar-lib
32+
/mdate-sh
33+
/py-compile
34+
/test-driver
35+
/ylwrap
36+
.deps/
37+
.dirstamp
38+
39+
# http://www.gnu.org/software/autoconf
40+
41+
autom4te.cache
42+
/autoscan.log
43+
/autoscan-*.log
44+
/aclocal.m4
45+
/compile
46+
/config.cache
47+
/config.guess
48+
/config.h.in
49+
/config.log
50+
/config.status
51+
/config.sub
52+
/configure
53+
/configure.scan
54+
/depcomp
55+
/install-sh
56+
/missing
57+
/stamp-h1
58+
59+
# https://www.gnu.org/software/libtool/
60+
61+
/libtool
62+
/ltmain.sh
63+
.libs/
64+
65+
# http://www.gnu.org/software/texinfo
66+
67+
/texinfo.tex
68+
69+
# http://www.gnu.org/software/m4/
70+
71+
m4/libtool.m4
72+
m4/ltoptions.m4
73+
m4/ltsugar.m4
74+
m4/ltversion.m4
75+
m4/lt~obsolete.m4
76+
77+
# Generated Makefile
78+
# (meta build system like autotools,
79+
# can automatically generate from config.status script
80+
# (which is called by configure script))
81+
Makefile
82+
2683
# Custom
2784
/.direnv/
2885

CONTRIBUTING.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Contributing
2+
3+
## Installation requirements
4+
5+
The following should be installed:
6+
7+
* The `libclang` C library from the [The LLVM
8+
project](https://github.com/llvm/llvm-project)
9+
10+
* `autoreconf` and its dependencies
11+
* Ubuntu:
12+
```
13+
apt-get install build-essential
14+
```
15+
* MacOS:
16+
```
17+
brew install coreutils autoconf automake
18+
```
19+
* Windows (MSYS2):
20+
```
21+
pacman --noconfirm -Sy base-devel automake-wrapper autoconf-wrapper
22+
```
23+
24+
## Building
25+
26+
The project is built using `autoreconf`, `ghc` and `cabal`.
27+
28+
```
29+
autoreconf -i
30+
cabal update
31+
cabal run clang-bootstrap
32+
cabal build all
33+
```
34+
35+
`autoreconf` should be invoked manually to generate a configuration script for
36+
the Haskell library. The configuration script is run automatically when `cabal
37+
build` is invoked.
38+
39+
`clang-bootstrap` should be invoked manuall to generate C wrapper functions and
40+
Haskel foreign import declarations for the `libclang` C library. This code is
41+
automatically built when `cabal build` is invoked.
42+
43+
## Testing
44+
45+
Tests are run using `cabal`.
46+
47+
```
48+
cabal build all
49+
cabal test all
50+
```
51+
52+
## Code style
53+
54+
There is no strict code style, but try to keep the code style consistent
55+
throughout the repository and favour readability. Code should be well-documented
56+
and well-tested.
57+
58+
## Formatting
59+
60+
We use `stylish-haskell` to format Haskell files, and we use `cabal-fmt` to
61+
format `*.cabal` files. See the helpful scripts in the [scripts
62+
folder](./scripts/), and the [`stylish-haskell` configuration
63+
file](./.stylish-haskell.yaml).
64+
65+
To perform a pre-commit code formatting pass, run one of the following:
66+
67+
```
68+
./scripts/ci/format-cabal-fmt.sh
69+
./scripts/ci/format-stylish-haskell.sh
70+
```
71+
72+
## Pull requests
73+
74+
The following are requirements for merging a PR into `main`:
75+
* Each commit should be small and should preferably address one thing. Commit
76+
messages should be useful.
77+
* Document and test your changes.
78+
* The PR should have a useful description, and it should link issues that it
79+
resolves (if any).
80+
* Changes introduced by the PR should be recorded in the relevant changelog
81+
files. Ideally, each changelog entry should link to the PR that introduced the
82+
changes, and it should be placed in the relevant category (e.g., breaking
83+
changes, new features).
84+
* PRs should not bundle many unrelated changes.
85+
* The PR should pass all CI checks.
86+
87+
## Releases
88+
89+
Releases follow the [Haskell Package Versioning
90+
Policy](https://pvp.haskell.org/). We use version numbers consisting of 3 parts,
91+
like `A.B.C`.
92+
* `A.B` is the *major* version number. A bump indicates a breaking change.
93+
* `C` is the *minor* version number. A bump indicates a non-breaking change.
94+
95+
To publish a release for a package, follow the steps below:
96+
97+
* Changelog checks (`CHANGELOG.md`):
98+
* Check that all user-facing changes have been recorded.
99+
* Check that each changelog entry is in the correct category.
100+
* Check that each changelog entry links to a PR, if applicable.
101+
* Add or update the changelog's section header with the package version that
102+
is going to be released, and the date of the release. The version should be
103+
picked based on our package versioning policy.
104+
105+
* Cabal file checks (`*.cabal`):
106+
* Update the `version` field.
107+
* Update the `tag` field of the `source-repository this` stanza.
108+
109+
* Cabal project file checks (`cabal.project*`):
110+
* Update the `index-state` in the `cabal.project` file to the current
111+
date-time, or the closest valid date-time to the current date-time, so that
112+
CI builds and tests the libraries with the newest versions of dependencies.

autogen/clang_config.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* autogen/clang_config.h.in. Generated from configure.ac by autoheader. */
21

32
/* Define if clang_isBeforeInTranslationUnit is available (clang >= 20.1) */
43
#undef HAVE_CLANG_ISBEFOREINTRANSLATIONUNIT

0 commit comments

Comments
 (0)