diff options
Diffstat (limited to 'make/filter-inputs')
-rwxr-xr-x | make/filter-inputs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/make/filter-inputs b/make/filter-inputs new file mode 100755 index 000000000000..8a6bbe2abdc9 --- /dev/null +++ b/make/filter-inputs @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +#===- make/filter-inputs ---------------------------------------------------===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +# Given a list of files, return a new list of files taking only the +# first file for any particular filename. +def main(): + import os,sys + + seen = set() + for file in sys.argv[1:]: + base = os.path.basename(file) + if base not in seen: + seen.add(base) + print file + +if __name__ == '__main__': + main() |