# HG changeset patch # User Matti Hamalainen # Date 1394639449 -7200 # Node ID 00e673963d35fe55a3761353276ea8a7ba48c69c # Parent d42517381b86a2461576f5ab05a086eb2c2fc66c More cleanups and improvements in building script. diff -r d42517381b86 -r 00e673963d35 tools/makegmaps.php --- a/tools/makegmaps.php Wed Mar 12 17:20:59 2014 +0200 +++ b/tools/makegmaps.php Wed Mar 12 17:50:49 2014 +0200 @@ -4,6 +4,7 @@ // Paths and files $binConvert = "convert"; $binMercurial = "hg"; +$binMake = "make"; $pathMapUtils = "maputils/"; $pathImageCache = "cache/"; @@ -34,7 +35,7 @@ $continentJS = $pathMarkerData."continents.js"; $tradelaneOut = $pathMarkerData."tradelane.json"; $tradelaneOverlay = $pathMarkerData."trlines.json"; -$mkloc = $pathMapUtils."mkloc"; +$binMkLoc = $pathMapUtils."mkloc"; $modes = array( "xml" => array("batclient.xml" , 0, 0), @@ -182,18 +183,18 @@ passthru($tmp) == 0 or die("Error executing: ".$tmp."\n"); } -$tmp = "cd ".escapeshellarg($pathMapUtils)." && make"; +$tmp = "cd ".escapeshellarg($pathMapUtils)." && ".$binMake." ".escapeshellarg(basename($binMkLoc)); echo "* $tmp\n"; passthru($tmp) == 0 or die("Error executing: ".$tmp."\n"); -if (!file_exists($mkloc)) - die($mkloc." not found. Maputils package not built, or some other error occured.\n"); +if (!file_exists($binMkLoc)) + die($binMkLoc." not found. Maputils package not built, or some other error occured.\n"); -$tmp = "cd ".escapeshellarg($pathMapUtils)." && make"; +$tmp = "cd ".escapeshellarg($pathMapUtils)." && ".$binMake; passthru($tmp) == 0 or die("Error executing: ".$tmp."\n"); -$tmp = "cd ".escapeshellarg($pathRawMaps)." && make fetch 2> /dev/null"; +$tmp = "cd ".escapeshellarg($pathRawMaps)." && ".$binMake." fetch 2> /dev/null"; passthru($tmp) == 0 or die("Error executing: ".$tmp."\n"); @@ -235,7 +236,7 @@ foreach ($modes as $mode => $mdata) { - $tmp = escapeshellcmd($mkloc)." -v -o ".escapeshellarg($pathMarkerData.$mdata[0])." -G ".$mode." "; + $tmp = escapeshellcmd($binMkLoc)." -v -o ".escapeshellarg($pathMarkerData.$mdata[0])." -G ".$mode." "; foreach ($continentList as $name => $data) {