Browse Source

fix INSTALL_DIR

David Rose 21 years ago
parent
commit
7f94730a78
4 changed files with 11 additions and 14 deletions
  1. 1 1
      ppremake/config_msvc.h
  2. 1 1
      ppremake/configure.in
  3. 2 2
      ppremake/ppScope.cxx
  4. 7 10
      ppremake/ppremake.cxx

+ 1 - 1
ppremake/config_msvc.h

@@ -80,7 +80,7 @@
 #define PACKAGE "ppremake"
 #define PACKAGE "ppremake"
 
 
 /* The default value of INSTALL_DIR within ppremake. */
 /* The default value of INSTALL_DIR within ppremake. */
-#define INSTALL_DIR C:\\Panda3d
+#define INSTALL_DIR "C:\\Panda3d"
 
 
 /****************  UPDATE VERSION NUMBER HERE  ****************
 /****************  UPDATE VERSION NUMBER HERE  ****************
  **         Also be sure to change the version number        **
  **         Also be sure to change the version number        **

+ 1 - 1
ppremake/configure.in

@@ -20,7 +20,7 @@ AC_CANONICAL_HOST
 if test "${CXXFLAGS+set}" != set -a "${CFLAGS+set}" = set; then
 if test "${CXXFLAGS+set}" != set -a "${CFLAGS+set}" = set; then
   CXXFLAGS=$CFLAGS
   CXXFLAGS=$CFLAGS
 fi
 fi
-CPPFLAGS="${CPPFLAGS} -DINSTALL_DIR="'$(prefix)'
+CPPFLAGS="${CPPFLAGS} -DINSTALL_DIR='\""'$(prefix)'"\"'"
 
 
 # Save these variables for later, so we can easily append to them or
 # Save these variables for later, so we can easily append to them or
 # change them.
 # change them.

+ 2 - 2
ppremake/ppScope.cxx

@@ -1683,7 +1683,7 @@ expand_standardize(const string &params) {
   }
   }
 
 
   filename.standardize();
   filename.standardize();
-  return filename;
+  return filename.get_fullpath();
 }
 }
 
 
 
 
@@ -1704,7 +1704,7 @@ string PPScope::
 expand_canonical(const string &params) {
 expand_canonical(const string &params) {
   Filename filename = trim_blanks(expand_string(params));
   Filename filename = trim_blanks(expand_string(params));
   filename.make_canonical();
   filename.make_canonical();
-  return filename;
+  return filename.get_fullpath();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 7 - 10
ppremake/ppremake.cxx

@@ -10,7 +10,11 @@
 #include "tokenize.h"
 #include "tokenize.h"
 #include "sedProcess.h"
 #include "sedProcess.h"
 
 
-#ifdef HAVE_GETOPT
+#ifdef HAVE_UNISTD_H
+  #include <unistd.h>
+#endif
+
+#if HAVE_GETOPT
   #ifdef HAVE_GETOPT_H
   #ifdef HAVE_GETOPT_H
     #include <getopt.h>
     #include <getopt.h>
   #endif  // HAVE_GETOPT_H
   #endif  // HAVE_GETOPT_H
@@ -18,18 +22,12 @@
   #include "gnu_getopt.h"
   #include "gnu_getopt.h"
 #endif  // HAVE_GETOPT
 #endif  // HAVE_GETOPT
 
 
-#ifdef HAVE_UNISTD_H
-  #include <unistd.h>
-#endif
-
 #include <set>
 #include <set>
 #include <vector>
 #include <vector>
 #include <algorithm>
 #include <algorithm>
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <assert.h>
 #include <assert.h>
 
 
-#define STRINGIZE(x) #x
-
 bool unix_platform = false;
 bool unix_platform = false;
 bool windows_platform = false;
 bool windows_platform = false;
 bool dry_run = false;
 bool dry_run = false;
@@ -108,8 +106,7 @@ report_version() {
 
 
 static void
 static void
 report_install_dir() {
 report_install_dir() {
-  cerr << "Default value for INSTALL_DIR is "
-       << STRINGIZE(INSTALL_DIR) << ".\n";
+  cerr << "Default value for INSTALL_DIR is " << INSTALL_DIR << ".\n";
 }
 }
 
 
 static void
 static void
@@ -353,7 +350,7 @@ main(int argc, char *argv[]) {
   global_scope.define_variable("PLATFORM", platform);
   global_scope.define_variable("PLATFORM", platform);
   global_scope.define_variable("PACKAGE_FILENAME", PACKAGE_FILENAME);
   global_scope.define_variable("PACKAGE_FILENAME", PACKAGE_FILENAME);
   global_scope.define_variable("SOURCE_FILENAME", SOURCE_FILENAME);
   global_scope.define_variable("SOURCE_FILENAME", SOURCE_FILENAME);
-  global_scope.define_variable("INSTALL_DIR", STRINGIZE(INSTALL_DIR));
+  global_scope.define_variable("INSTALL_DIR", INSTALL_DIR);
 
 
   if (got_ppremake_config) {
   if (got_ppremake_config) {
     // If this came in on the command line, define a variable as such.
     // If this came in on the command line, define a variable as such.