mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 19:51:40 +02:00
Avoid dependence on 'make'
This commit is contained in:
parent
a8fd3281d9
commit
db6091f101
@ -309,6 +309,13 @@ startup_error() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Determine if there are config files newer than the passed object
|
||||||
|
#
|
||||||
|
upofdate() {
|
||||||
|
[ -z "$(find ${CONFDIR} -newer $1)" ]
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Run the compiler
|
# Run the compiler
|
||||||
#
|
#
|
||||||
@ -378,7 +385,7 @@ compiler() {
|
|||||||
start_command() {
|
start_command() {
|
||||||
local finished
|
local finished
|
||||||
finished=0
|
finished=0
|
||||||
local restorefile
|
local object
|
||||||
|
|
||||||
do_it() {
|
do_it() {
|
||||||
local rc
|
local rc
|
||||||
@ -474,25 +481,16 @@ start_command() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -n "${g_fast}${AUTOMAKE}" ]; then
|
if [ -n "${g_fast}${AUTOMAKE}" ]; then
|
||||||
if qt mywhich make; then
|
|
||||||
restorefile=$RESTOREFILE
|
|
||||||
|
|
||||||
if [ -z "$g_fast" ]; then
|
if [ -z "$g_fast" ]; then
|
||||||
#
|
#
|
||||||
# Automake -- use the last compiled script
|
# Automake -- use the last compiled script
|
||||||
#
|
#
|
||||||
RESTOREFILE=firewall
|
object=firewall
|
||||||
fi
|
|
||||||
|
|
||||||
export RESTOREFILE
|
|
||||||
|
|
||||||
if ! make -qf ${CONFDIR}/Makefile; then
|
|
||||||
g_fast=
|
|
||||||
AUTOMAKE=
|
|
||||||
fi
|
|
||||||
|
|
||||||
RESTOREFILE=$restorefile
|
|
||||||
else
|
else
|
||||||
|
object=$RESTOREFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! uptodate ${VARDIR}/$object; then
|
||||||
g_fast=
|
g_fast=
|
||||||
AUTOMAKE=
|
AUTOMAKE=
|
||||||
fi
|
fi
|
||||||
@ -753,15 +751,7 @@ restart_command() {
|
|||||||
[ -n "$STARTUP_ENABLED" ] || fatal_error "Startup is disabled"
|
[ -n "$STARTUP_ENABLED" ] || fatal_error "Startup is disabled"
|
||||||
|
|
||||||
if [ -z "$g_fast" -a -n "$AUTOMAKE" ]; then
|
if [ -z "$g_fast" -a -n "$AUTOMAKE" ]; then
|
||||||
if qt mywhich make; then
|
uptodate ${VARDIR}/firewall && g_fast=Yes
|
||||||
#
|
|
||||||
# RESTOREFILE is exported by get_config()
|
|
||||||
#
|
|
||||||
restorefile=$RESTOREFILE
|
|
||||||
RESTOREFILE=firewall
|
|
||||||
make -qf ${CONFDIR}/Makefile && g_fast=Yes
|
|
||||||
RESTOREFILE=$restorefile
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$g_fast" ]; then
|
if [ -z "$g_fast" ]; then
|
||||||
|
@ -235,6 +235,13 @@ startup_error() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Determine if there are config files newer than the passed object
|
||||||
|
#
|
||||||
|
uptodate() {
|
||||||
|
[ -z "$(find ${CONFDIR} -newer $1)" ]
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Run the appropriate compiler
|
# Run the appropriate compiler
|
||||||
#
|
#
|
||||||
@ -315,7 +322,7 @@ compiler() {
|
|||||||
start_command() {
|
start_command() {
|
||||||
local finished
|
local finished
|
||||||
finished=0
|
finished=0
|
||||||
local restorefile
|
local object
|
||||||
|
|
||||||
do_it() {
|
do_it() {
|
||||||
local rc
|
local rc
|
||||||
@ -406,24 +413,16 @@ start_command() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -n "${g_fast}${AUTOMAKE}" ]; then
|
if [ -n "${g_fast}${AUTOMAKE}" ]; then
|
||||||
if qt mywhich make; then
|
|
||||||
restorefile=$RESTOREFILE
|
|
||||||
if [ -z "$g_fast" ]; then
|
if [ -z "$g_fast" ]; then
|
||||||
#
|
#
|
||||||
# Autofast -- use the last compiled script
|
# Autofast -- use the last compiled script
|
||||||
#
|
#
|
||||||
RESTOREFILE=firewall
|
object=firewall
|
||||||
fi
|
|
||||||
|
|
||||||
export RESTOREFILE
|
|
||||||
|
|
||||||
if ! make -qf ${CONFDIR}/Makefile; then
|
|
||||||
g_fast=
|
|
||||||
AUTOMAKE=
|
|
||||||
fi
|
|
||||||
|
|
||||||
RESTOREFILE=$restorefile
|
|
||||||
else
|
else
|
||||||
|
object=$RESTOREFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! uptodate ${VARDIR}/$object; then
|
||||||
g_fast=
|
g_fast=
|
||||||
AUTOMAKE=
|
AUTOMAKE=
|
||||||
fi
|
fi
|
||||||
@ -684,15 +683,7 @@ restart_command() {
|
|||||||
[ -n "$STARTUP_ENABLED" ] || fatal_error "Startup is disabled"
|
[ -n "$STARTUP_ENABLED" ] || fatal_error "Startup is disabled"
|
||||||
|
|
||||||
if [ -z "$g_fast" -a -n "$AUTOMAKE" ]; then
|
if [ -z "$g_fast" -a -n "$AUTOMAKE" ]; then
|
||||||
if qt mywhich make; then
|
uptodate ${VARDIR}/firewall && g_fast=Yes
|
||||||
#
|
|
||||||
# RESTOREFILE is exported by get_config()
|
|
||||||
#
|
|
||||||
restorefile=$RESTOREFILE
|
|
||||||
RESTOREFILE=firewall
|
|
||||||
make -qf ${CONFDIR}/Makefile && g_fast=Yes
|
|
||||||
RESTOREFILE=$restorefile
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$g_fast" ]; then
|
if [ -z "$g_fast" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user