Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
071f3e06
Commit
071f3e06
authored
2 years ago
by
Loïc Correnson
Committed by
Allan Blanchard
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[makefile] use PREFIX and OPAM_SWITCH_PREFIX
parent
3a167d94
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/Makefile
+3
-4
3 additions, 4 deletions
doc/Makefile
share/Makefile.common
+8
-8
8 additions, 8 deletions
share/Makefile.common
share/Makefile.installation
+19
-20
19 additions, 20 deletions
share/Makefile.installation
with
30 additions
and
32 deletions
doc/Makefile
+
3
−
4
View file @
071f3e06
...
...
@@ -28,7 +28,7 @@ MAKECONFIG_DIR=$(FRAMAC_SRC)/share
include
$(FRAMAC_SRC)/share/Makefile.common
FRAMAC_DOCDIR
?=
$(
DOCDIR
)
/frama-c
FRAMAC_DOCDIR
?=
$(
PREFIX
)
/share/doc
/frama-c
.PHONY
:
.force
...
...
@@ -217,6 +217,5 @@ endif
help
::
@
echo
"Documentation installation configuration variable"
@
echo
" - PREFIX: documentation will be in PREFIX/share/doc/frama-c"
@
echo
" - DOCDIR: (overrides previous variable) documentation will be in DOCDIR/frama-c"
@
echo
" - FRAMAC_DOCDIR: (overrides previous variable) documentation will be in FRAMAC_DOCDIR"
@
echo
" - PREFIX: by default, documentation will be generated in PREFIX/share/doc/frama-c"
@
echo
" - FRAMAC_DOCDIR: if set, documentation will be in FRAMAC_DOCDIR"
This diff is collapsed.
Click to expand it.
share/Makefile.common
+
8
−
8
View file @
071f3e06
...
...
@@ -50,16 +50,16 @@ DUNE_BUILD_OPTS+=--display $(DUNE_DISPLAY)
PLATFORM
:=
$(
shell
uname
-s
)
#############
#
Locations
#
#
Install
#
#############
# Note that Dune rules do NOT use these variables.
# They are used by other Makefiles
# - Ivette (
PREFIX)
# - Manuals (DOCDIR)
PREFIX
?=
/usr/local
DOCDIR
?=
$(
PREFIX
)
/share/doc
ifndef
PREFIX
ifdef
OPAM_SWITCH_PREFIX
PREFIX
=
$(
OPAM_SWITCH_
PREFIX
)
else
PREFIX
=
/usr/local
endif
endif
#############
# Verbosing #
...
...
This diff is collapsed.
Click to expand it.
share/Makefile.installation
+
19
−
20
View file @
071f3e06
...
...
@@ -28,18 +28,13 @@
## Help
help
::
@
echo
"Installation configuration variables"
@
echo
" - PREFIX:
used to customize installation path
"
@
echo
" - MANDIR:
used to customize man files
installation
path
"
@
echo
"Installation configuration variables
:
"
@
echo
" - PREFIX:
target installation prefix (default is OPAM switch or /usr/local)
"
@
echo
" - MANDIR:
custom
installation
for man pages
"
################################
##
Default variables
##
Man Path
# Set this variable to request a specific installation directory
# Default: Dune installs in the Opam directory
PREFIX
?=
# Set this variable to request a specific man installation directory
# Default: the manuals are installed in the installation directory transmitted
# to Dune (so either in Opam or in PREFIX)
MANDIR
?=
...
...
@@ -55,20 +50,24 @@ endif
.PHONY
:
install uninstall
install
:
ifeq
($(PREFIX),)
dune
install
${
MANDIR_OPT
}
install
::
ifndef
PREFIX
@
echo
"Warning: cannot install Frama-C: no PREFIX defined, nor OPAM."
@
exit
1
else
ifeq
($(PREFIX),$(OPAM_SWITCH_PREFIX))
@
echo
"Installing Frama-C to current Opam switch"
dune
install
${
MANDIR_OPT
}
2> /dev/null
else
@
echo
"Installing
to prefix:
${
PREFIX
}
"
dune
install
--prefix
${
PREFIX
}
${
MANDIR_OPT
}
@
echo
"Installing
Frama-C to
${
PREFIX
}
"
dune
install
--prefix
${
PREFIX
}
${
MANDIR_OPT
}
2> /dev/null
@
echo
'DO NOT FORGET TO EXPAND YOUR OCAMLPATH VARIABLE:'
@
echo
' export OCAMLPATH="
${
PREFIX
}
/lib:$$OCAMLPATH"'
endif
endif
uninstall
:
ifeq
($(PREFIX),)
dune uninstall
${
MANDIR_OPT
}
else
@
echo
"Uninstalling from prefix:
${
PREFIX
}
"
dune uninstall
--prefix
${
PREFIX
}
${
MANDIR_OPT
}
ifdef
PREFIX
uninstall
::
@
echo
"Uninstalling Frama-C"
dune uninstall
--prefix
${
PREFIX
}
${
MANDIR_OPT
}
2> /dev/null
endif
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