2014-06-05 13:42:52 +00:00
|
|
|
|
|
|
|
DESTDIR=
|
|
|
|
prefix=install
|
|
|
|
exec_prefix=${prefix}
|
|
|
|
datarootdir=${prefix}/share
|
|
|
|
datadir=${DESTDIR}${datarootdir}
|
|
|
|
bindir=${DESTDIR}${exec_prefix}/bin
|
|
|
|
libdir=${DESTDIR}${exec_prefix}/lib
|
|
|
|
includedir=${DESTDIR}${prefix}/include
|
|
|
|
projectsubdir=lib/gnat
|
|
|
|
projectdir=${DESTDIR}${prefix}/${projectsubdir}
|
|
|
|
|
|
|
|
MKDIR=mkdir -p
|
|
|
|
CP=cp -p
|
2015-06-12 19:06:41 +00:00
|
|
|
GPRBUILD=gprbuild
|
2014-06-05 13:42:52 +00:00
|
|
|
|
2014-05-28 16:27:43 +00:00
|
|
|
all: build
|
|
|
|
|
2014-06-05 13:42:52 +00:00
|
|
|
build: force
|
2015-06-12 19:06:41 +00:00
|
|
|
${GPRBUILD} -Pgnatbdd_main.gpr -j0 -p
|
2014-05-28 16:27:43 +00:00
|
|
|
|
2014-06-05 13:42:52 +00:00
|
|
|
clean: force
|
|
|
|
gprclean -Pgnatbdd_main -r
|
|
|
|
|
|
|
|
install: force
|
|
|
|
gprinstall --prefix=${prefix} -q -p -f --install-name=gnatbdd --project-subdir=${projectsubdir} src/gnatbdd.gpr
|
|
|
|
${MKDIR} ${bindir}
|
|
|
|
${CP} obj/gnatbdd ${bindir}/
|
2014-05-28 16:27:43 +00:00
|
|
|
|
|
|
|
# Adding new scenarios does not erquire recompiling the driver
|
2014-06-05 13:42:52 +00:00
|
|
|
test: build install build_driver
|
|
|
|
-./example/obj/driver --output=full --features=example/features
|
|
|
|
-./example/obj/driver --output=full -o test.html --features=example/features
|
2014-05-28 16:27:43 +00:00
|
|
|
|
|
|
|
# Driver only needs to be recompiled when the step definitions change
|
2014-06-05 13:42:52 +00:00
|
|
|
build_driver:
|
2017-07-05 09:02:02 +00:00
|
|
|
# Build example/obj/driver.adb
|
2014-06-05 13:42:52 +00:00
|
|
|
${bindir}/gnatbdd -Pexample/calc.gpr
|
2017-07-05 09:02:02 +00:00
|
|
|
# Compile this driver
|
2015-06-12 19:06:41 +00:00
|
|
|
GPR_PROJECT_PATH=${projectdir} ${GPRBUILD} -P example/obj/driver.gpr
|
2014-06-05 13:42:52 +00:00
|
|
|
|
|
|
|
force:
|