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