Newer
Older
# $Id: Makefile,v 1.28 2000/08/05 13:36:23 mast Exp $
OS=`uname -srm|sed -e 's/ /-/g'|tr '[A-Z]' '[a-z]'|tr '/' '_'`
BUILDDIR=build/$(OS)
METATARGET=
# Use this to pass arguments to configure. Leave empty to keep previous args.
CONFIGUREARGS=
# Set to a flag for parallelizing make, e.g. -j2. It's given to make
# at the level where it's most effective.
# Used to avoid make compatibility problems.
BIN_TRUE=":"
MAKE_FLAGS="MAKE=$(MAKE)" "CONFIGUREARGS=$(CONFIGUREARGS)" "BUILDDIR=$(BUILDDIR)"
Martin Stjernholm
committed
all: bin/pike compile
force:
-@$(BIN_TRUE)
src/configure: src/configure.in
cd src && ./run_autoconfig . 2>&1 | grep -v warning
Martin Stjernholm
committed
-rm -f "$(BUILDDIR)/Makefile"
force_autoconfig:
cd src && ./run_autoconfig . 2>&1 | grep -v warning
force_configure:
Martin Stjernholm
committed
-rm -f "$(BUILDDIR)/Makefile"
@$(MAKE) $(MAKE_FLAGS) configure
IFS='/'; \
dir=`echo "$$builddir" | sed -e 's|[^/].*||'`; \
test x"$$dir" = x -o -d "$$dir" || mkdir "$$dir" || exit 1; \
configure: src/configure builddir
@builddir="$(BUILDDIR)"; \
srcdir=`pwd`/src; \
cd "$$builddir" && { \
if test -f .configureargs -a -z "$(CONFIGUREARGS)"; then \
configureargs="`cat .configureargs`"; \
else \
Martin Stjernholm
committed
echo; \
Martin Stjernholm
committed
echo Configure arguments: $$configureargs; \
echo; \
if test -f Makefile -a -f config.cache -a -f .configureargs && \
test "`cat .configureargs`" = "$$configureargs"; then :; \
else \
echo Running "$$srcdir"/configure $$configureargs in "$$builddir"; \
CONFIG_SITE=x "$$srcdir"/configure $$configureargs && { \
echo "$$configureargs" > .configureargs; \
$(MAKE) "MAKE=$(MAKE)" clean > /dev/null; \
:; \
} \
fi; \
}
compile: configure
@builddir="$(BUILDDIR)"; \
metatarget="$(METATARGET)"; \
test -f "$$builddir"/master.pike -a -x "$$builddir"/pike || \
metatarget="all $$metatarget"; \
test "x$$metatarget" = x && metatarget=all; \
cd "$$builddir" && for target in $$metatarget; do \
echo Making $$target in "$$builddir"; \
$(MAKE) "MAKE=$(MAKE)" "MAKE_PARALLEL=$(MAKE_PARALLEL)" $$target || { \
res=$$?; \
if test -f remake; then \
$(MAKE) "MAKE=$(MAKE)" "MAKE_PARALLEL=$(MAKE_PARALLEL)" $$target || \
exit $$?; \
else \
exit $$res; \
fi; \
} \
Martin Stjernholm
committed
bin/pike: force
sed -e "s|\"BASEDIR\"|\"`pwd`\"|" < bin/pike.in > bin/pike
chmod a+x bin/pike
# This skips the modules.
pike: force
@$(MAKE) "METATARGET=pike master.pike"
@$(MAKE) "METATARGET=install"
install_interactive:
@$(MAKE) "METATARGET=install_interactive"
just_verify:
@$(MAKE) $(MAKE_FLAGS) "METATARGET=just_verify"
@$(MAKE) $(MAKE_FLAGS) "METATARGET=verify"
@$(MAKE) $(MAKE_FLAGS) "METATARGET=verify_installed"
-@$(BIN_TRUE)
-@$(BIN_TRUE)
@$(MAKE) $(MAKE_FLAGS) "METATARGET=verbose_verify"
@$(MAKE) $(MAKE_FLAGS) "METATARGET=gdb_verify"
@$(MAKE) $(MAKE_FLAGS) "METATARGET=run_hilfe"
bin_export:
@$(MAKE) $(MAKE_FLAGS) "METATARGET=bin_export"
@$(MAKE) $(MAKE_FLAGS) "METATARGET=feature_list"
-cd "$(BUILDDIR)" && test -f Makefile && $(MAKE) "MAKE=$(MAKE)" clean
-cd "$(BUILDDIR)" && test -f Makefile && $(MAKE) "MAKE=$(MAKE)" spotless
cvsclean: distclean
for d in `find src -type d -print`; do if test -f "$$d/.cvsignore"; then (cd "$$d" && rm -f `cat ".cvsignore"`); else :; fi; done
depend: configure
-cd "$(BUILDDIR)" && $(MAKE) "MAKE=$(MAKE)" depend