#!/usr/bin/env perl
# Extract all locally included header files (not <>-ones, but "")

# hack, to badly exit if there is unexistent file
$SIG{__WARN__} = sub { die @_ };

use File::Basename;

map { $inc{basename($_)} = 1 } @ARGV;
while (<>) {
    /^#include "(.+)"$/ and $inc{$1} = 1;
};
print join " ", sort keys %inc;
