pmt: initial 2.7.0 update
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
NDK_PROG=false
|
||||
FORCE_GEN=false
|
||||
THIS_IS=main
|
||||
UPDATE_MAKEFILES=false
|
||||
SOURCE_DIRNAME=src
|
||||
OUT_DIRNAME=out
|
||||
@@ -14,7 +14,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
[ ! "${THIS_IS}" = "main" ] && abort "The caller is not the main makefile. Something's wrong."
|
||||
[ ! "${THIS_IS}" = "main" ] \
|
||||
&& abort "The caller is not the main makefile. Something's wrong."
|
||||
|
||||
try_with="Try with force mode (FORCE_GEN=true)."
|
||||
|
||||
@@ -24,7 +25,7 @@ else
|
||||
mfiles=("${OUT_DIR}/Makefile" "${SOURCE_DIR}/Makefile")
|
||||
fi
|
||||
|
||||
for mfile in ${mfiles[0]} ${mfiles[1]}; do
|
||||
for mfile in ${mfiles[@]}; do
|
||||
|
||||
[ -f "${mfile}" ] && \
|
||||
if [ "${FORCE_GEN}" = "true" ]; then
|
||||
|
||||
@@ -17,25 +17,27 @@
|
||||
. build/bash/vars
|
||||
. build/bash/functions
|
||||
|
||||
[ ! "${THIS_IS}" = "main" ] && abort "The caller is not the main makefile. Something's wrong."
|
||||
[ ! "${THIS_IS}" = "main" ] \
|
||||
&& abort "The caller is not the main makefile. Something's wrong."
|
||||
|
||||
if [ "${NDK_PROG}" = "true" ]; then
|
||||
|
||||
[ "${UPDATE_MAKEFILES}" = "true" ] || print " - Removing Android.mk..."
|
||||
rm -f ${SOURCE_DIR}/Android.mk
|
||||
[ "${UPDATE_MAKEFILES}" = "true" ] \
|
||||
|| print " - Removing Android.mk..." \
|
||||
&& print " - Removing Application.mk..."
|
||||
|
||||
[ "${UPDATE_MAKEFILES}" = "true" ] || print " - Removing Application.mk..."
|
||||
rm -f ${SOURCE_DIR}/Application.mk
|
||||
rm -f ${SOURCE_DIR}/Application.mk \
|
||||
${SOURCE_DIR}/Android.mk
|
||||
|
||||
else
|
||||
|
||||
[ "${UPDATE_MAKEFILES}" = "true" ] || print " - Info: Main makefile won't be deleted."
|
||||
[ "${UPDATE_MAKEFILES}" = "true" ] \
|
||||
|| print " - Info: Main makefile won't be deleted." \
|
||||
&& print " - Removing output directory makefile..." \
|
||||
&& print " - Removing source directory makefile..."
|
||||
|
||||
[ "${UPDATE_MAKEFILES}" = "true" ] || print " - Removing output directory makefile..."
|
||||
rm -f ${OUT_DIR}/Makefile
|
||||
|
||||
[ "${UPDATE_MAKEFILES}" = "true" ] || print " - Removing source directory makefile"
|
||||
rm -f ${SOURCE_DIR}/Makefile
|
||||
rm -f ${SOURCE_DIR}/Makefile \
|
||||
${OUT_DIR}/Makefile
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@@ -16,22 +16,22 @@
|
||||
|
||||
function abort()
|
||||
{
|
||||
[ -n "$1" ] && echo -e " - ${RED}${BOLD}Error:${BOLD_RESET}${RESET} $1"
|
||||
[ -n "${1}" ] \
|
||||
&& echo -e " - ${RED}${BOLD}Error:${BOLD_RESET}${RESET} ${1}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function read_file()
|
||||
{
|
||||
cat "$1" >> "$2" || abort "failed to read/write $1/$2"
|
||||
cat "${1}" >> "${2}" \
|
||||
|| abort "failed to read/write ${1}/${2}"
|
||||
}
|
||||
|
||||
function gen()
|
||||
{
|
||||
[ "${FORCE_GEN}" = "true" -a "${UPDATE_MAKEFILES}" = "true" ] && rm -f "$1"
|
||||
touch "$1" || abort "failed to generate: $1"
|
||||
[ "${FORCE_GEN}" = "true" -a "${UPDATE_MAKEFILES}" = "true" ] \
|
||||
&& rm -f "${1}"
|
||||
touch "${1}" || abort "failed to generate: ${1}"
|
||||
}
|
||||
|
||||
function print()
|
||||
{
|
||||
echo -e "$1"
|
||||
}
|
||||
function print() { echo -e "${1}"; }
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
[ -z ${NDK_ROOT_DIR} ] && \
|
||||
echo "Please set NDK_ROOT_DIR variable!" && \
|
||||
exit 1
|
||||
[ -z ${NDK_ROOT_DIR} ] \
|
||||
&& echo "Please set NDK_ROOT_DIR variable!" \
|
||||
&& exit 1
|
||||
|
||||
[ -z ${NDK_PROJECT_PATH} ] && \
|
||||
echo "Please set NDK_PROJECT_PATH variable!" && \
|
||||
exit 1
|
||||
[ -z ${NDK_PROJECT_PATH} ] \
|
||||
&& echo "Please set NDK_PROJECT_PATH variable!" \
|
||||
&& exit 1
|
||||
|
||||
CC_IS="${NDK_ROOT_DIR}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang"
|
||||
CC_VERS=$(${CC_IS} --version | head -n 1)
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
. build/bash/vars
|
||||
. build/bash/functions
|
||||
|
||||
[ ! "${UPDATE_MAKEFILES}" = "true" ] && . build/bash/check-makefiles
|
||||
[ ! "${THIS_IS}" = "main" ] && abort "The caller is not the main makefile. Something's wrong."
|
||||
[ ! "${UPDATE_MAKEFILES}" = "true" ] \
|
||||
&& . build/bash/check-makefiles
|
||||
[ ! "${THIS_IS}" = "main" ] \
|
||||
&& abort "The caller is not the main makefile. Something's wrong."
|
||||
|
||||
if [ "${UPDATE_MAKEFILES}" = "true" ]; then
|
||||
GENR="Re-generating"
|
||||
|
||||
Reference in New Issue
Block a user