From 7f94730a78695eac32eb9b16beffa0371d9498c1 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 4 Jun 2004 15:44:06 +0000 Subject: [PATCH] fix INSTALL_DIR --- ppremake/config_msvc.h | 2 +- ppremake/configure.in | 2 +- ppremake/ppScope.cxx | 4 ++-- ppremake/ppremake.cxx | 17 +++++++---------- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/ppremake/config_msvc.h b/ppremake/config_msvc.h index 92b8367836..76083e6370 100644 --- a/ppremake/config_msvc.h +++ b/ppremake/config_msvc.h @@ -80,7 +80,7 @@ #define PACKAGE "ppremake" /* The default value of INSTALL_DIR within ppremake. */ -#define INSTALL_DIR C:\\Panda3d +#define INSTALL_DIR "C:\\Panda3d" /**************** UPDATE VERSION NUMBER HERE **************** ** Also be sure to change the version number ** diff --git a/ppremake/configure.in b/ppremake/configure.in index 4cf0651428..86d055824c 100644 --- a/ppremake/configure.in +++ b/ppremake/configure.in @@ -20,7 +20,7 @@ AC_CANONICAL_HOST if test "${CXXFLAGS+set}" != set -a "${CFLAGS+set}" = set; then CXXFLAGS=$CFLAGS fi -CPPFLAGS="${CPPFLAGS} -DINSTALL_DIR="'$(prefix)' +CPPFLAGS="${CPPFLAGS} -DINSTALL_DIR='\""'$(prefix)'"\"'" # Save these variables for later, so we can easily append to them or # change them. diff --git a/ppremake/ppScope.cxx b/ppremake/ppScope.cxx index 881f687fb7..3ed925a938 100644 --- a/ppremake/ppScope.cxx +++ b/ppremake/ppScope.cxx @@ -1683,7 +1683,7 @@ expand_standardize(const string ¶ms) { } filename.standardize(); - return filename; + return filename.get_fullpath(); } @@ -1704,7 +1704,7 @@ string PPScope:: expand_canonical(const string ¶ms) { Filename filename = trim_blanks(expand_string(params)); filename.make_canonical(); - return filename; + return filename.get_fullpath(); } //////////////////////////////////////////////////////////////////// diff --git a/ppremake/ppremake.cxx b/ppremake/ppremake.cxx index ae0d0e0cea..0b38a47c33 100644 --- a/ppremake/ppremake.cxx +++ b/ppremake/ppremake.cxx @@ -10,7 +10,11 @@ #include "tokenize.h" #include "sedProcess.h" -#ifdef HAVE_GETOPT +#ifdef HAVE_UNISTD_H + #include +#endif + +#if HAVE_GETOPT #ifdef HAVE_GETOPT_H #include #endif // HAVE_GETOPT_H @@ -18,18 +22,12 @@ #include "gnu_getopt.h" #endif // HAVE_GETOPT -#ifdef HAVE_UNISTD_H - #include -#endif - #include #include #include #include #include -#define STRINGIZE(x) #x - bool unix_platform = false; bool windows_platform = false; bool dry_run = false; @@ -108,8 +106,7 @@ report_version() { static void 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 @@ -353,7 +350,7 @@ main(int argc, char *argv[]) { global_scope.define_variable("PLATFORM", platform); global_scope.define_variable("PACKAGE_FILENAME", PACKAGE_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 this came in on the command line, define a variable as such.