The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

configure: cache diff flags probing

+50 -49
+30 -27
configure
··· 717 717 ac_header_c_list= 718 718 ac_subst_vars='LTLIBOBJS 719 719 LIBOBJS 720 + DIFF_FLAGS 720 721 DIFF 721 722 PTHREAD_CFLAGS 722 723 PTHREAD_LIBS ··· 945 946 ac_tool_prefix 946 947 CSCFLAGS 947 948 CSC 948 - diff_supports_color 949 - DIFF_FLAGS 949 + ocaml_cv_prog_diff_supports_color 950 950 encode_C_literal 951 951 SAK 952 952 SAK_BUILD ··· 3397 3397 ocamltest_unix_impl="dummy" 3398 3398 unix_library="" 3399 3399 unix_directory="" 3400 - diff_supports_color=false 3401 3400 target_libdir_is_relative=false 3402 3401 srcdir_abs='' 3403 3402 srcdir_abs_real='' ··· 3465 3464 CMT_MAGIC_NUMBER=Caml1999T037 3466 3465 3467 3466 LINEAR_MAGIC_NUMBER=Caml1999L037 3468 - 3469 3467 3470 3468 3471 3469 ··· 24116 24114 24117 24115 test -n "$DIFF" && break 24118 24116 done 24119 - test -n "$DIFF" || DIFF="none" 24117 + test -n "$DIFF" || DIFF="as_fn_error $? "ocamltest requires a diff tool" "$LINENO" 5" 24120 24118 24121 - DIFF_FLAGS="" 24122 - flags="" 24123 24119 case $DIFF in #( 24124 24120 diff) : 24125 - flags="--strip-trailing-cr -u" ;; #( 24126 - none) : 24127 - as_fn_error $? "ocamltest requires a diff tool" "$LINENO" 5 ;; #( 24121 + flags_to_test='--strip-trailing-cr -u' ;; #( 24128 24122 *) : 24129 24123 ;; 24130 24124 esac 24125 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra $DIFF flags" >&5 24126 + printf %s "checking for extra $DIFF flags... " >&6; } 24127 + if test ${ocaml_cv_prog_diff_flags+y} 24128 + then : 24129 + printf %s "(cached) " >&6 24130 + else $as_nop 24131 + flags="" 24132 + for flag in ${flags_to_test}; do 24133 + "$DIFF" $flag /dev/zero /dev/zero >/dev/null 2>&1 && \ 24134 + flags="${flags:+$flags }$flag" 24135 + done 24136 + ocaml_cv_prog_diff_flags="$flags" 24137 + fi 24138 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_diff_flags" >&5 24139 + printf "%s\n" "$ocaml_cv_prog_diff_flags" >&6; } 24131 24140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $DIFF supports --color={auto,always,never}" >&5 24132 24141 printf %s "checking whether $DIFF supports --color={auto,always,never}... " >&6; } 24142 + if test ${ocaml_cv_prog_diff_supports_color+y} 24143 + then : 24144 + printf %s "(cached) " >&6 24145 + else $as_nop 24133 24146 if $DIFF --color=auto $0 $0 > /dev/null 2>&1 24134 24147 then : 24135 - diff_supports_color=true; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 24136 - printf "%s\n" "yes" >&6; } 24137 - else $as_nop 24138 - diff_supports_color=false; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 24139 - printf "%s\n" "no" >&6; } 24148 + ocaml_cv_prog_diff_supports_color=true 24140 24149 fi 24141 - for flag in ${flags}; do 24142 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $DIFF supports $flag" >&5 24143 - printf %s "checking whether $DIFF supports $flag... " >&6; }; 24144 - if $DIFF $DIFF_FLAGS $flag $0 $0 > /dev/null 2>&1 24145 - then : 24146 - DIFF_FLAGS="$DIFF_FLAGS $flag" 24147 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 24148 - printf "%s\n" "yes" >&6; } 24149 - else $as_nop 24150 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 24151 - printf "%s\n" "no" >&6; } 24152 24150 fi 24153 - done 24151 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_diff_supports_color" >&5 24152 + printf "%s\n" "$ocaml_cv_prog_diff_supports_color" >&6; } 24154 24153 fi 24154 + DIFF_FLAGS=$ocaml_cv_prog_diff_flags 24155 + 24156 + # Always assign a valid default OCaml value 24157 + : ${ocaml_cv_prog_diff_supports_color:=false} 24155 24158 24156 24159 if test x"$enable_flambda" = "xyes" 24157 24160 then :
+19 -21
configure.ac
··· 83 83 ocamltest_unix_impl="dummy" 84 84 unix_library="" 85 85 unix_directory="" 86 - diff_supports_color=false 87 86 target_libdir_is_relative=false 88 87 srcdir_abs='' 89 88 srcdir_abs_real='' ··· 137 136 AC_SUBST([SAK_BUILD]) 138 137 AC_SUBST([SAK]) 139 138 AC_SUBST([encode_C_literal]) 140 - AC_SUBST([DIFF_FLAGS]) 141 - AC_SUBST([diff_supports_color]) 139 + AC_SUBST([ocaml_cv_prog_diff_supports_color]) 142 140 AC_SUBST([CSC]) 143 141 AC_SUBST([CSCFLAGS]) 144 142 # Note: This is present for the flexdll bootstrap where it exposed as the old ··· 2860 2858 AC_CONFIG_LINKS([ 2861 2859 ocamltest/ocamltest_unix.ml:${ocamltest_unix_mod} 2862 2860 ]) 2863 - AC_CHECK_PROGS([DIFF], [patdiff diff], [none]) 2864 - DIFF_FLAGS="" 2865 - flags="" 2866 - AS_CASE([$DIFF], 2867 - [diff], [flags="--strip-trailing-cr -u"], 2868 - [none], 2869 - [AC_MSG_ERROR([ocamltest requires a diff tool])]) 2870 - AC_MSG_CHECKING([whether $DIFF supports --color={auto,always,never}]) 2871 - AS_IF([$DIFF --color=auto $0 $0 > /dev/null 2>&1], 2872 - [diff_supports_color=true; AC_MSG_RESULT([yes])], 2873 - [diff_supports_color=false; AC_MSG_RESULT([no])]) 2874 - for flag in ${flags}; do 2875 - AC_MSG_CHECKING([whether $DIFF supports $flag]); 2876 - AS_IF([$DIFF $DIFF_FLAGS $flag $0 $0 > /dev/null 2>&1], 2877 - [DIFF_FLAGS="$DIFF_FLAGS $flag" 2878 - AC_MSG_RESULT([yes])], 2879 - [AC_MSG_RESULT([no])]) 2880 - done]) 2861 + AC_CHECK_PROGS([DIFF], [patdiff diff], 2862 + [AC_MSG_ERROR([ocamltest requires a diff tool])]) 2863 + AS_CASE([$DIFF], [diff], [flags_to_test='--strip-trailing-cr -u']) 2864 + AC_CACHE_CHECK([for extra $DIFF flags], 2865 + [ocaml_cv_prog_diff_flags], 2866 + [flags="" 2867 + for flag in ${flags_to_test}; do 2868 + "$DIFF" $flag /dev/zero /dev/zero >/dev/null 2>&1 && \ 2869 + flags="${flags:+$flags }$flag" 2870 + done 2871 + ocaml_cv_prog_diff_flags="$flags"]) 2872 + AC_CACHE_CHECK([whether $DIFF supports --color={auto,always,never}], 2873 + [ocaml_cv_prog_diff_supports_color], 2874 + [AS_IF([$DIFF --color=auto $0 $0 > /dev/null 2>&1], 2875 + [ocaml_cv_prog_diff_supports_color=true])])]) 2876 + AC_SUBST([DIFF_FLAGS], [$ocaml_cv_prog_diff_flags]) 2877 + # Always assign a valid default OCaml value 2878 + : ${ocaml_cv_prog_diff_supports_color:=false} 2881 2879 2882 2880 AS_IF([test x"$enable_flambda" = "xyes"], 2883 2881 [flambda=true
+1 -1
ocamltest/ocamltest_config.ml.in
··· 39 39 40 40 let diff = {@QS@|@DIFF@|@QS@} 41 41 let diff_flags = {@QS@|@DIFF_FLAGS@|@QS@} 42 - let diff_supports_color = @diff_supports_color@ 42 + let diff_supports_color = @ocaml_cv_prog_diff_supports_color@ 43 43 44 44 let shared_libraries = @supports_shared_libraries@ 45 45