Skip to content
Snippets Groups Projects
Commit 06478c58 authored by David Bühler's avatar David Bühler
Browse files

Merge branch 'fix/andre/framac-config-scripts' into 'master'

[analysis-scripts] do not use reserved variable name FRAMAC_CONFIG

See merge request frama-c/frama-c!2677
parents 5fa8525e 9ae39743
No related branches found
No related tags found
No related merge requests found
...@@ -58,14 +58,13 @@ By default, the scripts use the frama-c binaries located in your `$PATH` ...@@ -58,14 +58,13 @@ By default, the scripts use the frama-c binaries located in your `$PATH`
environment variable. You may want to specify different binaries, but, if you environment variable. You may want to specify different binaries, but, if you
want to version your analysis, this path will depend on the computer it is run want to version your analysis, this path will depend on the computer it is run
on. So, we recommend you use an unversioned file `frama-c-path.mk`. Add this on. So, we recommend you use an unversioned file `frama-c-path.mk`. Add this
file to your `.gitignore` and define the `FRAMAC`, `FRAMAC_GUI` and file to your `.gitignore` and define the `FRAMAC` and `FRAMAC_GUI`
`FRAMAC_CONFIG` variables there. For instance: variables there. For instance:
```` ````
FRAMAC_DIR=frama-c/bin FRAMAC_DIR=frama-c/bin
FRAMAC=$(FRAMAC_DIR)/frama-c FRAMAC=$(FRAMAC_DIR)/frama-c
FRAMAC_GUI=$(FRAMAC_DIR)/frama-c-gui FRAMAC_GUI=$(FRAMAC_DIR)/frama-c-gui
FRAMAC_CONFIG=$(FRAMAC_DIR)/frama-c-config
```` ````
And include this file before `frama-c.mk` in your Makefile. As this file And include this file before `frama-c.mk` in your Makefile. As this file
...@@ -78,12 +77,12 @@ files: ...@@ -78,12 +77,12 @@ files:
```` ````
Then, to handle both cases when Frama-C is in the path, and when it is not, Then, to handle both cases when Frama-C is in the path, and when it is not,
use the following conditional definition of `FRAMAC_CONFIG` followed by the use the following conditional definition of `FRAMAC` followed by the
inclusion of `frama-c.mk`: inclusion of `frama-c.mk`:
``` ```
FRAMAC_CONFIG ?= frama-c-config FRAMAC ?= frama-c
include $(shell $(FRAMAC_CONFIG) -print-share-path)/analysis-scripts/frama-c.mk include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/frama-c.mk
``` ```
...@@ -164,8 +163,7 @@ Full example ...@@ -164,8 +163,7 @@ Full example
# optional include, in case frama-c-path.mk does not exist (frama-c in the PATH) # optional include, in case frama-c-path.mk does not exist (frama-c in the PATH)
-include frama-c-path.mk -include frama-c-path.mk
# frama-c-config is used to find the analysis scripts and frama-c.mk # frama-c-config is used to find the analysis scripts and frama-c.mk
FRAMAC_CONFIG ?= frama-c-config include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/frama-c.mk
include $(shell $(FRAMAC_CONFIG) -print-share-path)/analysis-scripts/frama-c.mk
# Global parameters # Global parameters
CPPFLAGS = -D__I586__ CPPFLAGS = -D__I586__
...@@ -192,7 +190,6 @@ example.eva: EVAFLAGS += -slevel 500 ...@@ -192,7 +190,6 @@ example.eva: EVAFLAGS += -slevel 500
FRAMAC_DIR=frama-c/bin FRAMAC_DIR=frama-c/bin
FRAMAC=$(FRAMAC_DIR)/frama-c FRAMAC=$(FRAMAC_DIR)/frama-c
FRAMAC_GUI=$(FRAMAC_DIR)/frama-c-gui FRAMAC_GUI=$(FRAMAC_DIR)/frama-c-gui
FRAMAC_CONFIG=$(FRAMAC_DIR)/frama-c-config
```` ````
### `.gitignore` ### `.gitignore`
......
-include frama-c-path.mk -include frama-c-path.mk
FRAMAC_CONFIG ?= frama-c-config FRAMAC ?= frama-c
-include $(shell $(FRAMAC_CONFIG) -print-share-path)/analysis-scripts/frama-c.mk -include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/frama-c.mk
# Global parameters # Global parameters
CPPFLAGS = -D__I586__ CPPFLAGS = -D__I586__
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
# 3. The all rule invoke the script # 3. The all rule invoke the script
-include frama-c-path.mk -include frama-c-path.mk
FRAMAC_CONFIG ?= frama-c-config FRAMAC ?= frama-c
-include $(shell $(FRAMAC_CONFIG) -print-share-path)/analysis-scripts/frama-c.mk -include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/frama-c.mk
# Global parameters # Global parameters
CPPFLAGS = -D__I586__ CPPFLAGS = -D__I586__
...@@ -21,7 +21,7 @@ export FRAMA_C_MEMORY_FOOTPRINT = 8 ...@@ -21,7 +21,7 @@ export FRAMA_C_MEMORY_FOOTPRINT = 8
# Default targets # Default targets
all: all:
$(shell $(FRAMAC_CONFIG) -print-share-path)/analysis-scripts/slevel-tweaker.sh -f example-slevel.mk example1 example2 $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/slevel-tweaker.sh -f example-slevel.mk example1 example2
# Clean # Clean
clean:: clean::
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
# frama-c binaries (e.g. FRAMAC and FRAMAC_GUI). # frama-c binaries (e.g. FRAMAC and FRAMAC_GUI).
# It is an optional include, unnecessary if frama-c is in the PATH # It is an optional include, unnecessary if frama-c is in the PATH
-include frama-c-path.mk -include frama-c-path.mk
# FRAMAC_CONFIG is defined in frama-c-path.mk when it is included, so the # FRAMAC is defined in frama-c-path.mk when it is included, so the
# line below will be safely ignored if this is the case # line below will be safely ignored if this is the case
FRAMAC_CONFIG ?= frama-c-config FRAMAC ?= frama-c
# frama-c.mk should be included at the top of your Makefile, right below # frama-c.mk should be included at the top of your Makefile, right below
# the inclusion of frama-c-path.mk # the inclusion of frama-c-path.mk
-include $(shell $(FRAMAC_CONFIG) -print-share-path)/analysis-scripts/frama-c.mk -include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/frama-c.mk
# Define global parameters # Define global parameters
CPPFLAGS += -D__I586__ -D__FRAMAC__ CPPFLAGS += -D__I586__ -D__FRAMAC__
......
...@@ -72,8 +72,7 @@ def run_make(framac, benchmark_tag=None): ...@@ -72,8 +72,7 @@ def run_make(framac, benchmark_tag=None):
bindir = framac + '/build/bin' bindir = framac + '/build/bin'
args += [ args += [
'FRAMAC_DIR=' + bindir, 'FRAMAC_DIR=' + bindir,
'FRAMAC=' + bindir + '/frama-c', 'FRAMAC=' + bindir + '/frama-c']
'FRAMAC_CONFIG=' + bindir + '/frama-c-config']
if benchmark_tag is None: if benchmark_tag is None:
args += ['-j', '8'] args += ['-j', '8']
else: else:
......
...@@ -12,12 +12,12 @@ export FRAMA_C_MEMORY_FOOTPRINT = 8 ...@@ -12,12 +12,12 @@ export FRAMA_C_MEMORY_FOOTPRINT = 8
# It is an optional include, unnecessary if frama-c is in the PATH # It is an optional include, unnecessary if frama-c is in the PATH
-include frama-c-path.mk -include frama-c-path.mk
# #
# FRAMAC_CONFIG is defined in frama-c-path.mk when it is included, so the # FRAMAC is defined in frama-c-path.mk when it is included, so the
# line below will be safely ignored if this is the case # line below will be safely ignored if this is the case
FRAMAC_CONFIG ?= frama-c-config FRAMAC ?= frama-c
# #
# frama-c.mk contains the main rules and targets # frama-c.mk contains the main rules and targets
-include $(shell $(FRAMAC_CONFIG) -print-share-path)/analysis-scripts/frama-c.mk -include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/frama-c.mk
# #
############################################################################### ###############################################################################
......
...@@ -12,12 +12,12 @@ export FRAMA_C_MEMORY_FOOTPRINT = 8 ...@@ -12,12 +12,12 @@ export FRAMA_C_MEMORY_FOOTPRINT = 8
# It is an optional include, unnecessary if frama-c is in the PATH # It is an optional include, unnecessary if frama-c is in the PATH
-include frama-c-path.mk -include frama-c-path.mk
# #
# FRAMAC_CONFIG is defined in frama-c-path.mk when it is included, so the # FRAMAC is defined in frama-c-path.mk when it is included, so the
# line below will be safely ignored if this is the case # line below will be safely ignored if this is the case
FRAMAC_CONFIG ?= frama-c-config FRAMAC ?= frama-c
# #
# frama-c.mk contains the main rules and targets # frama-c.mk contains the main rules and targets
-include $(shell $(FRAMAC_CONFIG) -print-share-path)/analysis-scripts/frama-c.mk -include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/frama-c.mk
# #
############################################################################### ###############################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment