toos/refresh.sh: Recent complexities added to apps/ means that configuratino needs corred Make.defs file in place in order to configure properly
This commit is contained in:
parent
413a7256d7
commit
f9829db939
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# refresh.sh
|
# refresh.sh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -104,6 +104,7 @@ WD=${PWD}
|
|||||||
BOARDDIR=configs/$BOARDSUBDIR
|
BOARDDIR=configs/$BOARDSUBDIR
|
||||||
CONFIGDIR=$BOARDDIR/$CONFIGSUBDIR
|
CONFIGDIR=$BOARDDIR/$CONFIGSUBDIR
|
||||||
DEFCONFIG=$CONFIGDIR/defconfig
|
DEFCONFIG=$CONFIGDIR/defconfig
|
||||||
|
MAKEDEFS=$CONFIGDIR/Make.defs
|
||||||
|
|
||||||
CMPCONFIG_TARGET=cmpconfig
|
CMPCONFIG_TARGET=cmpconfig
|
||||||
CMPCONFIG1=tools/cmpconfig
|
CMPCONFIG1=tools/cmpconfig
|
||||||
@ -124,7 +125,12 @@ if [ ! -d "$CONFIGDIR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -r "$DEFCONFIG" ]; then
|
if [ ! -r "$DEFCONFIG" ]; then
|
||||||
echo "No readable defconfig file in $DEFCONFIG"
|
echo "No readable defconfig file at $DEFCONFIG"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -r "$MAKEDEFS" ]; then
|
||||||
|
echo "No readable Make.defs file at $MAKEDEFS"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -152,7 +158,7 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy the .config to the toplevel directory
|
# Copy the .config and Make.defs to the toplevel directory
|
||||||
|
|
||||||
rm -f SAVEconfig
|
rm -f SAVEconfig
|
||||||
if [ -e .config ]; then
|
if [ -e .config ]; then
|
||||||
@ -163,6 +169,15 @@ fi
|
|||||||
cp -a $DEFCONFIG .config || \
|
cp -a $DEFCONFIG .config || \
|
||||||
{ echo "ERROR: Failed to copy $DEFCONFIG to .config"; exit 1; }
|
{ echo "ERROR: Failed to copy $DEFCONFIG to .config"; exit 1; }
|
||||||
|
|
||||||
|
rm -f SAVEMake.defs
|
||||||
|
if [ -e Make.defs ]; then
|
||||||
|
mv Make.defs SAVEMake.defs || \
|
||||||
|
{ echo "ERROR: Failed to move Make.defs to SAVEMake.defs"; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -a $MAKEDEFS Make.defs || \
|
||||||
|
{ echo "ERROR: Failed to copy $MAKEDEFS to Make.defs"; exit 1; }
|
||||||
|
|
||||||
# Then run oldconfig or oldefconfig
|
# Then run oldconfig or oldefconfig
|
||||||
|
|
||||||
if [ "X${silent}" == "Xy" ]; then
|
if [ "X${silent}" == "Xy" ]; then
|
||||||
@ -195,9 +210,14 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restore any previous .config file
|
# Restore any previous .config and Make.defs files
|
||||||
|
|
||||||
if [ -e SAVEconfig ]; then
|
if [ -e SAVEconfig ]; then
|
||||||
mv SAVEconfig .config || \
|
mv SAVEconfig .config || \
|
||||||
{ echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; }
|
{ echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -e SAVEMake.defs ]; then
|
||||||
|
mv SAVEMake.defs Make.defs || \
|
||||||
|
{ echo "ERROR: Failed to move SAVEMake.defs to Make.defs"; exit 1; }
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user