@set fnord $$MAKEFLAGS; amf=$$2; \
target=`echo $@ | sed -e 's|^.*-||'`; \
modname=`echo $@ | sed -e 's|-.*||'`; \
- confmoddir=`cat $(switch_builddir)/modules.conf | grep $$modname$$ | sed -e 's|#||' `; \
+ confmoddir=`cat $(switch_builddir)/modules.conf | grep $$modname | sed -e 's|#||' | sed -e 's| ||' `; \
if test -z "$$confmoddir" ; then moddir=$@ ; else \
if test -d "$(switch_srcdir)/src/mod/$$confmoddir" ; then \
moddir="$(switch_srcdir)/src/mod/$$confmoddir" ; else \
if test -z "$$target" ; then target="all" ; fi ; \
echo ;\
echo making $$target $$modname ;\
- (if test -f $$moddir/Makefile ; then \
+ (if test -f "$$moddir/Makefile" ; then \
cd $$moddir && MODNAME=$$modname BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) $$target; else\
cd $$moddir && MODNAME=$$modname BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules $$target ;\
fi;)\