# OSL script includes and reuse

Is it possible to include one OSL file in another so I can use the functions from it or must I copy and paste everything every time I want to reuse it?

OSL seems to have #include functionality, but is there a way to use it for script files within Blender?

(I'm using internal script files, but I can change if that helps.)

The OSL compiler takes a shader file as input, and seems to use the directory of that file as a base for further includes. It also looks in the \scripts\addons\cycles\shader directory.
If internal scripts are used, the script being compiled is moved by itself to a temporary directory, given a random name, and deleted afterwards. This means that internal scripts cannot use #includes unless the included files are placed in the \scripts\addons\cycles\shader directory.