Skip to content

Commit e57122e

Browse files
committed
Add the option to build and install with different versions of FsAutoComplete
1 parent b0fa4f2 commit e57122e

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,35 @@ ac_version = 0.34.0
2929
ac_archive = $(ac_name)-$(ac_version).zip
3030
ac_url = https://github.com/fsharp/FsAutoComplete/releases/download/$(ac_version)/$(ac_name).zip
3131

32+
# Autocomplete commit or branch to build from if not using the binary distribution.
33+
ac_commit = master
34+
ac_src_url = https://github.com/fsharp/FsAutoComplete/archive/$(ac_commit).zip
35+
ac_src_archive = $(ac_name)-$(ac_commit).zip
36+
ac_from_src = no
37+
38+
ac_build_dir = $(tmp_d)/FsAutoComplete-$(ac_commit)
39+
3240
# Installation paths.
3341
dest_root = $(HOME)/.emacs.d/fsharp-mode/
3442
dest_bin = $(HOME)/.emacs.d/fsharp-mode/bin/
3543

3644
# ----------------------------------------------------------------------------
3745

3846
.PHONY : test unit-test integration-test packages clean-elc install byte-compile check-compile run update-version release faceup
47+
.ONESHELL : $(ac_archive)
3948

4049
# Building
4150

4251
$(ac_archive): | $(bin_d)
52+
ifeq ($(ac_from_src), no)
4353
curl -L "$(ac_url)" -o "$(ac_archive)"
54+
else
55+
curl -L "$(ac_src_url)" -o "$(ac_src_archive)"
56+
unzip "$(ac_src_archive)" -d "$(tmp_d)"
57+
$(ac_build_dir)/build.sh releasearchive
58+
mv $(ac_build_dir)/bin/pkgs/$(ac_name).zip $(ac_archive)
59+
endif
60+
4461

4562
$(ac_exe) : $(bin_d) $(ac_archive)
4663
unzip "$(ac_archive)" -d "$(bin_d)"

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ There are some issues with the `pos-tip` library used to display the documentati
280280

281281
If you installed by cloning the git repository and you are having problems, please sanity check by running `make test-all` in the `emacs` folder.
282282

283+
### Using a different version of FsAutoComplete
284+
285+
Installing with `make install ac_from_src=yes` will build FsAutoComplete from their lastest master commit instead of using their current binary distribution. Build from a specific commit by passing `ac_commit=$COMMIT_HASH`.
286+
283287
## Contributing
284288

285289
This project is maintained by the

0 commit comments

Comments
 (0)