Browse Source

squawk if attached to wrong DIRECT

David Rose 21 years ago
parent
commit
50f0ebf987
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/Package.pp

+ 3 - 0
direct/Package.pp

@@ -40,6 +40,9 @@
   #if $[eq $[DIRECT],]
   #if $[eq $[DIRECT],]
     #error You seem to be attached to some trees, but not DIRECT!
     #error You seem to be attached to some trees, but not DIRECT!
   #endif
   #endif
+  #if $[ne $[canonical $[DIRECT]], $[canonical $[TOPDIR]]]
+    #error You are not attached to the right DIRECT!
+  #endif
 #else
 #else
   #defer DIRECT_INSTALL $[unixfilename $[INSTALL_DIR]]
   #defer DIRECT_INSTALL $[unixfilename $[INSTALL_DIR]]
   #defer DIRECT_INSTALL_OTHER $[unixfilename $[INSTALL_DIR]]
   #defer DIRECT_INSTALL_OTHER $[unixfilename $[INSTALL_DIR]]