Skip to content

Commit

Permalink
new --with-summary option
Browse files Browse the repository at this point in the history
1. --with-summary option default is NO
2. prefer `source' than `.'
  • Loading branch information
junjiemars committed Jan 10, 2025
1 parent f744ec4 commit c7bcb06
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
4 changes: 3 additions & 1 deletion auto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ if [ -f "$NM_AUTO_H" ]; then
END
fi

. ${NORE_ROOT}/auto/summary
if [ "$NM_SUMMARY" = "YES" ]; then
source ${NORE_ROOT}/auto/summary
fi

# eof
16 changes: 10 additions & 6 deletions auto/options
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ NM_SRC=.

NM_NEW=NO

NM_ERROR=YES
NM_WARN=YES
NM_VERBOSE=NO
NM_BUILD=NO
NM_SYMBOL=YES
NM_ARCH=NO
NM_STD=YES
NM_BUILD=NO
NM_ERROR=YES
NM_OPTIMIZE=NO
NM_STD=YES
NM_SYMBOL=YES
NM_SUMMARY=NO
NM_VERBOSE=NO
NM_WARN=YES

NM_PLATFORM=
NM_CPU_CACHE_LINE=
Expand Down Expand Up @@ -98,6 +99,7 @@ do
--with-arch=*) NM_ARCH="$value" ;;
--with-std=*) NM_STD="$value" ;;
--with-optimize=*) NM_OPTIMIZE="$value" ;;
--with-summary=*) NM_SUMMARY="$value" ;;

--has-*)
if `legal_opt "$option"`; then
Expand Down Expand Up @@ -140,6 +142,7 @@ options:
--with-arch=[NO|YES|*] arch option
--with-std=[YES|NO|*] language standard option
--with-optimize=[NO|YES|*] optimize level option
--with-summary=[NO|YES] summarize configuration
--has-* has [*] to do
END
Expand Down Expand Up @@ -181,6 +184,7 @@ NM_SYMBOL="`yes_no_opt YES $NM_SYMBOL`"
NM_ARCH="`yes_no_opt NO $NM_ARCH`"
NM_STD="`yes_no_opt YES $NM_STD`"
NM_OPTIMIZE="`yes_no_opt NO $NM_OPTIMIZE`"
NM_SUMMARY="$(yes_no_opt NO $NM_SUMMARY)"

NM_BIN_PATH="${NM_BIN_PATH:-bin}"
NM_LIB_PATH="${NM_LIB_PATH:-lib}"
Expand Down
1 change: 0 additions & 1 deletion auto/summary
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ yes_no_any_out () {
esac
}


echo "Configuration summary"

cat << END
Expand Down
8 changes: 8 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ test_nore_override_option () {
test_make clean test
}

test_nore_summary_option () {
test_what "CC=$CC ./configure --with-summary=yes"
test_configure --with-summary=yes
test_make clean test
}

test_nore_auto_check () {
local a="auto"
sed -e 's/^#//g' "${_ROOT_DIR_}/auto/check" > "${a}"
Expand All @@ -311,8 +317,10 @@ test_nore_optimize_option
test_nore_std_option
test_nore_prefix_option
test_nore_override_option
test_nore_summary_option
test_nore_auto_check


# clean CI directory
[ -d "${_CI_DIR_}" ] && rm -r "${_CI_DIR_}"

Expand Down

0 comments on commit c7bcb06

Please sign in to comment.