SOURCES_DIR := $(shell ( pwd -L ) )
endif
-.PHONY: all default check-make-ver
+.PHONY: all default check-make-ver omkize
ifdef W
ifeq ("$(origin W)", "command line")
@$(foreach x, $(default_CONFIG), echo '$(x)' | \
sed -e 's/^[^=]*=x$$/#\0/' >> "$(CONFIG_FILE)-default" ; )
+
+omkize:
+ $(Q)if ! grep -q MAKERULES_DIR Makefile; then \
+ echo "Makefile is not OMK leaf makefile!" >&2; exit 1; \
+ fi
+ $(Q)for i in `find -L . -name Makefile.omk` ; do \
+ i=`dirname $${i}`; \
+ if [ x"$$i" != x"." ]; then \
+ rm -f $${i}/Makefile; \
+ cp Makefile $${i}/Makefile; \
+ fi \
+ done