#! /usr/bin/perl

# $_ is a filename like ../../include/uapi/linux/prctl.h
# convert it to be like: $include <uapi/linux/prctl.h>
# input via stdin; output to stdout.
# vi:ts=4

LINE:
	while ($line = <STDIN>) {
		chomp $line;		# drop ending newline

		# skip if not a .h file
		next LINE if ($line !~ m/\.h$/);
		# skip any /asm.*posix_types/
		next LINE if ($line =~ "asm.*posix_types");

		$line =~ s@^.*include/@#include <@;
		$line =~ s@\.h$@.h>@;

		print "$line\n";
	} ### < STDIN
