BLD Add DISTDIR variable. ### Description

Adds `DISTDIR` env variable that points to the directory where libraries should be copied to when building shared libraries with recipe.

### Checklists

- [x] Add new / update outdated documentation

package:
  name: sharedlib-test
  version: "1.0"
  tag:
    - pyodide.test

source:
  path: src

build:
  type: shared_library
  script: |
    emcc -c main.c -o main.o ${SIDE_MODULE_CFLAGS}
    emcc -c dep.c -o dep.o ${SIDE_MODULE_CFLAGS}
    emcc -c dep2.c -o dep2.o ${SIDE_MODULE_CFLAGS}

    mkdir -p dist
    emcc dep2.o ${SIDE_MODULE_LDFLAGS} -o dist/sharedlib-test-dep2.so
    emcc dep.o ${SIDE_MODULE_LDFLAGS} dist/sharedlib-test-dep2.so -o dist/sharedlib-test-dep.so
    emcc main.o ${SIDE_MODULE_LDFLAGS} dist/sharedlib-test-dep.so -o dist/sharedlib-test.so

package:
  name: sharedlib-test
  version: "1.0"
  tag:
    - pyodide.test

source:
  path: src

build:
  type: shared_library
  script: |
    emcc -c main.c -o main.o ${SIDE_MODULE_CFLAGS}
    emcc -c dep.c -o dep.o ${SIDE_MODULE_CFLAGS}
    emcc -c dep2.c -o dep2.o ${SIDE_MODULE_CFLAGS}

    emcc dep2.o ${SIDE_MODULE_LDFLAGS} -o ${DISTDIR}/sharedlib-test-dep2.so
    emcc dep.o ${SIDE_MODULE_LDFLAGS} ${DISTDIR}/sharedlib-test-dep2.so -o ${DISTDIR}/sharedlib-test-dep.so
    emcc main.o ${SIDE_MODULE_LDFLAGS} ${DISTDIR}/sharedlib-test-dep.so -o ${DISTDIR}/sharedlib-test.so
