2009-06-24 10:01:18 +08:00
|
|
|
# Clear out all vpaths, then set just one (default vpath) for the main build
|
|
|
|
# directory.
|
|
|
|
vpath
|
|
|
|
vpath % .
|
|
|
|
|
|
|
|
# Clear the default suffixes, so that built-in rules are not used.
|
|
|
|
.SUFFIXES :
|
|
|
|
|
|
|
|
SHELL := /bin/sh
|
|
|
|
|
|
|
|
CC := @CC@
|
|
|
|
|
|
|
|
# Configuration parameters.
|
2010-03-04 07:48:20 +08:00
|
|
|
DESTDIR =
|
2010-04-03 04:50:53 +08:00
|
|
|
BINDIR := $(DESTDIR)@BINDIR@
|
2010-03-04 07:48:20 +08:00
|
|
|
INCLUDEDIR := $(DESTDIR)@INCLUDEDIR@
|
|
|
|
LIBDIR := $(DESTDIR)@LIBDIR@
|
2010-11-25 14:00:02 +08:00
|
|
|
DATADIR := $(DESTDIR)@DATADIR@
|
2010-03-04 07:48:20 +08:00
|
|
|
MANDIR := $(DESTDIR)@MANDIR@
|
2012-04-16 22:30:22 +08:00
|
|
|
srcroot := @srcroot@
|
|
|
|
objroot := @objroot@
|
|
|
|
abs_srcroot := @abs_srcroot@
|
|
|
|
abs_objroot := @abs_objroot@
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
# Build parameters.
|
2012-04-16 22:30:22 +08:00
|
|
|
CPPFLAGS := @CPPFLAGS@ -I$(srcroot)include -I$(objroot)include
|
2011-02-16 06:13:38 +08:00
|
|
|
CFLAGS := @CFLAGS@
|
2009-06-24 10:01:18 +08:00
|
|
|
LDFLAGS := @LDFLAGS@
|
2012-04-30 18:38:31 +08:00
|
|
|
EXTRA_LDFLAGS := @EXTRA_LDFLAGS@
|
2009-06-24 10:01:18 +08:00
|
|
|
LIBS := @LIBS@
|
|
|
|
RPATH_EXTRA := @RPATH_EXTRA@
|
2011-11-02 13:27:41 +08:00
|
|
|
SO := @so@
|
2012-04-30 18:38:31 +08:00
|
|
|
IMPORTLIB := @importlib@
|
2012-04-16 22:30:24 +08:00
|
|
|
O := @o@
|
|
|
|
A := @a@
|
|
|
|
EXE := @exe@
|
2012-04-22 12:27:46 +08:00
|
|
|
LIBPREFIX := @libprefix@
|
2011-11-02 13:27:41 +08:00
|
|
|
REV := @rev@
|
2012-04-16 22:30:22 +08:00
|
|
|
install_suffix := @install_suffix@
|
|
|
|
ABI := @abi@
|
|
|
|
XSLTPROC := @XSLTPROC@
|
|
|
|
AUTOCONF := @AUTOCONF@
|
2012-04-16 22:30:25 +08:00
|
|
|
_RPATH = @RPATH@
|
|
|
|
RPATH = $(if $(1),$(call _RPATH,$(1)))
|
2012-04-16 22:30:22 +08:00
|
|
|
cfghdrs_in := @cfghdrs_in@
|
|
|
|
cfghdrs_out := @cfghdrs_out@
|
|
|
|
cfgoutputs_in := @cfgoutputs_in@
|
|
|
|
cfgoutputs_out := @cfgoutputs_out@
|
|
|
|
enable_autogen := @enable_autogen@
|
|
|
|
enable_experimental := @enable_experimental@
|
2012-04-16 22:30:25 +08:00
|
|
|
DSO_LDFLAGS = @DSO_LDFLAGS@
|
2012-04-19 00:29:40 +08:00
|
|
|
SOREV = @SOREV@
|
2012-04-19 00:29:41 +08:00
|
|
|
PIC_CFLAGS = @PIC_CFLAGS@
|
2012-04-30 18:38:31 +08:00
|
|
|
CTARGET = @CTARGET@
|
|
|
|
LDTARGET = @LDTARGET@
|
|
|
|
MKLIB = @MKLIB@
|
2012-05-03 03:30:51 +08:00
|
|
|
CC_MM = @CC_MM@
|
2012-04-16 22:30:22 +08:00
|
|
|
|
|
|
|
ifeq (macho, $(ABI))
|
2012-04-22 12:27:46 +08:00
|
|
|
TEST_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH="$(objroot)lib"
|
|
|
|
else
|
|
|
|
ifeq (pecoff, $(ABI))
|
|
|
|
TEST_LIBRARY_PATH := PATH="$(PATH):$(objroot)lib"
|
2010-09-06 01:35:13 +08:00
|
|
|
else
|
|
|
|
TEST_LIBRARY_PATH :=
|
|
|
|
endif
|
2012-04-22 12:27:46 +08:00
|
|
|
endif
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-22 12:27:46 +08:00
|
|
|
LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix)
|
2012-04-16 22:30:24 +08:00
|
|
|
|
2010-01-17 17:49:20 +08:00
|
|
|
# Lists of files.
|
2012-04-16 22:30:22 +08:00
|
|
|
BINS := $(srcroot)bin/pprof $(objroot)bin/jemalloc.sh
|
|
|
|
CHDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h \
|
|
|
|
$(objroot)include/jemalloc/jemalloc_defs$(install_suffix).h
|
|
|
|
CSRCS := $(srcroot)src/jemalloc.c $(srcroot)src/arena.c $(srcroot)src/atomic.c \
|
|
|
|
$(srcroot)src/base.c $(srcroot)src/bitmap.c $(srcroot)src/chunk.c \
|
|
|
|
$(srcroot)src/chunk_dss.c $(srcroot)src/chunk_mmap.c \
|
|
|
|
$(srcroot)src/ckh.c $(srcroot)src/ctl.c $(srcroot)src/extent.c \
|
|
|
|
$(srcroot)src/hash.c $(srcroot)src/huge.c $(srcroot)src/mb.c \
|
|
|
|
$(srcroot)src/mutex.c $(srcroot)src/prof.c $(srcroot)src/quarantine.c \
|
|
|
|
$(srcroot)src/rtree.c $(srcroot)src/stats.c $(srcroot)src/tcache.c \
|
|
|
|
$(srcroot)src/util.c $(srcroot)src/tsd.c
|
|
|
|
ifeq (macho, $(ABI))
|
|
|
|
CSRCS += $(srcroot)src/zone.c
|
2010-09-06 01:35:13 +08:00
|
|
|
endif
|
2012-04-30 18:38:31 +08:00
|
|
|
ifeq ($(IMPORTLIB),$(SO))
|
2012-04-16 22:30:24 +08:00
|
|
|
STATIC_LIBS := $(objroot)lib/$(LIBJEMALLOC).$(A)
|
2012-04-30 18:38:31 +08:00
|
|
|
endif
|
2012-04-19 00:29:41 +08:00
|
|
|
ifdef PIC_CFLAGS
|
|
|
|
STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_pic.$(A)
|
2012-04-30 18:38:31 +08:00
|
|
|
else
|
|
|
|
STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_s.$(A)
|
2012-04-19 00:29:41 +08:00
|
|
|
endif
|
|
|
|
DSOS := $(objroot)lib/$(LIBJEMALLOC).$(SOREV)
|
2012-04-19 00:29:40 +08:00
|
|
|
ifneq ($(SOREV),$(SO))
|
|
|
|
DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO)
|
|
|
|
endif
|
2012-04-16 22:30:22 +08:00
|
|
|
MAN3 := $(objroot)doc/jemalloc$(install_suffix).3
|
|
|
|
DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml
|
|
|
|
DOCS_HTML := $(DOCS_XML:$(objroot)%.xml=$(srcroot)%.html)
|
|
|
|
DOCS_MAN3 := $(DOCS_XML:$(objroot)%.xml=$(srcroot)%.3)
|
2010-11-25 14:00:02 +08:00
|
|
|
DOCS := $(DOCS_HTML) $(DOCS_MAN3)
|
2012-04-16 22:30:22 +08:00
|
|
|
CTESTS := $(srcroot)test/aligned_alloc.c $(srcroot)test/allocated.c \
|
2012-10-12 04:53:15 +08:00
|
|
|
$(srcroot)test/ALLOCM_ARENA.c $(srcroot)test/bitmap.c \
|
|
|
|
$(srcroot)test/mremap.c $(srcroot)test/posix_memalign.c \
|
|
|
|
$(srcroot)test/thread_arena.c $(srcroot)test/thread_tcache_enabled.c
|
2012-04-16 22:30:22 +08:00
|
|
|
ifeq ($(enable_experimental), 1)
|
|
|
|
CTESTS += $(srcroot)test/allocm.c $(srcroot)test/rallocm.c
|
2012-03-03 09:47:37 +08:00
|
|
|
endif
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
COBJS := $(CSRCS:$(srcroot)%.c=$(objroot)%.$(O))
|
|
|
|
CPICOBJS := $(CSRCS:$(srcroot)%.c=$(objroot)%.pic.$(O))
|
|
|
|
CTESTOBJS := $(CTESTS:$(srcroot)%.c=$(objroot)%.$(O))
|
|
|
|
|
2010-11-25 14:00:02 +08:00
|
|
|
.PHONY: all dist doc_html doc_man doc
|
|
|
|
.PHONY: install_bin install_include install_lib
|
|
|
|
.PHONY: install_html install_man install_doc install
|
|
|
|
.PHONY: tests check clean distclean relclean
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
.SECONDARY : $(CTESTOBJS)
|
2011-02-14 10:11:54 +08:00
|
|
|
|
2009-06-24 10:01:18 +08:00
|
|
|
# Default target.
|
2012-03-03 08:38:37 +08:00
|
|
|
all: build
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
dist: build_doc
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
$(srcroot)doc/%.html : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/html.xsl
|
|
|
|
$(XSLTPROC) -o $@ $(objroot)doc/html.xsl $<
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
$(srcroot)doc/%.3 : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/manpages.xsl
|
|
|
|
$(XSLTPROC) -o $@ $(objroot)doc/manpages.xsl $<
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
build_doc_html: $(DOCS_HTML)
|
|
|
|
build_doc_man: $(DOCS_MAN3)
|
|
|
|
build_doc: $(DOCS)
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2010-01-17 01:53:50 +08:00
|
|
|
#
|
|
|
|
# Include generated dependency files.
|
|
|
|
#
|
2012-05-03 03:30:51 +08:00
|
|
|
ifdef CC_MM
|
2012-04-19 00:29:41 +08:00
|
|
|
-include $(COBJS:%.$(O)=%.d)
|
|
|
|
-include $(CPICOBJS:%.$(O)=%.d)
|
|
|
|
-include $(CTESTOBJS:%.$(O)=%.d)
|
2012-05-03 03:30:51 +08:00
|
|
|
endif
|
2010-01-17 01:53:50 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
$(COBJS): $(objroot)src/%.$(O): $(srcroot)src/%.c
|
|
|
|
$(CPICOBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.c
|
|
|
|
$(CPICOBJS): CFLAGS += $(PIC_CFLAGS)
|
|
|
|
$(CTESTOBJS): $(objroot)test/%.$(O): $(srcroot)test/%.c
|
|
|
|
$(CTESTOBJS): CPPFLAGS += -I$(objroot)test
|
2012-04-30 18:38:31 +08:00
|
|
|
ifneq ($(IMPORTLIB),$(SO))
|
|
|
|
$(COBJS): CPPFLAGS += -DDLLEXPORT
|
|
|
|
endif
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-05-03 03:30:51 +08:00
|
|
|
ifndef CC_MM
|
|
|
|
# Dependencies
|
|
|
|
HEADER_DIRS = $(srcroot)include/jemalloc/internal \
|
|
|
|
$(objroot)include/jemalloc $(objroot)include/jemalloc/internal
|
|
|
|
HEADERS = $(wildcard $(foreach dir,$(HEADER_DIRS),$(dir)/*.h))
|
|
|
|
$(COBJS) $(CPICOBJS) $(CTESTOBJS): $(HEADERS)
|
|
|
|
$(CTESTOBJS): $(objroot)test/jemalloc_test.h
|
|
|
|
endif
|
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
$(COBJS) $(CPICOBJS) $(CTESTOBJS): %.$(O):
|
2011-02-16 06:13:38 +08:00
|
|
|
@mkdir -p $(@D)
|
2012-04-30 18:38:31 +08:00
|
|
|
$(CC) $(CFLAGS) -c $(CPPFLAGS) $(CTARGET) $<
|
2012-05-03 03:30:51 +08:00
|
|
|
ifdef CC_MM
|
2012-04-16 22:30:24 +08:00
|
|
|
@$(CC) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $<
|
2012-05-03 03:30:51 +08:00
|
|
|
endif
|
2011-02-16 06:13:38 +08:00
|
|
|
|
2012-04-19 00:29:40 +08:00
|
|
|
ifneq ($(SOREV),$(SO))
|
|
|
|
%.$(SO) : %.$(SOREV)
|
2009-06-24 10:01:18 +08:00
|
|
|
@mkdir -p $(@D)
|
2010-04-08 14:37:35 +08:00
|
|
|
ln -sf $(<F) $@
|
2012-04-19 00:29:40 +08:00
|
|
|
endif
|
2010-04-08 14:37:35 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
$(objroot)lib/$(LIBJEMALLOC).$(SOREV) : $(if $(PIC_CFLAGS),$(CPICOBJS),$(COBJS))
|
2010-04-08 14:37:35 +08:00
|
|
|
@mkdir -p $(@D)
|
2012-04-30 18:38:31 +08:00
|
|
|
$(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS)
|
2010-04-08 14:37:35 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
$(objroot)lib/$(LIBJEMALLOC)_pic.$(A) : $(CPICOBJS)
|
|
|
|
$(objroot)lib/$(LIBJEMALLOC).$(A) : $(COBJS)
|
2012-04-30 18:38:31 +08:00
|
|
|
$(objroot)lib/$(LIBJEMALLOC)_s.$(A) : $(COBJS)
|
2011-02-16 06:13:38 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
$(STATIC_LIBS):
|
2010-04-08 14:37:35 +08:00
|
|
|
@mkdir -p $(@D)
|
2012-04-30 18:38:31 +08:00
|
|
|
$(MKLIB) $+
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-16 22:30:26 +08:00
|
|
|
$(objroot)test/bitmap$(EXE): $(objroot)src/bitmap.$(O)
|
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
$(objroot)test/%$(EXE): $(objroot)test/%.$(O) $(objroot)src/util.$(O) $(DSOS)
|
2010-08-14 06:42:29 +08:00
|
|
|
@mkdir -p $(@D)
|
2012-04-30 18:38:31 +08:00
|
|
|
$(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(filter -lpthread,$(LIBS)) $(EXTRA_LDFLAGS)
|
2010-08-14 06:42:29 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
build_lib_shared: $(DSOS)
|
|
|
|
build_lib_static: $(STATIC_LIBS)
|
|
|
|
build: build_lib_shared build_lib_static
|
|
|
|
|
2010-04-03 04:50:53 +08:00
|
|
|
install_bin:
|
|
|
|
install -d $(BINDIR)
|
|
|
|
@for b in $(BINS); do \
|
|
|
|
echo "install -m 755 $$b $(BINDIR)"; \
|
|
|
|
install -m 755 $$b $(BINDIR); \
|
|
|
|
done
|
|
|
|
|
2010-03-04 07:48:20 +08:00
|
|
|
install_include:
|
2010-02-12 06:45:59 +08:00
|
|
|
install -d $(INCLUDEDIR)/jemalloc
|
2009-06-24 10:01:18 +08:00
|
|
|
@for h in $(CHDRS); do \
|
2010-02-12 06:45:59 +08:00
|
|
|
echo "install -m 644 $$h $(INCLUDEDIR)/jemalloc"; \
|
|
|
|
install -m 644 $$h $(INCLUDEDIR)/jemalloc; \
|
2009-06-24 10:01:18 +08:00
|
|
|
done
|
2010-03-04 07:48:20 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
install_lib_shared: $(DSOS)
|
2009-06-24 10:01:18 +08:00
|
|
|
install -d $(LIBDIR)
|
2012-04-19 00:29:40 +08:00
|
|
|
install -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)
|
|
|
|
ifneq ($(SOREV),$(SO))
|
|
|
|
ln -sf $(LIBJEMALLOC).$(SOREV) $(LIBDIR)/$(LIBJEMALLOC).$(SO)
|
|
|
|
endif
|
2012-03-03 08:38:37 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
install_lib_static: $(STATIC_LIBS)
|
2012-03-03 08:38:37 +08:00
|
|
|
install -d $(LIBDIR)
|
2012-04-19 00:29:41 +08:00
|
|
|
@for l in $(STATIC_LIBS); do \
|
|
|
|
echo "install -m 755 $$l $(LIBDIR)"; \
|
|
|
|
install -m 755 $$l $(LIBDIR); \
|
|
|
|
done
|
2010-03-04 07:48:20 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
install_lib: install_lib_shared install_lib_static
|
|
|
|
|
|
|
|
install_doc_html:
|
2012-04-16 22:30:22 +08:00
|
|
|
install -d $(DATADIR)/doc/jemalloc$(install_suffix)
|
2010-11-25 14:00:02 +08:00
|
|
|
@for d in $(DOCS_HTML); do \
|
2012-04-16 22:30:22 +08:00
|
|
|
echo "install -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix)"; \
|
|
|
|
install -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \
|
2010-11-25 14:00:02 +08:00
|
|
|
done
|
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
install_doc_man:
|
2010-01-17 17:49:20 +08:00
|
|
|
install -d $(MANDIR)/man3
|
2010-11-25 14:00:02 +08:00
|
|
|
@for d in $(DOCS_MAN3); do \
|
|
|
|
echo "install -m 644 $$d $(MANDIR)/man3"; \
|
|
|
|
install -m 644 $$d $(MANDIR)/man3; \
|
2009-06-24 10:01:18 +08:00
|
|
|
done
|
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
install_doc: install_doc_html install_doc_man
|
2010-11-25 14:00:02 +08:00
|
|
|
|
|
|
|
install: install_bin install_include install_lib install_doc
|
2010-03-04 07:48:20 +08:00
|
|
|
|
2012-04-16 22:30:24 +08:00
|
|
|
tests: $(CTESTS:$(srcroot)%.c=$(objroot)%$(EXE))
|
2010-08-14 06:42:29 +08:00
|
|
|
|
|
|
|
check: tests
|
2012-04-16 22:30:22 +08:00
|
|
|
@mkdir -p $(objroot)test
|
2010-08-14 06:42:29 +08:00
|
|
|
@$(SHELL) -c 'total=0; \
|
|
|
|
failures=0; \
|
|
|
|
echo "========================================="; \
|
2012-04-16 22:30:22 +08:00
|
|
|
for t in $(CTESTS:$(srcroot)%.c=$(objroot)%); do \
|
2010-08-14 06:42:29 +08:00
|
|
|
total=`expr $$total + 1`; \
|
|
|
|
/bin/echo -n "$${t} ... "; \
|
2012-04-24 03:49:23 +08:00
|
|
|
$(TEST_LIBRARY_PATH) $${t}$(EXE) $(abs_srcroot) \
|
|
|
|
$(abs_objroot) > $(objroot)$${t}.out 2>&1; \
|
2012-04-16 22:30:22 +08:00
|
|
|
if test -e "$(srcroot)$${t}.exp"; then \
|
|
|
|
diff -w -u $(srcroot)$${t}.exp \
|
|
|
|
$(objroot)$${t}.out >/dev/null 2>&1; \
|
2010-08-14 06:42:29 +08:00
|
|
|
fail=$$?; \
|
|
|
|
if test "$${fail}" -eq "1" ; then \
|
|
|
|
failures=`expr $${failures} + 1`; \
|
|
|
|
echo "*** FAIL ***"; \
|
|
|
|
else \
|
|
|
|
echo "pass"; \
|
|
|
|
fi; \
|
|
|
|
else \
|
|
|
|
echo "*** FAIL *** (.exp file is missing)"; \
|
|
|
|
failures=`expr $${failures} + 1`; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
echo "========================================="; \
|
|
|
|
echo "Failures: $${failures}/$${total}"'
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
clean:
|
2012-04-19 00:29:41 +08:00
|
|
|
rm -f $(COBJS)
|
|
|
|
rm -f $(CPICOBJS)
|
|
|
|
rm -f $(COBJS:%.$(O)=%.d)
|
|
|
|
rm -f $(CPICOBJS:%.$(O)=%.d)
|
|
|
|
rm -f $(CTESTOBJS:%.$(O)=%$(EXE))
|
|
|
|
rm -f $(CTESTOBJS)
|
|
|
|
rm -f $(CTESTOBJS:%.$(O)=%.d)
|
|
|
|
rm -f $(CTESTOBJS:%.$(O)=%.out)
|
2011-02-16 06:13:38 +08:00
|
|
|
rm -f $(DSOS) $(STATIC_LIBS)
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
distclean: clean
|
2012-04-16 22:30:22 +08:00
|
|
|
rm -rf $(objroot)autom4te.cache
|
|
|
|
rm -f $(objroot)config.log
|
|
|
|
rm -f $(objroot)config.status
|
|
|
|
rm -f $(objroot)config.stamp
|
|
|
|
rm -f $(cfghdrs_out)
|
|
|
|
rm -f $(cfgoutputs_out)
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
relclean: distclean
|
2012-04-16 22:30:22 +08:00
|
|
|
rm -f $(objroot)configure
|
|
|
|
rm -f $(srcroot)VERSION
|
2010-11-25 14:00:02 +08:00
|
|
|
rm -f $(DOCS_HTML)
|
|
|
|
rm -f $(DOCS_MAN3)
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
#===============================================================================
|
|
|
|
# Re-configuration rules.
|
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
ifeq ($(enable_autogen), 1)
|
|
|
|
$(srcroot)configure : $(srcroot)configure.ac
|
|
|
|
cd ./$(srcroot) && $(AUTOCONF)
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
$(objroot)config.status : $(srcroot)configure
|
|
|
|
./$(objroot)config.status --recheck
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
$(srcroot)config.stamp.in : $(srcroot)configure.ac
|
|
|
|
echo stamp > $(srcroot)config.stamp.in
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
$(objroot)config.stamp : $(cfgoutputs_in) $(cfghdrs_in) $(srcroot)configure
|
|
|
|
./$(objroot)config.status
|
2009-06-24 10:01:18 +08:00
|
|
|
@touch $@
|
|
|
|
|
|
|
|
# There must be some action in order for make to re-read Makefile when it is
|
|
|
|
# out of date.
|
2012-04-16 22:30:22 +08:00
|
|
|
$(cfgoutputs_out) $(cfghdrs_out) : $(objroot)config.stamp
|
2009-06-24 10:01:18 +08:00
|
|
|
@true
|
|
|
|
endif
|