aboutsummaryrefslogtreecommitdiff
path: root/mkfiles.pl
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2012-08-17 19:58:53 +0000
committerSimon Tatham <anakin@pobox.com>2012-08-17 19:58:53 +0000
commit15a4fbd1cdc2cc092bafe85b8ddd8b392bdbda7d (patch)
treea46f91b5f5cea352039ab72d07e41297553b824c /mkfiles.pl
parent200d6533bb315e5f69f926d15724016132cf6232 (diff)
downloadpuzzles-15a4fbd1cdc2cc092bafe85b8ddd8b392bdbda7d.zip
puzzles-15a4fbd1cdc2cc092bafe85b8ddd8b392bdbda7d.tar.gz
puzzles-15a4fbd1cdc2cc092bafe85b8ddd8b392bdbda7d.tar.bz2
puzzles-15a4fbd1cdc2cc092bafe85b8ddd8b392bdbda7d.tar.xz
For the convenience of Linux package maintainers, add to Makefile.gtk
and Makefile.doc a command-line parameter 'BINPREFIX' which will be prepended to all the game binary names. E.g. 'make BINPREFIX=sgt-' and 'make BINPREFIX=sgt- install', and correspondingly 'make -f Makefile.doc BINPREFIX=sgt-'. Also included in this commit by mistake, changes to singles.c to add \n to the end of all its debug() statements. I meant to commit that separately. Oops. [originally from svn r9606]
Diffstat (limited to 'mkfiles.pl')
-rwxr-xr-xmkfiles.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/mkfiles.pl b/mkfiles.pl
index d42943c..625b9ab 100755
--- a/mkfiles.pl
+++ b/mkfiles.pl
@@ -1130,12 +1130,13 @@ if (defined $makefiles{'gtk'}) {
"mandir=\$(prefix)/man\n",
"man1dir=\$(mandir)/man1\n",
"\n";
- print &splitline("all:" . join "", map { " $_" } &progrealnames("X:U"));
+ print &splitline("all:" . join "", map { " \$(BINPREFIX)$_" }
+ &progrealnames("X:U"));
print "\n\n";
foreach $p (&prognames("X:U")) {
($prog, $type) = split ",", $p;
$objstr = &objects($p, "X.o", undef, undef);
- print &splitline($prog . ": " . $objstr), "\n";
+ print &splitline("\$(BINPREFIX)" . $prog . ": " . $objstr), "\n";
$libstr = &objects($p, undef, undef, "-lX");
print &splitline("\t\$(CC) -o \$@ $objstr $libstr \$(XLFLAGS) \$(${type}LIBS)", 69),
"\n\n";
@@ -1150,7 +1151,7 @@ if (defined $makefiles{'gtk'}) {
print "\n";
print $makefile_extra{'gtk'} || "";
print "\nclean:\n".
- "\trm -f *.o". (join "", map { " $_" } &progrealnames("X:U")) . "\n";
+ "\trm -f *.o". (join "", map { " \$(BINPREFIX)$_" } &progrealnames("X:U")) . "\n";
select STDOUT; close OUT;
}