Răsfoiți Sursa

*** empty log message ***

David Rose 25 ani în urmă
părinte
comite
ff199787ff
2 a modificat fișierele cu 8 adăugiri și 2 ștergeri
  1. 1 1
      ppremake/configure.in
  2. 7 1
      ppremake/ppScope.cxx

+ 1 - 1
ppremake/configure.in

@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(ppremake.cxx)
-AM_INIT_AUTOMAKE(ppremake, 0.57)
+AM_INIT_AUTOMAKE(ppremake, 0.58)
 AM_CONFIG_HEADER(config.h)
 
 AC_PREFIX_DEFAULT(/usr/local/panda)

+ 7 - 1
ppremake/ppScope.cxx

@@ -2703,10 +2703,13 @@ expand_dependencies(const string &params) {
   vector<string> filenames;
   tokenize_whitespace(expand_string(params), filenames);
 
+  PPDirectory *directory = get_directory();
+  assert(directory != (PPDirectory *)NULL);
+
   vector<string> results;
   vector<string>::const_iterator fi;
   for (fi = filenames.begin(); fi != filenames.end(); ++fi) {
-    PPDependableFile *file = _directory->get_dependable_file(*fi, false);
+    PPDependableFile *file = directory->get_dependable_file(*fi, false);
     assert(file != (PPDependableFile *)NULL);
 
     vector<PPDependableFile *> files;
@@ -2722,6 +2725,9 @@ expand_dependencies(const string &params) {
     }
   }
 
+  sort(results.begin(), results.end());
+  results.erase(unique(results.begin(), results.end()), results.end());
+
   string result = repaste(results, " ");
   return result;
 }