make: when processing ARGS for SCRIPTS defer their parsing
# make batch-ports-a,b -V batch_ARGS Before: ports-a b After: ports-a,b It also means we ever only take one argument.
This commit is contained in:
parent
1afa5a39f1
commit
3cb53e308c
4
Makefile
4
Makefile
|
@ -127,7 +127,11 @@ release: dvd nano serial vga
|
|||
.for TARGET in ${.TARGETS}
|
||||
_TARGET= ${TARGET:C/\-.*//}
|
||||
.if ${_TARGET} != ${TARGET}
|
||||
.if ${SCRIPTS:M${_TARGET}}
|
||||
${_TARGET}_ARGS+= ${TARGET:C/^[^\-]*(\-|\$)//}
|
||||
.else
|
||||
${_TARGET}_ARGS+= ${TARGET:C/^[^\-]*(\-|\$)//:S/,/ /g}
|
||||
.endif
|
||||
${TARGET}: ${_TARGET}
|
||||
.endif
|
||||
.endfor
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2017 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2017-2021 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
@ -25,8 +25,10 @@
|
|||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
|
||||
for _FLAVOUR in ${FLAVOUR}; do
|
||||
make clean-obj ${*} FLAVOUR=${_FLAVOUR}
|
||||
done
|
||||
if [ -z "${1}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
make clean-obj
|
||||
for _FLAVOUR in ${FLAVOUR}; do
|
||||
make clean-obj ${1} FLAVOUR=${_FLAVOUR}
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue