Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simcha van Collem
Iris
Commits
6f58f693
Commit
6f58f693
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
try to fix opam
parent
7418e9c7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+12
-7
12 additions, 7 deletions
Makefile
build/opam-ci.sh
+7
-4
7 additions, 4 deletions
build/opam-ci.sh
with
19 additions
and
11 deletions
Makefile
+
12
−
7
View file @
6f58f693
...
...
@@ -4,11 +4,13 @@
all
:
Makefile.coq
+@make
-f
Makefile.coq all
.PHONY
:
all
clean
:
Makefile.coq
+@make
-f
Makefile.coq clean
find theories
\(
-name
"*.v.d"
-o
-name
"*.vo"
-o
-name
"*.aux"
-o
-name
"*.cache"
-o
-name
"*.glob"
-o
-name
"*.vio"
\)
-print
-delete
rm
-f
Makefile.coq
.PHONY
:
clean
# Create Coq Makefile. POSIX awk can't do in-place editing, but coq_makefile wants the real
# filename, so we do some file gymnastics.
...
...
@@ -17,16 +19,19 @@ Makefile.coq: _CoqProject Makefile awk.Makefile
mv
Makefile.coq Makefile.coq.tmp
&&
awk
-f
awk.Makefile Makefile.coq.tmp
>
Makefile.coq
&&
rm
Makefile.coq.tmp
# Install build-dependencies
build-dep
:
phony
build-dep/opam
:
# Create the build-dep package.
@
mkdir
-p
build-dep
@
sed
<opam
's/^\(build\|install\|remove\):.*/\1: []/; s/^name: *"\(.*\)" */name: "\1-builddep"/'
>
build-dep/opam
@
fgrep builddep build-dep/opam
>
/dev/null
||
(
echo
"sed failed to fix the package name"
&&
exit
1
)
# sanity check
build-dep
:
build-dep/opam phony
@
# We want opam to not just instal the build-deps now, but to also keep satisfying these
@
# constraints. Otherwise, `opam upgrade` may well update some packages to versions
@
# that are incompatible with our build requirements.
@
# To achieve this, we create a fake opam package that has our build-dependencies as
@
# dependencies, but does not actually install anything.
mkdir
-p
build-dep
# Create the build-dep package, add the pin and
(
re
)
install
it.
@
sed
<opam
's/^\(build\|install\|remove\):.*/\1: []/; s/^name: *"\(.*\)" */name: "\1-builddep"/'
>
build-dep/opam
@
fgrep builddep build-dep/opam
>
/dev/null
||
(
echo
"sed failed to fix the package name"
&&
exit
1
)
# sanity check
# Add the pin and
(
re
)
install
build-dep package.
@
# Reinstallation is needed in case the pin already exists, but the builddep package changed.
@
BUILD_DEP_PACKAGE
=
"
$$(
egrep "
^name:
" build-dep/opam | sed 's/^name: *"
\(
.
*
\)
" */
\1
/'
)
"
;
\
opam pin add
"
$$
BUILD_DEP_PACKAGE"
"
$$(
pwd
)
/build-dep"
-k
path
$(
OPAMFLAGS
)
&&
\
...
...
@@ -37,6 +42,6 @@ Makefile: ;
_CoqProject
:
;
awk.Makefile
:
;
# Phony
targets (i.e. targets that should be run no matter the timestamps of the involved files)
# Phony
wildcard targets
phony
:
;
.PHONY
:
all clean
phony
.PHONY
:
phony
This diff is collapsed.
Click to expand it.
build/opam-ci.sh
+
7
−
4
View file @
6f58f693
...
...
@@ -43,15 +43,18 @@ while (( "$#" )); do # while there are arguments left
fi
done
# Install build-dependencies.
echo
echo
"[opam-ci] Installing build-dependencies"
make build-dep
OPAMFLAGS
=
-y
# Make sure the pin for the builddep package is not stale.
make build-dep/opam
# Upgrade cached things.
echo
"[opam-ci] Upgrading opam"
opam upgrade
-y
# Install build-dependencies.
echo
echo
"[opam-ci] Installing build-dependencies"
make build-dep
OPAMFLAGS
=
-y
# done
echo
coqc
-v
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment