- | false, _, (Flag.Glimpse|Flag.IdUtils) ->
- failwith "-use_glimpse or -id_utils works only with -dir"
- | true, s, (Flag.Glimpse|Flag.IdUtils) when s <> "" ->
- failwith "-use_glimpse or -id_utils does not work with -kbuild"
- | true, "", Flag.Glimpse ->
- (if not (null xs)
- then failwith "-use_glimpse can accept only one dir");
-
- let files =
- match glimpse_filter (!cocci_file, !Config.std_iso) x with
- None ->
- Common.cmd_to_list (* same as "true, "", _" case *)
- (if !include_headers
- (* FIXME : Could we remove xs ?
- -use_glimpse requires a singleton.
- This is checked some lines before.
- then ("find "^(join " " (x::xs))^" -name \"*.[ch]\"")
- else ("find "^(join " " (x::xs))^" -name \"*.c\""))
- *)
- then ("find "^ x ^" -name \"*.[ch]\"")
- else ("find "^ x ^" -name \"*.c\""))
- | Some files -> files in
- files +> List.map (fun x -> [x])
- | true, "", Flag.IdUtils ->
- (if not (null xs)
- then failwith "-id_utils can accept only one dir");
-
- let files =
- match idutils_filter (!cocci_file, !Config.std_iso) x with
- None ->
- Common.cmd_to_list (* same as "true, "", _" case *)
- (if !include_headers
- (* FIXME : Could we remove xs ?
- -use_glimpse requires a singleton.
- This is checked some lines before.
- then ("find "^(join " " (x::xs))^" -name \"*.[ch]\"")
- else ("find "^(join " " (x::xs))^" -name \"*.c\""))
- *)
- then ("find "^ x ^" -name \"*.[ch]\"")
- else ("find "^ x ^" -name \"*.c\""))
- | Some files -> files in
- files +> List.map (fun x -> [x])
+ | false, _, (Flag.Glimpse|Flag.IdUtils) -> [x::xs]
+ | true, s, (Flag.Glimpse|Flag.IdUtils) when s <> "" ->
+ failwith
+ "-use_glimpse or -id_utils does not work with -kbuild"
+ | true, "", Flag.Glimpse ->
+ (if not (null xs)
+ then failwith "-use_glimpse can accept only one dir");
+
+ let files =
+ match glimpse_filter (!cocci_file, !Config.std_iso) x with
+ None -> get_files x
+ | Some files -> files in
+ files +> List.map (fun x -> [x])
+ | true, "", Flag.IdUtils ->
+ (if not (null xs)
+ then failwith "-id_utils can accept only one dir");
+
+ let files =
+ match idutils_filter (!cocci_file, !Config.std_iso) x with
+ None -> get_files x
+ | Some files -> files in
+ files +> List.map (fun x -> [x])