Skip to content

Commit

Permalink
allow non-opam installations
Browse files Browse the repository at this point in the history
Makefile: provide rules for flags/libs.tmp and flags/cflags.tmp, clean: rm them
.gitignore: ignore remporary generated flags files
  • Loading branch information
hannesm committed May 13, 2019
1 parent 9c26829 commit 3a47e74
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ Makeconf
build/
config/
ocaml-freestanding.pc
flags/cflags
flags/cflags.tmp
flags/libs
flags/libs.tmp
flags/libs.tmp2
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ ocaml-freestanding.pc: ocaml-freestanding.pc.in Makeconf
-e 's!@@PKG_CONFIG_EXTRA_LIBS@@!$(PKG_CONFIG_EXTRA_LIBS)!' \
ocaml-freestanding.pc.in > $@

flags/libs.tmp:
opam config subst $@

flags/libs: flags/libs.tmp Makeconf
sed -e 's!@@PKG_CONFIG_EXTRA_LIBS@@!$(PKG_CONFIG_EXTRA_LIBS)!' \
flags/libs.tmp > flags/libs.tmp2
Expand All @@ -109,6 +112,9 @@ flags/libs: flags/libs.tmp Makeconf
done
echo "("`cat flags/libs.tmp2`")" > flags/libs

flags/cflags.tmp:
opam config subst $@

flags/cflags: flags/cflags.tmp Makeconf
for PKG in $(PKG_CONFIG_DEPS); do \
echo " " >> flags/cflags.tmp;\
Expand All @@ -126,3 +132,5 @@ uninstall:

clean:
rm -rf build config Makeconf ocaml-freestanding.pc
rm -rf flags/libs flags/libs.tmp flags/libs.tmp2
rm -rf flags/cflags flags/cflags.tmp

0 comments on commit 3a47e74

Please sign in to comment.