From: Caiwen Zhang Date: Wed, 25 Mar 2015 03:50:44 +0000 (+0800) Subject: Clean Arduino build intermediate files X-Git-Tag: Plugfest-1~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=139508a726fd80301ea4ab4c0c5096d1ea24d58b;p=contrib%2Fiotivity.git Clean Arduino build intermediate files 1) Remove .d files 2) Remove .map file Change-Id: I866c5542b4bc51f48841588a3a1f880b18439a61 Signed-off-by: Caiwen Zhang Reviewed-on: https://gerrit.iotivity.org/gerrit/569 Tested-by: jenkins-iotivity Reviewed-by: Erich Keane --- diff --git a/build_common/arduino/SConscript b/build_common/arduino/SConscript index f24da8b..d635a66 100644 --- a/build_common/arduino/SConscript +++ b/build_common/arduino/SConscript @@ -221,7 +221,7 @@ else: # Get IDE version if os.path.exists(arduino_home + '/lib/version.txt'): vf = open(arduino_home + '/lib/version.txt', 'r') - version = vf.readline().replace('.', '') + version = vf.readline().replace('.', '').strip() else: print ''' ************************************* Error *********************************** @@ -391,6 +391,12 @@ else: env.AppendUnique(LIBS = 'm') env.Replace(ARCOM = '$AR ' + platform_info.get('compiler.ar.flags') + ' $TARGET $SOURCES') +# Make sure the .d files are removed when clean the build +if env.GetOption('clean'): + dfs = __search_files(env.get('BUILD_DIR'), '*.d') + for df in dfs: + Execute(Delete(df)) + env.AddMethod(__import_lib, "ImportLib") #import arduino library env.AddMethod(__build_core, "BuildCore") #build arduino core env.AddMethod(__create_bin, "CreateBin") #create binary files(.eep and .hex) diff --git a/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript b/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript index 0d37077..613087e 100644 --- a/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript +++ b/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript @@ -24,5 +24,8 @@ if env.get('NET') == 'Wifi': arduino_simplecs = arduino_simplecs_env.Program('SimpleClientServer', 'ocserver.cpp') env.CreateBin('SimpleClientServer') +#The map file is intermediate file, make sure it's removed when clean build +arduino_simplecs_env.Clean(arduino_simplecs, 'SimpleClientServer.map') + Alias('arduino_simplecs', arduino_simplecs) env.AppendTarget('arduino_simplecs')