Commit d82b3ac3 authored by Maxime Perrotin's avatar Maxime Perrotin

Improve installation scripts

parent 73595ac3
ITERATORS_PREFIX?=$(HOME)/.local
PREFIX?=$(HOME)/.local
all:
@echo You can install with "make install"
@echo A testcase can be build from source with "make test"
install:
gprinstall --uninstall asn1_iterators || :
install: uninstall
mkdir -p obj && sed 's,$$PREFIX,$(PREFIX),g' src/taste-asn1-iterators > obj/taste-asn1-iterators && chmod +x obj/taste-asn1-iterators
gprbuild -p asn1_iterators.gpr
gprinstall -p -XLIBRARY_TYPE=dynamic --build-name=shared asn1_iterators.gpr
install -m 755 src/taste-asn1-iterators $(ITERATORS_PREFIX)/bin
gprinstall -p -XLIBRARY_TYPE=dynamic --build-name=shared --prefix=$(PREFIX) asn1_iterators.gpr
test_build: clean install
mkdir -p build_test
......@@ -19,6 +18,9 @@ test_build: clean install
test: test_build
build_test/test_generic
uninstall:
gprinstall --uninstall --prefix=$(PREFIX) asn1_iterators || :
clean:
gprclean test_generic.gpr || :
gprclean asn1_iterators.gpr || :
......
......@@ -4,5 +4,6 @@ project asn1_iterators is
for Languages use ("Ada");
package Install is
for Artifacts ("share/asn1_iterators/stg") use ("stg/*");
for Artifacts ("bin/") use ("obj/taste-asn1-iterators");
end Install;
end asn1_iterators;
#!/bin/bash -e
echo 'taste-asn1-iterators (c) 2017 European Space Agency'
echo 'taste-asn1-iterators (c) 2018 European Space Agency (maxime.perrotin@esa.int)'
STG_PREFIX=/usr/local/share/taste
STG_PREFIX=$PREFIX/share/asn1_iterators/stg
OUT=iterators
if [ ! -f "$1" ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment