summaryrefslogtreecommitdiff
path: root/src/lib/Makefile
blob: d7b404970b6f32f3a658c9356ea3c957a8177da3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
copy_files = common.sh.in
libexecs = $(filter-out librelib,$(wildcard libre*))
# include common.sh in libs explicitly, because it might not exist yet
# when the wildcard is performed
libs = $(sort $(wildcard *.sh) common.sh)
include ../../common.mk

# Build ##############################################################

common.sh: %: %.in %.top Makefile
	@echo "GEN $@"
	@{ \
	cat "$*.top" && \
	echo 'if [[ -z $${_INCLUDE_COMMON_SH:-} ]]; then' && \
	echo '_INCLUDE_COMMON_SH=true' && \
	cat "$*.in" && \
	echo 'fi'; } > "$@"