OLD | NEW |
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 # -*- perl -*- | 2 # -*- perl -*- |
3 | 3 |
4 # Copyright (C) 2001, 2007, 2010 | 4 # Copyright (C) 2001, 2007, 2010 |
5 # Free Software Foundation | 5 # Free Software Foundation |
6 # | 6 # |
7 # This file is part of the libiberty library. | 7 # This file is part of the libiberty library. |
8 # Libiberty is free software; you can redistribute it and/or | 8 # Libiberty is free software; you can redistribute it and/or |
9 # modify it under the terms of the GNU Library General Public | 9 # modify it under the terms of the GNU Library General Public |
10 # License as published by the Free Software Foundation; either | 10 # License as published by the Free Software Foundation; either |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 $crule = "\tif [ x\"\$(PICFLAG)\" != x ]; then \\\n"; | 215 $crule = "\tif [ x\"\$(PICFLAG)\" != x ]; then \\\n"; |
216 $crule .= "\t \$(COMPILE.c) \$(PICFLAG) \$< -o pic/\$@; \\\n"; | 216 $crule .= "\t \$(COMPILE.c) \$(PICFLAG) \$< -o pic/\$@; \\\n"; |
217 $crule .= "\telse true; fi\n"; | 217 $crule .= "\telse true; fi\n"; |
218 $crule .= "\t\$(COMPILE.c) \$< \$(OUTPUT_OPTION)\n"; | 218 $crule .= "\t\$(COMPILE.c) \$< \$(OUTPUT_OPTION)\n"; |
219 $crule .= "\n"; | 219 $crule .= "\n"; |
220 | 220 |
221 $incdir = shift @ARGV; | 221 $incdir = shift @ARGV; |
222 | 222 |
223 opendir(INC, $incdir); | 223 opendir(INC, $incdir); |
224 while ($f = readdir INC) { | 224 while ($f = readdir INC) { |
225 » next unless $f =~ /\.h$/; | 225 » next unless $f =~ /\.h$/ || $f =~ /\.def$/; |
226 $mine{$f} = "\$(INCDIR)/$f"; | 226 $mine{$f} = "\$(INCDIR)/$f"; |
227 $deps{$f} = join(' ', &deps_for("$incdir/$f")); | 227 $deps{$f} = join(' ', &deps_for("$incdir/$f")); |
228 } | 228 } |
229 $mine{'config.h'} = "config.h"; | 229 $mine{'config.h'} = "config.h"; |
230 | 230 |
231 opendir(INC, $srcdir); | 231 opendir(INC, $srcdir); |
232 while ($f = readdir INC) { | 232 while ($f = readdir INC) { |
233 next unless $f =~ /\.h$/; | 233 next unless $f =~ /\.h$/; |
234 $mine{$f} = "\$(srcdir)/$f"; | 234 $mine{$f} = "\$(srcdir)/$f"; |
235 $deps{$f} = join(' ', &deps_for("$srcdir/$f")); | 235 $deps{$f} = join(' ', &deps_for("$srcdir/$f")); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 $c =~ s@\$\<@\$\(srcdir\)\/$f@g; | 287 $c =~ s@\$\<@\$\(srcdir\)\/$f@g; |
288 print OUT $c; | 288 print OUT $c; |
289 } | 289 } |
290 } | 290 } |
291 closedir(S); | 291 closedir(S); |
292 close(IN); | 292 close(IN); |
293 close(OUT); | 293 close(OUT); |
294 | 294 |
295 rename("$srcdir/Makefile.tmp", "$srcdir/Makefile.in"); | 295 rename("$srcdir/Makefile.tmp", "$srcdir/Makefile.in"); |
296 } | 296 } |
OLD | NEW |