2026-07-06 22:13:57 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2026-07-14 23:15:37 -05:00
|
|
|
TARGET_DIR="programs"
|
2026-07-06 22:13:57 -05:00
|
|
|
|
2026-07-14 23:15:37 -05:00
|
|
|
if [ ! -d "$TARGET_DIR" ]; then
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2026-07-06 22:13:57 -05:00
|
|
|
|
2026-07-14 23:15:37 -05:00
|
|
|
find "$TARGET_DIR" -type f \( -name "Makefile" -o -name "makefile" \) | while read -r makefile_path; do
|
|
|
|
|
dir_path=$(dirname "$makefile_path")
|
|
|
|
|
(
|
|
|
|
|
cd "$dir_path" || exit
|
|
|
|
|
|
|
|
|
|
make clean
|
|
|
|
|
make
|
|
|
|
|
)
|
|
|
|
|
done
|