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
dc2bd361
Commit
dc2bd361
authored
Sep 24, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mk: split out some common stuff, add headers
parent
12a5ac98
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
17 deletions
+67
-17
Makefile
Makefile
+5
-12
defaults.mk
Mk/defaults.mk
+36
-0
tree.mk
Mk/tree.mk
+26
-5
No files found.
Makefile
View file @
dc2bd361
...
@@ -23,15 +23,11 @@
...
@@ -23,15 +23,11 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# SUCH DAMAGE.
PKG
!=
which pkg
||
echo true
.include
"Mk/defaults.mk"
GIT
!=
which git
||
echo true
PAGER
?=
less
all
:
all
:
@
cat
${
.CURDIR
}
/README.md |
${
PAGER
}
@
cat
${
.CURDIR
}
/README.md |
${
PAGER
}
force
:
WANTS
=
git pear-PHP_CodeSniffer phpunit
WANTS
=
git pear-PHP_CodeSniffer phpunit
.for
WANT
in
${WANTS}
.for
WANT
in
${WANTS}
...
@@ -47,7 +43,7 @@ CORE_HASH= ${CORE_COMMIT:C/^.*-//1}
...
@@ -47,7 +43,7 @@ CORE_HASH= ${CORE_COMMIT:C/^.*-//1}
CORE_ABI
?=
16.7
CORE_ABI
?=
16.7
_FLAVOUR
!=
/usr/local
/bin/openssl version
_FLAVOUR
!=
${
LOCALBASE
}
/bin/openssl version
FLAVOUR
?=
${
_FLAVOUR
:[1]
}
FLAVOUR
?=
${
_FLAVOUR
:[1]
}
.if
"${FLAVOUR}"
==
OpenSSL
||
"${FLAVOUR}"
==
""
.if
"${FLAVOUR}"
==
OpenSSL
||
"${FLAVOUR}"
==
""
...
@@ -150,7 +146,7 @@ mount: want-git
...
@@ -150,7 +146,7 @@ mount: want-git
echo
-n
"Enabling core.git live mount..."
;
\
echo
-n
"Enabling core.git live mount..."
;
\
echo
"
${
CORE_COMMIT
}
"
>
\
echo
"
${
CORE_COMMIT
}
"
>
\
${
.CURDIR
}
/src/opnsense/version/opnsense
;
\
${
.CURDIR
}
/src/opnsense/version/opnsense
;
\
mount_unionfs
${
.CURDIR
}
/src
/usr/local
;
\
mount_unionfs
${
.CURDIR
}
/src
${
LOCALBASE
}
;
\
touch
${
WRKDIR
}
/.mount_done
;
\
touch
${
WRKDIR
}
/.mount_done
;
\
echo
"done"
;
\
echo
"done"
;
\
service configd restart
;
\
service configd restart
;
\
...
@@ -166,7 +162,6 @@ umount: force
...
@@ -166,7 +162,6 @@ umount: force
service configd restart
;
\
service configd restart
;
\
fi
fi
manifest
:
want-git
manifest
:
want-git
@
echo
"name:
\"
${
CORE_NAME
}
\"
"
@
echo
"name:
\"
${
CORE_NAME
}
\"
"
@
echo
"version:
\"
${
CORE_VERSION
}
\"
"
@
echo
"version:
\"
${
CORE_VERSION
}
\"
"
...
@@ -179,7 +174,7 @@ manifest: want-git
...
@@ -179,7 +174,7 @@ manifest: want-git
@
echo
"categories: [
\"
sysutils
\"
,
\"
www
\"
]"
@
echo
"categories: [
\"
sysutils
\"
,
\"
www
\"
]"
@
echo
"licenselogic:
\"
single
\"
"
@
echo
"licenselogic:
\"
single
\"
"
@
echo
"licenses: [
\"
BSD2CLAUSE
\"
]"
@
echo
"licenses: [
\"
BSD2CLAUSE
\"
]"
@
echo
"prefix:
/usr/local
"
@
echo
"prefix:
${
LOCALBASE
}
"
@
echo
"vital: true"
@
echo
"vital: true"
@
echo
"deps: {"
@
echo
"deps: {"
@
for
CORE_DEPEND
in
${
CORE_DEPENDS
}
;
do
\
@
for
CORE_DEPEND
in
${
CORE_DEPENDS
}
;
do
\
...
@@ -258,7 +253,7 @@ upgrade-check: force
...
@@ -258,7 +253,7 @@ upgrade-check: force
upgrade
:
upgrade-check package
upgrade
:
upgrade-check package
@
${
PKG
}
delete
-fy
${
CORE_NAME
}
@
${
PKG
}
delete
-fy
${
CORE_NAME
}
@
${
PKG
}
add
${
PKGDIR
}
/
*
.txz
@
${
PKG
}
add
${
PKGDIR
}
/
*
.txz
@
/usr/local
/etc/rc.restart_webgui
@
${
LOCALBASE
}
/etc/rc.restart_webgui
lint
:
force
lint
:
force
find
${
.CURDIR
}
/src
${
.CURDIR
}
/scripts
\
find
${
.CURDIR
}
/src
${
.CURDIR
}
/scripts
\
...
@@ -314,5 +309,3 @@ test: want-phpunit
...
@@ -314,5 +309,3 @@ test: want-phpunit
clean
:
want-git
clean
:
want-git
${
GIT
}
reset
--hard
HEAD
&&
${
GIT
}
clean
-xdqf
.
${
GIT
}
reset
--hard
HEAD
&&
${
GIT
}
clean
-xdqf
.
.PHONY
:
force
Mk/defaults.mk
0 → 100644
View file @
dc2bd361
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
PKG!= which pkg || echo true
GIT!= which git || echo true
LOCALBASE?= /usr/local
PAGER?= less
all:
@echo "Nothing to do."
force:
.PHONY: force
Mk/tree.mk
View file @
dc2bd361
all:
# Copyright (c) 2015-2016 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
.include "defaults.mk"
.for TARGET in ${TREES} ${EXTRAS}
.for TARGET in ${TREES} ${EXTRAS}
...
@@ -60,7 +85,3 @@ plist-${TARGET}: force
...
@@ -60,7 +85,3 @@ plist-${TARGET}: force
install: install-${TARGET}
install: install-${TARGET}
plist: plist-${TARGET}
plist: plist-${TARGET}
.endfor
.endfor
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