## * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ## * This source file is part of SableVM. * ## * * ## * See the file "LICENSE" for the copyright information and for * ## * the terms and conditions for copying, distribution and * ## * modification of this source file. * ## * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DISTCHECK_CONFIGURE_FLAGS = --with-jikes=internal --with-fastjar=internal --enable-gjdoc --enable-cp-tools EXTRA_DIST = ChangeLog MAIN_BUILDDIR = @MAIN_BUILDDIR@ MAIN_SRCDIR = @MAIN_SRCDIR@ EARLY_CONFIGURE = @EARLY_CONFIGURE@ EARLY_BUILD = @EARLY_BUILD@ MAIN_CONFIGURE = @MAIN_CONFIGURE@ MAIN_BUILD = @MAIN_BUILD@ EXTRA_CONFIGURE = @EXTRA_CONFIGURE@ EXTRA_BUILD = @EXTRA_BUILD@ ALL_INSTALL = @INSTALL_ALL@ ALL_MODULES = @ALL_MODULES@ all: build-all configure-all: configure-extra configure-early: configure @list='$(EARLY_CONFIGURE)'; \ export MAKEFLAGS=''; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir) "; \ if [ ! -f $$subdir/Makefile \ -o $$subdir/Makefile -ot Makefile ]; then \ if [ ! -d $$subdir ]; then mkdir -p $$subdir; fi; \ cd $$subdir && \ $(MAIN_SRCDIR)/$$subdir/configure $(MAIN_CONFIGURE_ARGS) \ `cat ../$${subdir}.confargs` \ || exit 1; \ cd ..; \ fi; \ done build-early: configure-early @list='$(EARLY_BUILD)'; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ cd $$subdir && $(MAKE) || exit 1; cd ..; \ done configure-main: build-early @list='$(MAIN_CONFIGURE)'; export MAKEFLAGS=''; OLDPATH="$PATH"; \ PATH="$(MAIN_BUILDDIR)/bin:$$PATH"; export MAKEFLAGS OLDPATH PATH; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ if [ ! -f $$subdir/Makefile \ -o $$subdir/Makefile -ot Makefile ]; then \ if [ ! -d $$subdir ]; then mkdir -p $$subdir; fi; \ cd $$subdir && \ $(MAIN_SRCDIR)/$$subdir/configure $(MAIN_CONFIGURE_ARGS) \ `cat ../$${subdir}.confargs` \ || exit 1; \ cd ..; \ fi; \ done build-main: configure-main @list='$(MAIN_BUILD)'; OLDPATH="$PATH"; \ PATH="$(MAIN_BUILDDIR)/bin:$$PATH"; export OLDPATH PATH; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ cd $$subdir && $(MAKE) || exit 1; cd ..; \ done configure-extra: build-main @list='$(EXTRA_CONFIGURE)'; MAKEFLAGS=''; OLDPATH="$PATH"; \ PATH="$(MAIN_BUILDDIR)/bin:$$PATH"; export MAKEFLAGS OLDPATH PATH; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ if [ ! -f $$subdir/Makefile \ -o $$subdir/Makefile -ot Makefile ]; then \ if [ ! -d $$subdir ]; then mkdir -p $$subdir; fi; \ cd $$subdir && \ $(MAIN_SRCDIR)/$$subdir/configure $(MAIN_CONFIGURE_ARGS) \ `cat ../$${subdir}.confargs` \ || exit 1; \ cd ..; \ fi; \ done build-extra: configure-extra @list='$(EXTRA_BUILD)'; MAKEFLAGS=''; OLDPATH="$PATH"; \ PATH="$(MAIN_BUILDDIR)/bin:$$PATH"; export MAKEFLAGS OLDPATH PATH; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ cd $$subdir && $(MAKE) || exit 1; cd ..; \ done build-all: build-extra clean-local: @list='$(ALL_MODULES)'; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ cd $$subdir && $(MAKE) clean || true ; cd ..; \ done install: build-all $(DEP_INSTALL_OPTIONAL) @-strip $(MAIN_BUILDDIR)/jikes/src/jikes >/dev/null 2>&1 @list='$(INSTALL_ALL)'; \ MAKEFLAGS=''; PATH="$(MAIN_BUILDDIR)/bin:$$PATH" ; export MAKEFLAGS PATH; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ cd $$subdir && $(MAKE) install || exit 1; cd ..; \ done # TODO: Add jars molding as the last stage of installation. # cp-tools.jar + gjdoc.jar -> tools.jar jars look like the first candidate. dist-hook: configure-all @list='$(ALL_MODULES)'; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ MAKEFLAGS="w -- distdir=$$subdir top_distdir=$$subdir"; \ PATH="$(MAIN_BUILDDIR)/bin:$$PATH" ; export MAKEFLAGS PATH; \ rm -f $$subdir/$$subdir.tar.gz $$subdir/$$subdir; \ cd $$subdir && $(MAKE) dist || exit 1; cd ..; \ cd $(distdir) && \ tar -zxvf ../$$subdir/$$subdir.tar.gz >/dev/null \ || exit 1; \ cd ..; \ done distclean-local: @list='$(ALL_MODULES)'; \ for subdir in $$list; do \ echo "------------------------------------------------------"; \ echo "-----------------> $@ ($$subdir)"; \ cd $$subdir && $(MAKE) distclean || true; cd ..; \ done # TODO: these all are used by distcheck. We should implement them # instead of only overriding. dvi: distcleancheck: distuninstallcheck: installcheck: uninstall: svnclean: svn st --no-ignore | grep '^I ' | cut -c8- | awk '{print "\"" $$0 "\""}' | xargs rm -rf # @list='$(MAIN_PKGDIRS)'; \ # for subdir in $$list; do \ # echo "------------------------------------------------------"; \ # echo "-----------------> $@ ($$subdir)"; \ # cd $$subdir && $(MAKE) svnclean; cd ..; \ # done ChangeLog: svn log -v $(srcdir) > $@