Browse Source

add PPREMAKE_PLATFORM

cxgeorge 23 years ago
parent
commit
2ce1184353
1 changed files with 8 additions and 2 deletions
  1. 8 2
      ppremake/ppremake.cxx

+ 8 - 2
ppremake/ppremake.cxx

@@ -98,7 +98,7 @@ report_version() {
 
 
 static void
 static void
 report_platform() {
 report_platform() {
-  cerr << "ppremake built for platform " << PLATFORM << ".\n";
+  cerr << "ppremake built for default platform " << PLATFORM << ".\n";
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -216,7 +216,13 @@ main(int argc, char *argv[]) {
   bool dependencies_stale = false;
   bool dependencies_stale = false;
   bool report_depends = false;
   bool report_depends = false;
   bool report_reverse_depends = false;
   bool report_reverse_depends = false;
-  string platform = PLATFORM;
+
+  string platform;
+  char *platform_env = getenv("PPREMAKE_PLATFORM");
+  if(platform_env==NULL) 
+     platform=PLATFORM;
+    else platform=platform_env;
+
   string ppremake_config;
   string ppremake_config;
   bool got_ppremake_config = false;
   bool got_ppremake_config = false;
   string sed_command;
   string sed_command;