File tree Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3+ # Copyright (c) Qualcomm Technologies, Inc.
4+
5+ set -e
6+
7+ PROJECT_ROOT=$( dirname " $0 " )
8+
9+ echo " Starting autotools cleanup and regeneration..."
10+
11+ clean_autotools_files () {
12+ echo " - Cleaning autotools-generated files..."
13+
14+ FILE_PATTERNS=" Makefile.in Makefile config.* stamp-h1 configure configure~ aclocal.m4 compile install-sh ltmain.sh missing"
15+ for pattern in $FILE_PATTERNS ; do
16+ find " $PROJECT_ROOT " -name " $pattern " -exec rm -f {} +
17+ done
18+
19+ # Remove directories
20+ find " $PROJECT_ROOT " -name ' autom4te.cache' -type d -exec rm -rf {} +
21+ find " $PROJECT_ROOT " -name ' .deps' -type d -exec rm -rf {} +
22+ }
23+
24+ regenerate_build_system () {
25+ echo " - Regenerating with autoreconf..."
26+ autoreconf --install --force --verbose
27+ }
28+
29+ main () {
30+ clean_autotools_files
31+ regenerate_build_system
32+ echo
33+ echo " Autotools setup complete."
34+ echo " You can now run:"
35+ echo " ./configure"
36+ echo " make"
37+ }
38+
39+ main " $@ "
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3+ # Copyright (c) Qualcomm Technologies, Inc.
4+
5+ set -e
6+
7+ echo " Running full clean and rebuild..."
8+
9+ # Step 1: Clean previous build artifacts
10+ if [ -f Makefile ]; then
11+ echo " - Running make distclean..."
12+ make distclean || true
13+ fi
14+
15+ # Step 2: Run autogen to regenerate build system files
16+ echo " - Running autogen.sh..."
17+ ./autogen.sh
18+
19+ # Step 3: Run configure
20+ echo " - Running ./configure..."
21+ ./configure
22+
23+ # Step 4: Build
24+ echo " - Running make..."
25+ make
26+
27+ echo " Rebuild complete."
You can’t perform that action at this time.
0 commit comments