RJK's `make install' patch for the Unix makefile.
[u/mdw/putty] / mkfiles.pl
CommitLineData
3d541627 1#!/usr/bin/env perl
2#
7603011f 3# Makefile generator for PuTTY.
4#
5# Reads the file `Recipe' to determine the list of generated
6# executables and their component objects. Then reads the source
7# files to compute #include dependencies. Finally, writes out the
8# various target Makefiles.
9
f7f27309 10use FileHandle;
11
7603011f 12open IN, "Recipe" or die "unable to open Recipe file\n";
13
f7f27309 14@incdirs = ("", "unix/");
15
7603011f 16$help = ""; # list of newline-free lines of help text
c282cde3 17%programs = (); # maps prog name + type letter to listref of objects/resources
7603011f 18%groups = (); # maps group name to listref of objects/resources
3d541627 19
3d541627 20while (<IN>) {
7603011f 21 # Skip comments (unless the comments belong, for example because
22 # they're part of the help text).
23 next if /^\s*#/ and !$in_help;
24
3d541627 25 chomp;
7603011f 26 split;
27 if ($_[0] eq "!begin" and $_[1] eq "help") { $in_help = 1; next; }
28 if ($_[0] eq "!end" and $in_help) { $in_help = 0; next; }
29 # If we're gathering help text, keep doing so.
30 if ($in_help) { $help .= "$_\n"; next; }
31 # Ignore blank lines.
32 next if scalar @_ == 0;
33
34 # Now we have an ordinary line. See if it's an = line, a : line
35 # or a + line.
36 @objs = @_;
37
38 if ($_[0] eq "+") {
39 $listref = $lastlistref;
40 $prog = undef;
41 die "$.: unexpected + line\n" if !defined $lastlistref;
42 } elsif ($_[1] eq "=") {
43 $groups{$_[0]} = [] if !defined $groups{$_[0]};
44 $listref = $groups{$_[0]};
45 $prog = undef;
46 shift @objs; # eat the group name
47 } elsif ($_[1] eq ":") {
c282cde3 48 $listref = [];
7603011f 49 $prog = $_[0];
50 shift @objs; # eat the program name
3d541627 51 } else {
7603011f 52 die "$.: unrecognised line type\n";
3d541627 53 }
7603011f 54 shift @objs; # eat the +, the = or the :
55
56 while (scalar @objs > 0) {
57 $i = shift @objs;
58 if ($groups{$i}) {
59 foreach $j (@{$groups{$i}}) { unshift @objs, $j; }
f7f27309 60 } elsif (($i eq "[G]" or $i eq "[C]" or $i eq "[X]") and defined $prog) {
c282cde3 61 $type = substr($i,1,1);
7603011f 62 } else {
63 push @$listref, $i;
64 }
65 }
c282cde3 66 if ($prog and $type) {
67 die "multiple program entries for $prog [$type]\n"
68 if defined $programs{$prog . "," . $type};
69 $programs{$prog . "," . $type} = $listref;
70 }
7603011f 71 $lastlistref = $listref;
3d541627 72}
7603011f 73
3d541627 74close IN;
7603011f 75
76# Now retrieve the complete list of objects and resource files, and
77# construct dependency data for them. While we're here, expand the
78# object list for each program, and complain if its type isn't set.
79@prognames = sort keys %programs;
80%depends = ();
81@scanlist = ();
82foreach $i (@prognames) {
c282cde3 83 ($prog, $type) = split ",", $i;
7603011f 84 # Strip duplicate object names.
85 $prev = undef;
86 @list = grep { $status = ($prev ne $_); $prev=$_; $status }
87 sort @{$programs{$i}};
88 $programs{$i} = [@list];
89 foreach $j (@list) {
90 # Dependencies for "x" start with "x.c".
91 # Dependencies for "x.res" start with "x.rc".
92 # Both types of file are pushed on the list of files to scan.
93 # Libraries (.lib) don't have dependencies at all.
94 if ($j =~ /^(.*)\.res$/) {
95 $file = "$1.rc";
96 $depends{$j} = [$file];
97 push @scanlist, $file;
98 } elsif ($j =~ /\.lib$/) {
99 # libraries don't have dependencies
100 } else {
101 $file = "$j.c";
102 $depends{$j} = [$file];
103 push @scanlist, $file;
104 }
105 }
106}
107
108# Scan each file on @scanlist and find further inclusions.
109# Inclusions are given by lines of the form `#include "otherfile"'
110# (system headers are automatically ignored by this because they'll
111# be given in angle brackets). Files included by this method are
112# added back on to @scanlist to be scanned in turn (if not already
113# done).
114#
115# Resource scripts (.rc) can also include a file by means of a line
116# ending `ICON "filename"'. Files included by this method are not
117# added to @scanlist because they can never include further files.
118#
119# In this pass we write out a hash %further which maps a source
120# file name into a listref containing further source file names.
121
122%further = ();
123while (scalar @scanlist > 0) {
124 $file = shift @scanlist;
125 next if defined $further{$file}; # skip if we've already done it
126 $resource = ($file =~ /\.rc$/ ? 1 : 0);
127 $further{$file} = [];
f7f27309 128 $dirfile = &findfile($file);
129 open IN, "$dirfile" or die "unable to open source file $file\n";
7603011f 130 while (<IN>) {
131 chomp;
132 /^\s*#include\s+\"([^\"]+)\"/ and do {
133 push @{$further{$file}}, $1;
134 push @scanlist, $1;
135 next;
136 };
137 /ICON\s+\"([^\"]+)\"\s*$/ and do {
138 push @{$further{$file}}, $1;
139 next;
140 }
141 }
142 close IN;
3d541627 143}
144
7603011f 145# Now we're ready to generate the final dependencies section. For
146# each key in %depends, we must expand the dependencies list by
147# iteratively adding entries from %further.
148foreach $i (keys %depends) {
149 %dep = ();
150 @scanlist = @{$depends{$i}};
151 foreach $i (@scanlist) { $dep{$i} = 1; }
152 while (scalar @scanlist > 0) {
153 $file = shift @scanlist;
154 foreach $j (@{$further{$file}}) {
155 if ($dep{$j} != 1) {
156 $dep{$j} = 1;
157 push @{$depends{$i}}, $j;
158 push @scanlist, $j;
159 }
160 }
161 }
162# printf "%s: %s\n", $i, join ' ',@{$depends{$i}};
3d541627 163}
164
7603011f 165# Utility routines while writing out the Makefiles.
166
f7f27309 167sub findfile {
168 my ($name) = @_;
169 my $dir, $i, $outdir = "";
170 $i = 0;
171 foreach $dir (@incdirs) {
172 $outdir = $dir, $i++ if -f "$dir$name";
173 }
174 die "multiple instances of source file $name\n" if $i > 1;
175 return "$outdir$name";
176}
177
7603011f 178sub objects {
f7f27309 179 my ($prog, $otmpl, $rtmpl, $ltmpl, $prefix, $dirsep) = @_;
7603011f 180 my @ret;
181 my ($i, $x, $y);
182 @ret = ();
183 foreach $i (@{$programs{$prog}}) {
f7f27309 184 $x = "";
7603011f 185 if ($i =~ /^(.*)\.res/) {
186 $y = $1;
187 ($x = $rtmpl) =~ s/X/$y/;
7603011f 188 } elsif ($i =~ /^(.*)\.lib/) {
189 $y = $1;
190 ($x = $ltmpl) =~ s/X/$y/;
7603011f 191 } else {
192 ($x = $otmpl) =~ s/X/$i/;
7603011f 193 }
f7f27309 194 push @ret, $x if $x ne "";
7603011f 195 }
196 return join " ", @ret;
3d541627 197}
198
7603011f 199sub splitline {
200 my ($line, $width) = @_;
201 my ($result, $len);
202 $len = (defined $width ? $width : 76);
203 while (length $line > $len) {
204 $line =~ /^(.{0,$len})\s(.*)$/ or $line =~ /^(.{$len,}?\s(.*)$/;
205 $result .= $1 . " \\\n\t\t";
206 $line = $2;
207 $len = 60;
208 }
209 return $result . $line;
210}
211
212sub deps {
f7f27309 213 my ($otmpl, $rtmpl, $prefix, $dirsep) = @_;
7603011f 214 my ($i, $x, $y);
f7f27309 215 my @deps;
7603011f 216 foreach $i (sort keys %depends) {
217 if ($i =~ /^(.*)\.res/) {
f7f27309 218 next if !defined $rtmpl;
7603011f 219 $y = $1;
220 ($x = $rtmpl) =~ s/X/$y/;
221 } else {
222 ($x = $otmpl) =~ s/X/$i/;
223 }
f7f27309 224 @deps = @{$depends{$i}};
225 @deps = map {
226 $_ = &findfile($_);
227 s/\//$dirsep/g;
228 $_ = $prefix . $_;
229 } @deps;
230 print &splitline(sprintf "%s: %s", $x, join " ", @deps), "\n";
7603011f 231 }
3d541627 232}
233
f7f27309 234sub prognames {
235 my ($types) = @_;
c282cde3 236 my ($n, $prog, $type);
237 my @ret;
238 @ret = ();
239 foreach $n (@prognames) {
240 ($prog, $type) = split ",", $n;
241 push @ret, $n if index($types, $type) >= 0;
242 }
243 return @ret;
244}
245
246sub progrealnames {
247 my ($types) = @_;
248 my ($n, $prog, $type);
f7f27309 249 my @ret;
250 @ret = ();
251 foreach $n (@prognames) {
c282cde3 252 ($prog, $type) = split ",", $n;
253 push @ret, $prog if index($types, $type) >= 0;
f7f27309 254 }
255 return @ret;
256}
257
c76d309d 258sub manpages {
259 my ($types,$suffix) = @_;
260
261 # assume that all UNIX programs have a man page
262 if($suffix eq "1" && $types =~ /X/) {
263 return map("$_.1", &progrealnames($types));
264 }
265 return ();
266}
267
7603011f 268# Now we're ready to output the actual Makefiles.
269
3d541627 270##-- CygWin makefile
271open OUT, ">Makefile.cyg"; select OUT;
272print
7603011f 273"# Makefile for PuTTY under cygwin.\n".
274"#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
275"# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
3d541627 276# gcc command line option is -D not /D
7603011f 277($_ = $help) =~ s/=\/D/=-D/gs;
3d541627 278print $_;
279print
280"\n".
281"# You can define this path to point at your tools if you need to\n".
282"# TOOLPATH = c:\\cygwin\\bin\\ # or similar, if you're running Windows\n".
283"# TOOLPATH = /pkg/mingw32msvc/i386-mingw32msvc/bin/\n".
284"CC = \$(TOOLPATH)gcc\n".
285"RC = \$(TOOLPATH)windres\n".
286"# You may also need to tell windres where to find include files:\n".
287"# RCINC = --include-dir c:\\cygwin\\include\\\n".
288"\n".
7603011f 289&splitline("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
290 " -DNO_SECURITY -D_NO_OLDNAMES -DNO_MULTIMON -I.")."\n".
f730b86a 291"LDFLAGS = -mno-cygwin -s\n".
7603011f 292&splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1".
293 " --define WINVER=0x0400 --define MINGW32_FIX=1")."\n".
3d541627 294"\n".
295".SUFFIXES:\n".
296"\n".
201e9294 297"%.o: %.c\n".
cf03419b 298"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n".
3d541627 299"\n".
f730b86a 300"%.res.o: %.rc\n".
6ed3635b 301"\t\$(RC) \$(FWHACK) \$(RCFL) \$(RCFLAGS) \$< \$\@\n".
3d541627 302"\n";
c282cde3 303print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("GC"));
14232990 304print "\n\n";
f7f27309 305foreach $p (&prognames("GC")) {
c282cde3 306 ($prog, $type) = split ",", $p;
7603011f 307 $objstr = &objects($p, "X.o", "X.res.o", undef);
c282cde3 308 print &splitline($prog . ".exe: " . $objstr), "\n";
309 my $mw = $type eq "G" ? " -mwindows" : "";
7603011f 310 $libstr = &objects($p, undef, undef, "-lX");
311 print &splitline("\t\$(CC)" . $mw . " \$(LDFLAGS) -o \$@ " .
312 $objstr . " $libstr", 69), "\n\n";
3d541627 313}
8fd3bdc4 314&deps("X.o", "X.res.o", "", "/");
3d541627 315print
316"\n".
74091dff 317"version.o: FORCE;\n".
3d541627 318"# Hack to force version.o to be rebuilt always\n".
319"FORCE:\n".
7603011f 320"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c version.c\n".
3d541627 321"clean:\n".
7603011f 322"\trm -f *.o *.exe *.res.o\n".
3d541627 323"\n";
324select STDOUT; close OUT;
325
326##-- Borland makefile
7603011f 327%stdlibs = ( # Borland provides many Win32 API libraries intrinsically
328 "advapi32" => 1,
329 "comctl32" => 1,
330 "comdlg32" => 1,
331 "gdi32" => 1,
332 "imm32" => 1,
333 "shell32" => 1,
334 "user32" => 1,
335 "winmm" => 1,
336 "winspool" => 1,
337 "wsock32" => 1,
338);
3d541627 339open OUT, ">Makefile.bor"; select OUT;
340print
7603011f 341"# Makefile for PuTTY under Borland C.\n".
342"#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
343"# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
3d541627 344# bcc32 command line option is -D not /D
7603011f 345($_ = $help) =~ s/=\/D/=-D/gs;
3d541627 346print $_;
347print
348"\n".
349"# If you rename this file to `Makefile', you should change this line,\n".
350"# so that the .rsp files still depend on the correct makefile.\n".
351"MAKEFILE = Makefile.bor\n".
352"\n".
a401e5f3 353"# C compilation flags\n".
354"CFLAGS = -DWINVER=0x0401\n".
355"\n".
3d541627 356"# Get include directory for resource compiler\n".
357"!if !\$d(BCB)\n".
358"BCB = \$(MAKEDIR)\\..\n".
359"!endif\n".
360"\n".
361".c.obj:\n".
8aa5bfd9 362&splitline("\tbcc32 -w-aus -w-ccc -w-par -w-pia \$(COMPAT) \$(FWHACK)".
7603011f 363 " \$(XFLAGS) \$(CFLAGS) /c \$*.c",69)."\n".
3d541627 364".rc.res:\n".
7603011f 365&splitline("\tbrcc32 \$(FWHACK) \$(RCFL) -i \$(BCB)\\include -r".
366 " -DNO_WINRESRC_H -DWIN32 -D_WIN32 -DWINVER=0x0401 \$*.rc",69)."\n".
3d541627 367"\n";
c282cde3 368print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("GC"));
3d541627 369print "\n\n";
f7f27309 370foreach $p (&prognames("GC")) {
c282cde3 371 ($prog, $type) = split ",", $p;
7603011f 372 $objstr = &objects($p, "X.obj", "X.res", undef);
c282cde3 373 print &splitline("$prog.exe: " . $objstr . " $prog.rsp"), "\n";
374 my $ap = ($type eq "G") ? "-aa" : "-ap";
375 print "\tilink32 $ap -Gn -L\$(BCB)\\lib \@$prog.rsp\n\n";
3d541627 376}
f7f27309 377foreach $p (&prognames("GC")) {
c282cde3 378 ($prog, $type) = split ",", $p;
379 print $prog, ".rsp: \$(MAKEFILE)\n";
7603011f 380 $objstr = &objects($p, "X.obj", undef, undef);
381 @objlist = split " ", $objstr;
382 @objlines = ("");
383 foreach $i (@objlist) {
384 if (length($objlines[$#objlines] . " $i") > 50) {
385 push @objlines, "";
386 }
387 $objlines[$#objlines] .= " $i";
388 }
c282cde3 389 $c0w = ($type eq "G") ? "c0w32" : "c0x32";
390 print "\techo $c0w + > $prog.rsp\n";
a7088bde 391 for ($i=0; $i<=$#objlines; $i++) {
392 $plus = ($i < $#objlines ? " +" : "");
c282cde3 393 print "\techo$objlines[$i]$plus >> $prog.rsp\n";
3d541627 394 }
c282cde3 395 print "\techo $prog.exe >> $prog.rsp\n";
7603011f 396 $objstr = &objects($p, "X.obj", "X.res", undef);
397 @libs = split " ", &objects($p, undef, undef, "X");
398 @libs = grep { !$stdlibs{$_} } @libs;
6d2d5e8d 399 unshift @libs, "cw32", "import32";
400 $libstr = join ' ', @libs;
c282cde3 401 print "\techo nul,$libstr, >> $prog.rsp\n";
402 print "\techo " . &objects($p, undef, "X.res", undef) . " >> $prog.rsp\n";
3d541627 403 print "\n";
404}
f7f27309 405&deps("X.obj", "X.res", "", "\\");
3d541627 406print
407"\n".
408"version.o: FORCE\n".
409"# Hack to force version.o to be rebuilt always\n".
410"FORCE:\n".
411"\tbcc32 \$(FWHACK) \$(VER) \$(CFLAGS) /c version.c\n\n".
412"clean:\n".
2e792012 413"\t-del *.obj\n".
414"\t-del *.exe\n".
415"\t-del *.res\n".
416"\t-del *.pch\n".
417"\t-del *.aps\n".
418"\t-del *.il*\n".
419"\t-del *.pdb\n".
420"\t-del *.rsp\n".
421"\t-del *.tds\n".
422"\t-del *.\$\$\$\$\$\$\n";
3d541627 423select STDOUT; close OUT;
7603011f 424
425##-- Visual C++ makefile
426open OUT, ">Makefile.vc"; select OUT;
427print
428"# Makefile for PuTTY under Visual C.\n".
429"#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
430"# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
431print $help;
432print
433"\n".
434"# If you rename this file to `Makefile', you should change this line,\n".
435"# so that the .rsp files still depend on the correct makefile.\n".
436"MAKEFILE = Makefile.vc\n".
437"\n".
438"# C compilation flags\n".
439"CFLAGS = /nologo /W3 /O1 /D_WINDOWS /D_WIN32_WINDOWS=0x401 /DWINVER=0x401\n".
440"LFLAGS = /incremental:no /fixed\n".
441"\n".
442".c.obj:\n".
443"\tcl \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) /c \$*.c\n".
444".rc.res:\n".
445"\trc \$(FWHACK) \$(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 \$*.rc\n".
446"\n";
c282cde3 447print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("GC"));
7603011f 448print "\n\n";
f7f27309 449foreach $p (&prognames("GC")) {
c282cde3 450 ($prog, $type) = split ",", $p;
7603011f 451 $objstr = &objects($p, "X.obj", "X.res", undef);
c282cde3 452 print &splitline("$prog.exe: " . $objstr . " $prog.rsp"), "\n";
453 print "\tlink \$(LFLAGS) -out:$prog.exe -map:$prog.map \@$prog.rsp\n\n";
7603011f 454}
f7f27309 455foreach $p (&prognames("GC")) {
c282cde3 456 ($prog, $type) = split ",", $p;
457 print $prog, ".rsp: \$(MAKEFILE)\n";
7603011f 458 $objstr = &objects($p, "X.obj", "X.res", "X.lib");
459 @objlist = split " ", $objstr;
460 @objlines = ("");
461 foreach $i (@objlist) {
462 if (length($objlines[$#objlines] . " $i") > 50) {
463 push @objlines, "";
464 }
465 $objlines[$#objlines] .= " $i";
466 }
c282cde3 467 $subsys = ($type eq "G") ? "windows" : "console";
468 print "\techo /nologo /subsystem:$subsys > $prog.rsp\n";
7603011f 469 for ($i=0; $i<=$#objlines; $i++) {
c282cde3 470 print "\techo$objlines[$i] >> $prog.rsp\n";
7603011f 471 }
472 print "\n";
473}
f7f27309 474&deps("X.obj", "X.res", "", "\\");
7603011f 475print
476"\n".
477"# Hack to force version.o to be rebuilt always\n".
478"version.obj: *.c *.h *.rc\n".
479"\tcl \$(FWHACK) \$(VER) \$(CFLAGS) /c version.c\n\n".
480"clean: tidy\n".
481"\t-del *.exe\n\n".
482"tidy:\n".
483"\t-del *.obj\n".
484"\t-del *.res\n".
485"\t-del *.pch\n".
486"\t-del *.aps\n".
487"\t-del *.ilk\n".
488"\t-del *.pdb\n".
489"\t-del *.rsp\n".
490"\t-del *.dsp\n".
491"\t-del *.dsw\n".
492"\t-del *.ncb\n".
493"\t-del *.opt\n".
494"\t-del *.plg\n".
495"\t-del *.map\n".
496"\t-del *.idb\n".
497"\t-del debug.log\n";
498select STDOUT; close OUT;
f7f27309 499
500##-- X/GTK/Unix makefile
501open OUT, ">unix/Makefile.gtk"; select OUT;
502print
503"# Makefile for PuTTY under X/GTK and Unix.\n".
504"#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
505"# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
506# gcc command line option is -D not /D
507($_ = $help) =~ s/=\/D/=-D/gs;
508print $_;
509print
510"\n".
511"# You can define this path to point at your tools if you need to\n".
512"# TOOLPATH = /opt/gcc/bin\n".
513"CC = \$(TOOLPATH)cc\n".
514"\n".
1709795f 515&splitline("CFLAGS = -Wall -g -I. -I.. `gtk-config --cflags`")."\n".
516"LDFLAGS = `gtk-config --libs`\n".
c76d309d 517"INSTALL=install\n",
518"INSTALL_PROGRAM=\$(INSTALL)\n",
519"INSTALL_DATA=\$(INSTALL)\n",
520"prefix=/usr/local\n",
521"exec_prefix=\$(prefix)\n",
522"bindir=\$(exec_prefix)/bin\n",
523"mandir=\$(prefix)/man\n",
524"man1dir=\$(mandir)/man1\n",
f7f27309 525"\n".
526".SUFFIXES:\n".
527"\n".
1709795f 528"%.o:\n".
f7f27309 529"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n".
530"\n";
c282cde3 531print &splitline("all:" . join "", map { " $_" } &progrealnames("X"));
f7f27309 532print "\n\n";
533foreach $p (&prognames("X")) {
c282cde3 534 ($prog, $type) = split ",", $p;
f7f27309 535 $objstr = &objects($p, "X.o", undef, undef);
c282cde3 536 print &splitline($prog . ": " . $objstr), "\n";
f7f27309 537 $libstr = &objects($p, undef, undef, "-lX");
538 print &splitline("\t\$(CC)" . $mw . " \$(LDFLAGS) -o \$@ " .
539 $objstr . " $libstr", 69), "\n\n";
540}
541&deps("X.o", undef, "../", "/");
542print
543"\n".
544"version.o: FORCE;\n".
545"# Hack to force version.o to be rebuilt always\n".
546"FORCE:\n".
c282cde3 547"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c ../version.c\n".
f7f27309 548"clean:\n".
c282cde3 549"\trm -f *.o". (join "", map { " $_" } &progrealnames("X")) . "\n".
c76d309d 550"\n",
551"install:\n",
552map("\t\$(INSTALL_PROGRAM) -m 755 $_ \$(bindir)/$_\n", &progrealnames("X")),
553map("\t\$(INSTALL_DATA) -m 644 $_ \$(man1dir)/$_\n", &manpages("X", "1")),
554"\n",
555"install-strip:\n",
556"\t\$(MAKE) install INSTALL_PROGRAM=\"\$(INSTALL_PROGRAM) -s\"\n",
f7f27309 557"\n";
558select STDOUT; close OUT;