source: branches/libc-0.6/src/gcc/libiberty/maint-tool@ 3417

Last change on this file since 3417 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 5.7 KB
Line 
1#!/usr/bin/perl
2# -*- perl -*-
3
4# Copyright (C) 2001
5# Free Software Foundation
6#
7# This file is part of the libiberty library.
8# Libiberty is free software; you can redistribute it and/or
9# modify it under the terms of the GNU Library General Public
10# License as published by the Free Software Foundation; either
11# version 2 of the License, or (at your option) any later version.
12#
13# Libiberty is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16# Library General Public License for more details.
17#
18# You should have received a copy of the GNU Library General Public
19# License along with libiberty; see the file COPYING.LIB. If not,
20# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21# Boston, MA 02111-1307, USA.
22#
23# Originally written by DJ Delorie <[email protected]>
24
25
26# This is a trivial script which checks the lists of C and O files in
27# the Makefile for consistency.
28
29$mode = shift;
30$srcdir = ".";
31
32if ($mode eq "-s") {
33 $srcdir = shift;
34 $mode = shift;
35}
36
37&missing() if $mode eq "missing";
38&undoc() if $mode eq "undoc";
39&deps() if $mode eq "deps";
40
41exit 0;
42
43format STDOUT =
44^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~
45$out
46 ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
47$out
48.
49
50######################################################################
51
52sub missing {
53
54 opendir(S, $srcdir);
55 while ($f = readdir S) {
56 $have{$f} = 1;
57 }
58 closedir(S);
59 opendir(S, ".");
60 while ($f = readdir S) {
61 $have{$f} = 1;
62 }
63 closedir(S);
64
65 for $a (@ARGV) {
66 $listed{$a} = 1;
67 $have{$a} = 0;
68 }
69
70 for $f (sort keys %have) {