forked from hpc/charliecloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
28 lines (25 loc) · 1.18 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SUBDIRS = lib bin doc examples misc packaging test
# The CI stuff isn't really relevant for the tarballs, but they should
# have complete source code.
EXTRA_DIST = .github/PERUSEME .github/workflows/main.yml
EXTRA_DIST += LICENSE README.rst VERSION autogen.sh
# Embedded paths are in the source code suitable for running from the source
# directory (i.e., without install). When installing, those paths are often
# wrong, so re-write them with the correct paths we got from configure. Note:
# Some variables are in both Python and sh, so we use syntax valid for both;
# others are just sh.
install-exec-hook:
@echo '### re-writing embedded paths ###'
for i in $(DESTDIR)@bindir@/ch-convert \
$(DESTDIR)@bindir@/ch-fromhost \
$(DESTDIR)@bindir@/ch-image \
$(DESTDIR)@bindir@/ch-run-oci \
$(DESTDIR)@bindir@/ch-test \
$(DESTDIR)@libdir@/charliecloud/base.sh \
$(DESTDIR)@libexecdir@/charliecloud/doctest; \
do \
sed -Ei -e 's|^(ch_lib ?= ?).+/lib"?$$|\1"@libdir@/charliecloud"|' \
-e 's|^(CHTEST_DIR=).+$$|\1@libexecdir@/charliecloud|' \
-e 's|^(CHTEST_EXAMPLES_DIR=).+$$|\1@docdir@/examples|' \
$$i; \
done