mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
o Makes live-mounting easier as the package config samples won't be clobbered anymore. o Automatically picks up ".in" files, runs replace and moves them to their permanent location. o Refactored src directory install while at it.
31 lines
777 B
Makefile
31 lines
777 B
Makefile
all:
|
|
|
|
install:
|
|
.for TREE in ${TREES}
|
|
@mkdir -p ${DESTDIR}${ROOT}
|
|
@cp -vr ${TREE} ${DESTDIR}${ROOT}
|
|
@(cd ${TREE}; find * -type f) | while read FILE; do \
|
|
if [ $${FILE%%.in} != $${FILE} ]; then \
|
|
sed -i '' \
|
|
-e "s=%%CORE_PACKAGESITE%%=${CORE_PACKAGESITE}=g" \
|
|
-e "s=%%CORE_REPOSITORY%%=${CORE_REPOSITORY}=g" \
|
|
${DESTDIR}${ROOT}/${TREE}/$${FILE}; \
|
|
mv -v ${DESTDIR}${ROOT}/${TREE}/$${FILE} \
|
|
${DESTDIR}${ROOT}/${TREE}/$${FILE%%.in}; \
|
|
fi \
|
|
done
|
|
.endfor
|
|
|
|
plist:
|
|
.for TREE in ${TREES}
|
|
@(cd ${TREE}; find * -type f) | while read FILE; do \
|
|
FILE="$${FILE%%.in}"; PREFIX=""; \
|
|
if [ $${FILE%%.sample} != $${FILE} ]; then \
|
|
PREFIX="@sample "; \
|
|
fi; \
|
|
echo "${PREFIX} ${ROOT}/${TREE}/$${FILE}"; \
|
|
done
|
|
.endfor
|
|
|
|
.PHONY: install plist
|