Skip to content
Snippets Groups Projects
Commit f9829db9 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

toos/refresh.sh: Recent complexities added to apps/ means that configuratino...

toos/refresh.sh: Recent complexities added to apps/ means that configuratino needs corred Make.defs file in place in order to configure properly
parent 413a7256
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# 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>
#
# Redistribution and use in source and binary forms, with or without
......@@ -104,6 +104,7 @@ WD=${PWD}
BOARDDIR=configs/$BOARDSUBDIR
CONFIGDIR=$BOARDDIR/$CONFIGSUBDIR
DEFCONFIG=$CONFIGDIR/defconfig
MAKEDEFS=$CONFIGDIR/Make.defs
CMPCONFIG_TARGET=cmpconfig
CMPCONFIG1=tools/cmpconfig
......@@ -124,7 +125,12 @@ if [ ! -d "$CONFIGDIR" ]; then
fi
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
fi
......@@ -152,7 +158,7 @@ else
fi
fi
# Copy the .config to the toplevel directory
# Copy the .config and Make.defs to the toplevel directory
rm -f SAVEconfig
if [ -e .config ]; then
......@@ -163,6 +169,15 @@ fi
cp -a $DEFCONFIG .config || \
{ 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
if [ "X${silent}" == "Xy" ]; then
......@@ -195,9 +210,14 @@ else
fi
fi
# Restore any previous .config file
# Restore any previous .config and Make.defs files
if [ -e SAVEconfig ]; then
mv SAVEconfig .config || \
{ echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; }
fi
if [ -e SAVEMake.defs ]; then
mv SAVEMake.defs Make.defs || \
{ echo "ERROR: Failed to move SAVEMake.defs to Make.defs"; exit 1; }
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment