From a4fb57123e62ef5969da40092feb10c6cec895f1 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 15 Oct 2019 12:54:09 +0530 Subject: allow 'make install' to prefix --- .gitignore | 2 ++ .gitmodules | 3 +++ Makefile | 17 +++++++++++++++++ bootstrap | 4 ++++ build-system/taler-build-scripts | 1 + configure.py | 6 ++++++ demo/static/web-common | 2 +- 7 files changed, 34 insertions(+), 1 deletion(-) create mode 160000 build-system/taler-build-scripts create mode 100644 configure.py diff --git a/.gitignore b/.gitignore index 796b96d..837c9f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /build +/configure +/config.mk diff --git a/.gitmodules b/.gitmodules index b20bc28..a26e012 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,3 +3,6 @@ url = git://git.taler.net/web-common branch = master ignore = dirty +[submodule "build-system/taler-build-scripts"] + path = build-system/taler-build-scripts + url = git://git.taler.net/taler-build-scripts.git diff --git a/Makefile b/Makefile index 0385a66..6e4cf5c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,24 @@ SHELL = /bin/sh +-include config.mk + +.PHONY: all all: ./demo/template.py build +.PHONY: clean clean: rm -rf build + +.PHONY: install +ifndef prefix +.PHONY: warn-noprefix +warn-noprefix: + @echo "no prefix configured, did you run ./configure?" + @false +install: warn-noprefix +else +install: all + mkdir -p $(prefix)/share/taler-landing + cp -r build/* $(prefix)/share/taler-landing/ +endif diff --git a/bootstrap b/bootstrap index d14ee3b..747df53 100755 --- a/bootstrap +++ b/bootstrap @@ -1,5 +1,8 @@ #!/bin/sh +# Bootstrap the repository. Used when the repository is checked out from git. +# When using the source tarball, running this script is not necessary. + set -eu if ! git --version >/dev/null; then @@ -8,3 +11,4 @@ if ! git --version >/dev/null; then fi git submodule update --init +ln -sf build-system/taler-build-scripts/configure ./configure diff --git a/build-system/taler-build-scripts b/build-system/taler-build-scripts new file mode 160000 index 0000000..4272384 --- /dev/null +++ b/build-system/taler-build-scripts @@ -0,0 +1 @@ +Subproject commit 4272384edde63ba46c5713490f5e92146187fc77 diff --git a/configure.py b/configure.py new file mode 100644 index 0000000..40000b3 --- /dev/null +++ b/configure.py @@ -0,0 +1,6 @@ +from talerbuildconfig import * + +b = BuildConfig() +b.enable_prefix() +b.enable_configmk() +b.run() diff --git a/demo/static/web-common b/demo/static/web-common index ba4a54c..0968eb3 160000 --- a/demo/static/web-common +++ b/demo/static/web-common @@ -1 +1 @@ -Subproject commit ba4a54c65786f35922616175b644f9db7897c87e +Subproject commit 0968eb3d4023a8a0a37f7069f162eb786a6e04d2 -- cgit v1.2.3