Package.pp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // Package.pp
  3. //
  4. // This file defines certain configuration variables that are to be
  5. // written into the various make scripts. It is processed by ppremake
  6. // (along with the Sources.pp files in each of the various
  7. // directories) to generate build scripts appropriate to each
  8. // environment.
  9. //
  10. // This is the package-specific file, which should be at the top of
  11. // every source hierarchy. It generally gets the ball rolling, and is
  12. // responsible for explicitly including all of the relevent Config.pp
  13. // files.
  14. // Check the version of ppremake in use. This is temporary until
  15. // everyone gets up to at least 0.50. After that, the test in dtool
  16. // will suffice.
  17. #if $[not $[>= $[PPREMAKE_VERSION],0.50]]
  18. #error You need at least ppremake version 0.50 to process this tree.
  19. #endif
  20. // What is the name and version of this source tree?
  21. #if $[eq $[PACKAGE],]
  22. #define PACKAGE panda
  23. #define VERSION 0.80
  24. #endif
  25. // Where should we find the DTOOL source directory?
  26. #if $[or $[CTPROJS],$[DTOOL]]
  27. // If we are presently attached, use the environment variable.
  28. #define DTOOL_SOURCE $[DTOOL]
  29. #if $[eq $[DTOOL],]
  30. #error You seem to be attached to some trees, but not DTOOL!
  31. #endif
  32. #else
  33. // Otherwise, if we are not attached, we guess that the source is a
  34. // sibling directory to this source root.
  35. #define DTOOL_SOURCE $[standardize $[TOPDIR]/../dtool]
  36. #endif
  37. // Where should we install PANDA?
  38. #if $[or $[CTPROJS],$[PANDA]]
  39. #define PANDA_INSTALL $[PANDA]
  40. #define PANDA_INSTALL_OTHER $(PANDA)
  41. #if $[eq $[PANDA],]
  42. #error You seem to be attached to some trees, but not PANDA!
  43. #endif
  44. #else
  45. #defer PANDA_INSTALL $[INSTALL_DIR]
  46. #defer PANDA_INSTALL_OTHER $[INSTALL_DIR]
  47. #endif
  48. // Define the inter-tree dependencies.
  49. #define NEEDS_TREES $[NEEDS_TREES] dtool
  50. // Also get the DTOOL Package file and everything that includes.
  51. #if $[not $[isfile $[DTOOL_SOURCE]/Package.pp]]
  52. #error DTOOL source directory not found! Are you attached properly?
  53. #endif
  54. #include $[DTOOL_SOURCE]/Package.pp