Skip to content

Commit

Permalink
Allow build's clean options to be given in any mix of letter-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mn200 committed Jan 4, 2024
1 parent a1eb6e6 commit 7818249
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tools/buildhelp.txt
Expand Up @@ -21,4 +21,7 @@ OR
build [--nograph|--graph] help
builds the help system only

The clean* variations can be given in whatever mix of letter-cases
desired (i.e., "cleanall" and "Cleanall" work as well as "cleanAll").

Options:
8 changes: 5 additions & 3 deletions tools/buildutils.sml
Expand Up @@ -317,10 +317,12 @@ fun get_cline () = let
errFn = cline_die } (CommandLine.arguments())
val option_record = apply_updates opts buildcline.initial
val _ = if #help option_record then exit_with_help() else ()
fun lcnorm_mem s list =
List.exists (fn s' => CharVector.map Char.toLower s' = s) list
val _ =
if mem "cleanAll" rest then raise DoClean "cleanAll"
else if mem "clean" rest then raise DoClean "clean"
else if mem "cleanForReloc" rest then raise DoClean "cleanForReloc"
if lcnorm_mem "cleanall" rest then raise DoClean "cleanAll"
else if lcnorm_mem "clean" rest then raise DoClean "clean"
else if lcnorm_mem "cleanforreloc" rest then raise DoClean "cleanForReloc"
else ()
val seqspec =
case #seqname option_record of
Expand Down

0 comments on commit 7818249

Please sign in to comment.