That code doesn't work on Windows, sed complains because of the paths containing `\`.
Do you have any chance to run it on Windows ?

I've made it work with this code:
```
GAIA_APPDIRS=$(shell while read LINE; do \ 
  if [ "$${LINE: -1}" = "*" ]; then \
		srcdir="`echo "$$LINE" | sed 's/.\{2\}$$//'`"; \
		[ -d $(CURDIR)$(SEP)$$srcdir ] && find $(CURDIR)$(SEP)$$srcdir -mindepth 1 -maxdepth 1 -type d | sed 's@[/\\]@$(SEP)$(SEP)@'; \
		[ -d $(GAIA_DISTRIBUTION_DIR)$(SEP)$$srcdir ] && find $(GAIA_DISTRIBUTION_DIR)$(SEP)$$srcdir -mindepth 1 -maxdepth 1 -type d | sed 's@[/\\]@$(SEP)$(SEP)@'; \
```

But then, it fails for test-agent rules and I wasn't to fix that.