+MAKE_TARGETS = config deb diff dist distclean doc release po \
+po-replace po-update all clean check default exe help install lib web \
+web-install web-clean TAGS
+
+$(MAKE_TARGETS): scons
+
+# To make this trickery complete, we could have ./configure remove
+# traces of scons configuration.
+scons:
+ @echo "warning: $(SCONS_USER) detected, rerouting to scons"
+ cd $(depth) && scons $(here) $(MAKECMDGOALS)
+ false
+endif
+endif
+
+
+# Use alternate configurations alongside eachother:
+#
+# ./configure --enable-config=debug
+# make conf=debug
+#
+# uses config-debug.make and config-debug.h; output goes to out-debug.
+#
+ifdef conf
+ CONFIGSUFFIX=-$(conf)
+endif
+
+# Use same configuration, but different output directory:
+#
+# make out=www
+#
+# uses config.make and config.h; output goes to out-www.
+#
+ifdef out
+ outbase=out-$(out)
+else
+ outbase=out$(CONFIGSUFFIX)
+endif