Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
d4d6db27
Commit
d4d6db27
authored
Nov 16, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mk: refactor for EXTRA plist/install targets
Guess what's coming soon... :)
parent
472a9143
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
tree.mk
Mk/tree.mk
+23
-11
No files found.
Mk/tree.mk
View file @
d4d6db27
all:
install:
.for TREE in ${TREES}
@mkdir -p ${DESTDIR}${ROOT}
@cp -vr ${TREE} ${DESTDIR}${ROOT}
TREES_=${TREES}
ROOT_=${ROOT}
.for TARGET in _ ${EXTRA:C/.*/_&/g}
install${TARGET}: force
.for TREE in ${TREES${TARGET}}
@mkdir -p ${DESTDIR}${ROOT${TARGET}}
REALTARGET=/$$(dirname ${TREE}); \
cp -vr ${TREE} ${DESTDIR}${ROOT${TARGET}}$${REALTARGET}
@(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}; \
${DESTDIR}${ROOT
${TARGET}
}/${TREE}/$${FILE}; \
mv -v ${DESTDIR}${ROOT
${TARGET}
}/${TREE}/$${FILE} \
${DESTDIR}${ROOT
${TARGET}
}/${TREE}/$${FILE%%.in}; \
fi \
done
.endfor
plist
:
.for TREE in ${TREES}
plist
${TARGET}: force
.for TREE in ${TREES
${TARGET}
}
@(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}"; \
echo "$${PREFIX}${ROOT
${TARGET}
}/${TREE}/$${FILE}"; \
done
.endfor
.PHONY: install plist
.endfor
install: install_
plist: plist_
force:
.PHONY: force
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment