You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/copy-libs.sh
+87-60Lines changed: 87 additions & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -322,15 +322,83 @@ mkdir -p "$AR_SDK"
322
322
AR_PLATFORMIO_PY="$AR_SDK/pioarduino-build.py"
323
323
cat configs/pio_start.txt >"$AR_PLATFORMIO_PY"
324
324
325
-
# ASFLAGS mit Prefix-Optionen für flags/includes
325
+
# include dirs - SAMMLE REL_INC für Include-Verkürzung
326
+
REL_INC=""
327
+
set -- $INCLUDES
328
+
329
+
for item;do
330
+
if [[ "$item"!=$PWD ]];then
331
+
ipath="$item"
332
+
fname=`basename "$ipath"`
333
+
dname=`basename $(dirname "$ipath")`
334
+
if [[ "$fname"=="main"&&"$dname"==$(basename "$PWD") ]];then
335
+
continue
336
+
fi
337
+
while [[ "$dname"!="components"&&"$dname"!="managed_components"&&"$dname"!="build" ]];do
338
+
ipath=`dirname "$ipath"`
339
+
fname=`basename "$ipath"`
340
+
dname=`basename $(dirname "$ipath")`
341
+
done
342
+
if [[ "$fname"=="arduino" ]];then
343
+
continue
344
+
fi
345
+
if [[ "$fname"=="config" ]];then
346
+
continue
347
+
fi
348
+
349
+
out_sub="${item#*$ipath}"
350
+
out_cpath="$AR_SDK/include/$fname$out_sub"
351
+
REL_INC+="-iwithprefixbefore $fname$out_sub"
352
+
353
+
# KOPIERE HEADER-DATEIEN
354
+
forfin`find "$item" -name '*.h'`;do
355
+
rel_f=${f#*$item}
356
+
rel_p=${rel_f%/*}
357
+
mkdir -p "$out_cpath$rel_p"
358
+
cp -n $f"$out_cpath$rel_p/"
359
+
done
360
+
forfin`find "$item" -name '*.hpp'`;do
361
+
rel_f=${f#*$item}
362
+
rel_p=${rel_f%/*}
363
+
mkdir -p "$out_cpath$rel_p"
364
+
cp -n $f"$out_cpath$rel_p/"
365
+
done
366
+
forfin`find "$item" -name '*.inc'`;do
367
+
rel_f=${f#*$item}
368
+
rel_p=${rel_f%/*}
369
+
mkdir -p "$out_cpath$rel_p"
370
+
cp -n $f"$out_cpath$rel_p/"
371
+
done
372
+
# Temporary measure to fix issues caused by https://github.com/espressif/esp-idf/commit/dc4731101dd567cc74bbe4d0f03afe52b7db9afb#diff-1d2ce0d3989a80830fdf230bcaafb3117f32046d16cf46616ac3d55b4df2a988R17
373
+
if [[ "$fname"=="bt"&&"$out_sub"=="/include/$IDF_TARGET/include"&&-f"$ipath/controller/$IDF_TARGET/esp_bt_cfg.h" ]];then
# KOPIERE HEADER-DATEIEN (nach der Include-Sammlung)
408
-
REL_INC=""
409
-
set -- $INCLUDES
410
-
for item;do
411
-
if [[ "$item"!=$PWD ]];then
412
-
ipath="$item"
413
-
fname=`basename "$ipath"`
414
-
dname=`basename $(dirname "$ipath")`
415
-
if [[ "$fname"=="main"&&"$dname"==$(basename "$PWD") ]];then
416
-
continue
417
-
fi
418
-
while [[ "$dname"!="components"&&"$dname"!="managed_components"&&"$dname"!="build" ]];do
419
-
ipath=`dirname "$ipath"`
420
-
fname=`basename "$ipath"`
421
-
dname=`basename $(dirname "$ipath")`
422
-
done
423
-
if [[ "$fname"=="arduino" ]];then
424
-
continue
425
-
fi
426
-
if [[ "$fname"=="config" ]];then
427
-
continue
428
-
fi
429
-
430
-
out_sub="${item#*$ipath}"
431
-
out_cpath="$AR_SDK/include/$fname$out_sub"
432
-
REL_INC+="-iwithprefixbefore $fname$out_sub"
433
-
434
-
# KOPIERE HEADER-DATEIEN
435
-
forfin`find "$item" -name '*.h'`;do
436
-
rel_f=${f#*$item}
437
-
rel_p=${rel_f%/*}
438
-
mkdir -p "$out_cpath$rel_p"
439
-
cp -n $f"$out_cpath$rel_p/"
440
-
done
441
-
forfin`find "$item" -name '*.hpp'`;do
442
-
rel_f=${f#*$item}
443
-
rel_p=${rel_f%/*}
444
-
mkdir -p "$out_cpath$rel_p"
445
-
cp -n $f"$out_cpath$rel_p/"
446
-
done
447
-
forfin`find "$item" -name '*.inc'`;do
448
-
rel_f=${f#*$item}
449
-
rel_p=${rel_f%/*}
450
-
mkdir -p "$out_cpath$rel_p"
451
-
cp -n $f"$out_cpath$rel_p/"
452
-
done
453
-
# Temporary measure to fix issues caused by https://github.com/espressif/esp-idf/commit/dc4731101dd567cc74bbe4d0f03afe52b7db9afb#diff-1d2ce0d3989a80830fdf230bcaafb3117f32046d16cf46616ac3d55b4df2a988R17
454
-
if [[ "$fname"=="bt"&&"$out_sub"=="/include/$IDF_TARGET/include"&&-f"$ipath/controller/$IDF_TARGET/esp_bt_cfg.h" ]];then
0 commit comments