Changeset 2233 for code/branches/buildsystem/src/tolua/lua
- Timestamp:
- Nov 19, 2008, 8:39:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem/src/tolua/lua/package.lua
r2229 r2233 277 277 end 278 278 279 -- prepare working directory 280 local current_path 281 if not flags.w and flags.f then 282 current_path = gsub(flags.f, '(/)[^/]*%.?[^/]*$', '%1') 283 elseif flags.w then 284 if not (string.sub(flags.w, string.len(flags.w)) == '/') then 285 current_path = flags.w..'/' 286 else 287 current_path = flags.w 288 end 289 else 290 current_path = '' 291 end 292 279 293 -- deal with include directive 280 294 local nsubst … … 283 297 function (kind,fn,extra) 284 298 local _, _, ext = strfind(fn,".*%.(.*)$") 285 local fp,msg = openfile( fn,'r')299 local fp,msg = openfile(current_path..fn,'r') 286 300 if not fp then 287 301 error('#'..msg..': '..fn)
Note: See TracChangeset
for help on using the changeset viewer.