Makefile.in 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. # Clear out all vpaths, then set just one (default vpath) for the main build
  2. # directory.
  3. vpath
  4. vpath % .
  5. # Clear the default suffixes, so that built-in rules are not used.
  6. .SUFFIXES :
  7. SHELL := /bin/sh
  8. CC := @CC@
  9. CXX := @CXX@
  10. # Configuration parameters.
  11. DESTDIR =
  12. BINDIR := $(DESTDIR)@BINDIR@
  13. INCLUDEDIR := $(DESTDIR)@INCLUDEDIR@
  14. LIBDIR := $(DESTDIR)@LIBDIR@
  15. DATADIR := $(DESTDIR)@DATADIR@
  16. MANDIR := $(DESTDIR)@MANDIR@
  17. srcroot := @srcroot@
  18. objroot := @objroot@
  19. abs_srcroot := @abs_srcroot@
  20. abs_objroot := @abs_objroot@
  21. # Build parameters.
  22. CPPFLAGS := @CPPFLAGS@ -I$(objroot)include -I$(srcroot)include
  23. CONFIGURE_CFLAGS := @CONFIGURE_CFLAGS@
  24. SPECIFIED_CFLAGS := @SPECIFIED_CFLAGS@
  25. EXTRA_CFLAGS := @EXTRA_CFLAGS@
  26. CFLAGS := $(strip $(CONFIGURE_CFLAGS) $(SPECIFIED_CFLAGS) $(EXTRA_CFLAGS))
  27. CONFIGURE_CXXFLAGS := @CONFIGURE_CXXFLAGS@
  28. SPECIFIED_CXXFLAGS := @SPECIFIED_CXXFLAGS@
  29. EXTRA_CXXFLAGS := @EXTRA_CXXFLAGS@
  30. CXXFLAGS := $(strip $(CONFIGURE_CXXFLAGS) $(SPECIFIED_CXXFLAGS) $(EXTRA_CXXFLAGS))
  31. LDFLAGS := @LDFLAGS@
  32. EXTRA_LDFLAGS := @EXTRA_LDFLAGS@
  33. LIBS := @LIBS@
  34. RPATH_EXTRA := @RPATH_EXTRA@
  35. SO := @so@
  36. IMPORTLIB := @importlib@
  37. O := @o@
  38. A := @a@
  39. EXE := @exe@
  40. LIBPREFIX := @libprefix@
  41. REV := @rev@
  42. install_suffix := @install_suffix@
  43. ABI := @abi@
  44. XSLTPROC := @XSLTPROC@
  45. XSLROOT := @XSLROOT@
  46. AUTOCONF := @AUTOCONF@
  47. _RPATH = @RPATH@
  48. RPATH = $(if $(1),$(call _RPATH,$(1)))
  49. cfghdrs_in := $(addprefix $(srcroot),@cfghdrs_in@)
  50. cfghdrs_out := @cfghdrs_out@
  51. cfgoutputs_in := $(addprefix $(srcroot),@cfgoutputs_in@)
  52. cfgoutputs_out := @cfgoutputs_out@
  53. enable_autogen := @enable_autogen@
  54. enable_doc := @enable_doc@
  55. enable_shared := @enable_shared@
  56. enable_static := @enable_static@
  57. enable_prof := @enable_prof@
  58. enable_zone_allocator := @enable_zone_allocator@
  59. enable_experimental_smallocx := @enable_experimental_smallocx@
  60. MALLOC_CONF := @JEMALLOC_CPREFIX@MALLOC_CONF
  61. link_whole_archive := @link_whole_archive@
  62. DSO_LDFLAGS = @DSO_LDFLAGS@
  63. SOREV = @SOREV@
  64. PIC_CFLAGS = @PIC_CFLAGS@
  65. CTARGET = @CTARGET@
  66. LDTARGET = @LDTARGET@
  67. TEST_LD_MODE = @TEST_LD_MODE@
  68. MKLIB = @MKLIB@
  69. AR = @AR@
  70. ARFLAGS = @ARFLAGS@
  71. DUMP_SYMS = @DUMP_SYMS@
  72. AWK := @AWK@
  73. CC_MM = @CC_MM@
  74. LM := @LM@
  75. INSTALL = @INSTALL@
  76. ifeq (macho, $(ABI))
  77. TEST_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH="$(objroot)lib"
  78. else
  79. ifeq (pecoff, $(ABI))
  80. TEST_LIBRARY_PATH := PATH="$(PATH):$(objroot)lib"
  81. else
  82. TEST_LIBRARY_PATH :=
  83. endif
  84. endif
  85. LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix)
  86. # Lists of files.
  87. BINS := $(objroot)bin/jemalloc-config $(objroot)bin/jemalloc.sh $(objroot)bin/jeprof
  88. C_HDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h
  89. C_SRCS := $(srcroot)src/jemalloc.c \
  90. $(srcroot)src/arena.c \
  91. $(srcroot)src/background_thread.c \
  92. $(srcroot)src/base.c \
  93. $(srcroot)src/bin.c \
  94. $(srcroot)src/bin_info.c \
  95. $(srcroot)src/bitmap.c \
  96. $(srcroot)src/buf_writer.c \
  97. $(srcroot)src/cache_bin.c \
  98. $(srcroot)src/ckh.c \
  99. $(srcroot)src/counter.c \
  100. $(srcroot)src/ctl.c \
  101. $(srcroot)src/decay.c \
  102. $(srcroot)src/div.c \
  103. $(srcroot)src/ecache.c \
  104. $(srcroot)src/edata.c \
  105. $(srcroot)src/edata_cache.c \
  106. $(srcroot)src/ehooks.c \
  107. $(srcroot)src/emap.c \
  108. $(srcroot)src/eset.c \
  109. $(srcroot)src/exp_grow.c \
  110. $(srcroot)src/extent.c \
  111. $(srcroot)src/extent_dss.c \
  112. $(srcroot)src/extent_mmap.c \
  113. $(srcroot)src/fxp.c \
  114. $(srcroot)src/san.c \
  115. $(srcroot)src/san_bump.c \
  116. $(srcroot)src/hook.c \
  117. $(srcroot)src/hpa.c \
  118. $(srcroot)src/hpa_hooks.c \
  119. $(srcroot)src/hpdata.c \
  120. $(srcroot)src/inspect.c \
  121. $(srcroot)src/large.c \
  122. $(srcroot)src/log.c \
  123. $(srcroot)src/malloc_io.c \
  124. $(srcroot)src/mutex.c \
  125. $(srcroot)src/nstime.c \
  126. $(srcroot)src/pa.c \
  127. $(srcroot)src/pa_extra.c \
  128. $(srcroot)src/pai.c \
  129. $(srcroot)src/pac.c \
  130. $(srcroot)src/pages.c \
  131. $(srcroot)src/peak_event.c \
  132. $(srcroot)src/prof.c \
  133. $(srcroot)src/prof_data.c \
  134. $(srcroot)src/prof_log.c \
  135. $(srcroot)src/prof_recent.c \
  136. $(srcroot)src/prof_stats.c \
  137. $(srcroot)src/prof_sys.c \
  138. $(srcroot)src/psset.c \
  139. $(srcroot)src/rtree.c \
  140. $(srcroot)src/safety_check.c \
  141. $(srcroot)src/sc.c \
  142. $(srcroot)src/sec.c \
  143. $(srcroot)src/stats.c \
  144. $(srcroot)src/sz.c \
  145. $(srcroot)src/tcache.c \
  146. $(srcroot)src/test_hooks.c \
  147. $(srcroot)src/thread_event.c \
  148. $(srcroot)src/ticker.c \
  149. $(srcroot)src/tsd.c \
  150. $(srcroot)src/witness.c
  151. ifeq ($(enable_zone_allocator), 1)
  152. C_SRCS += $(srcroot)src/zone.c
  153. endif
  154. ifeq ($(IMPORTLIB),$(SO))
  155. STATIC_LIBS := $(objroot)lib/$(LIBJEMALLOC).$(A)
  156. endif
  157. ifdef PIC_CFLAGS
  158. STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_pic.$(A)
  159. else
  160. STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_s.$(A)
  161. endif
  162. DSOS := $(objroot)lib/$(LIBJEMALLOC).$(SOREV)
  163. ifneq ($(SOREV),$(SO))
  164. DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO)
  165. endif
  166. ifeq (1, $(link_whole_archive))
  167. LJEMALLOC := -Wl,--whole-archive -L$(objroot)lib -l$(LIBJEMALLOC) -Wl,--no-whole-archive
  168. else
  169. LJEMALLOC := $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
  170. endif
  171. PC := $(objroot)jemalloc.pc
  172. DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml
  173. DOCS_HTML := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.html)
  174. DOCS_MAN3 := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.3)
  175. DOCS := $(DOCS_HTML) $(DOCS_MAN3)
  176. C_TESTLIB_SRCS := $(srcroot)test/src/btalloc.c $(srcroot)test/src/btalloc_0.c \
  177. $(srcroot)test/src/btalloc_1.c $(srcroot)test/src/math.c \
  178. $(srcroot)test/src/mtx.c $(srcroot)test/src/sleep.c \
  179. $(srcroot)test/src/SFMT.c $(srcroot)test/src/test.c \
  180. $(srcroot)test/src/thd.c $(srcroot)test/src/timer.c
  181. ifeq (1, $(link_whole_archive))
  182. C_UTIL_INTEGRATION_SRCS :=
  183. C_UTIL_CPP_SRCS :=
  184. else
  185. C_UTIL_INTEGRATION_SRCS := $(srcroot)src/nstime.c $(srcroot)src/malloc_io.c \
  186. $(srcroot)src/ticker.c
  187. C_UTIL_CPP_SRCS := $(srcroot)src/nstime.c $(srcroot)src/malloc_io.c
  188. endif
  189. TESTS_UNIT := \
  190. $(srcroot)test/unit/a0.c \
  191. $(srcroot)test/unit/arena_decay.c \
  192. $(srcroot)test/unit/arena_reset.c \
  193. $(srcroot)test/unit/atomic.c \
  194. $(srcroot)test/unit/background_thread.c \
  195. $(srcroot)test/unit/background_thread_enable.c \
  196. $(srcroot)test/unit/base.c \
  197. $(srcroot)test/unit/batch_alloc.c \
  198. $(srcroot)test/unit/binshard.c \
  199. $(srcroot)test/unit/bitmap.c \
  200. $(srcroot)test/unit/bit_util.c \
  201. $(srcroot)test/unit/buf_writer.c \
  202. $(srcroot)test/unit/cache_bin.c \
  203. $(srcroot)test/unit/ckh.c \
  204. $(srcroot)test/unit/counter.c \
  205. $(srcroot)test/unit/decay.c \
  206. $(srcroot)test/unit/div.c \
  207. $(srcroot)test/unit/double_free.c \
  208. $(srcroot)test/unit/edata_cache.c \
  209. $(srcroot)test/unit/emitter.c \
  210. $(srcroot)test/unit/extent_quantize.c \
  211. ${srcroot}test/unit/fb.c \
  212. $(srcroot)test/unit/fork.c \
  213. ${srcroot}test/unit/fxp.c \
  214. ${srcroot}test/unit/san.c \
  215. ${srcroot}test/unit/san_bump.c \
  216. $(srcroot)test/unit/hash.c \
  217. $(srcroot)test/unit/hook.c \
  218. $(srcroot)test/unit/hpa.c \
  219. $(srcroot)test/unit/hpa_background_thread.c \
  220. $(srcroot)test/unit/hpdata.c \
  221. $(srcroot)test/unit/huge.c \
  222. $(srcroot)test/unit/inspect.c \
  223. $(srcroot)test/unit/junk.c \
  224. $(srcroot)test/unit/junk_alloc.c \
  225. $(srcroot)test/unit/junk_free.c \
  226. $(srcroot)test/unit/log.c \
  227. $(srcroot)test/unit/mallctl.c \
  228. $(srcroot)test/unit/malloc_conf_2.c \
  229. $(srcroot)test/unit/malloc_io.c \
  230. $(srcroot)test/unit/math.c \
  231. $(srcroot)test/unit/mpsc_queue.c \
  232. $(srcroot)test/unit/mq.c \
  233. $(srcroot)test/unit/mtx.c \
  234. $(srcroot)test/unit/nstime.c \
  235. $(srcroot)test/unit/oversize_threshold.c \
  236. $(srcroot)test/unit/pa.c \
  237. $(srcroot)test/unit/pack.c \
  238. $(srcroot)test/unit/pages.c \
  239. $(srcroot)test/unit/peak.c \
  240. $(srcroot)test/unit/ph.c \
  241. $(srcroot)test/unit/prng.c \
  242. $(srcroot)test/unit/prof_accum.c \
  243. $(srcroot)test/unit/prof_active.c \
  244. $(srcroot)test/unit/prof_gdump.c \
  245. $(srcroot)test/unit/prof_hook.c \
  246. $(srcroot)test/unit/prof_idump.c \
  247. $(srcroot)test/unit/prof_log.c \
  248. $(srcroot)test/unit/prof_mdump.c \
  249. $(srcroot)test/unit/prof_recent.c \
  250. $(srcroot)test/unit/prof_reset.c \
  251. $(srcroot)test/unit/prof_stats.c \
  252. $(srcroot)test/unit/prof_tctx.c \
  253. $(srcroot)test/unit/prof_thread_name.c \
  254. $(srcroot)test/unit/prof_sys_thread_name.c \
  255. $(srcroot)test/unit/psset.c \
  256. $(srcroot)test/unit/ql.c \
  257. $(srcroot)test/unit/qr.c \
  258. $(srcroot)test/unit/rb.c \
  259. $(srcroot)test/unit/retained.c \
  260. $(srcroot)test/unit/rtree.c \
  261. $(srcroot)test/unit/safety_check.c \
  262. $(srcroot)test/unit/sc.c \
  263. $(srcroot)test/unit/sec.c \
  264. $(srcroot)test/unit/seq.c \
  265. $(srcroot)test/unit/SFMT.c \
  266. $(srcroot)test/unit/size_check.c \
  267. $(srcroot)test/unit/size_classes.c \
  268. $(srcroot)test/unit/slab.c \
  269. $(srcroot)test/unit/smoothstep.c \
  270. $(srcroot)test/unit/spin.c \
  271. $(srcroot)test/unit/stats.c \
  272. $(srcroot)test/unit/stats_print.c \
  273. $(srcroot)test/unit/sz.c \
  274. $(srcroot)test/unit/tcache_max.c \
  275. $(srcroot)test/unit/test_hooks.c \
  276. $(srcroot)test/unit/thread_event.c \
  277. $(srcroot)test/unit/ticker.c \
  278. $(srcroot)test/unit/tsd.c \
  279. $(srcroot)test/unit/uaf.c \
  280. $(srcroot)test/unit/witness.c \
  281. $(srcroot)test/unit/zero.c \
  282. $(srcroot)test/unit/zero_realloc_abort.c \
  283. $(srcroot)test/unit/zero_realloc_free.c \
  284. $(srcroot)test/unit/zero_realloc_alloc.c \
  285. $(srcroot)test/unit/zero_reallocs.c
  286. ifeq (@enable_prof@, 1)
  287. TESTS_UNIT += \
  288. $(srcroot)test/unit/arena_reset_prof.c \
  289. $(srcroot)test/unit/batch_alloc_prof.c
  290. endif
  291. TESTS_INTEGRATION := $(srcroot)test/integration/aligned_alloc.c \
  292. $(srcroot)test/integration/allocated.c \
  293. $(srcroot)test/integration/extent.c \
  294. $(srcroot)test/integration/malloc.c \
  295. $(srcroot)test/integration/mallocx.c \
  296. $(srcroot)test/integration/MALLOCX_ARENA.c \
  297. $(srcroot)test/integration/overflow.c \
  298. $(srcroot)test/integration/posix_memalign.c \
  299. $(srcroot)test/integration/rallocx.c \
  300. $(srcroot)test/integration/sdallocx.c \
  301. $(srcroot)test/integration/slab_sizes.c \
  302. $(srcroot)test/integration/thread_arena.c \
  303. $(srcroot)test/integration/thread_tcache_enabled.c \
  304. $(srcroot)test/integration/xallocx.c
  305. ifeq (@enable_experimental_smallocx@, 1)
  306. TESTS_INTEGRATION += \
  307. $(srcroot)test/integration/smallocx.c
  308. endif
  309. ifeq (@enable_cxx@, 1)
  310. CPP_SRCS := $(srcroot)src/jemalloc_cpp.cpp
  311. TESTS_INTEGRATION_CPP := $(srcroot)test/integration/cpp/basic.cpp \
  312. $(srcroot)test/integration/cpp/infallible_new_true.cpp \
  313. $(srcroot)test/integration/cpp/infallible_new_false.cpp
  314. else
  315. CPP_SRCS :=
  316. TESTS_INTEGRATION_CPP :=
  317. endif
  318. TESTS_ANALYZE := $(srcroot)test/analyze/prof_bias.c \
  319. $(srcroot)test/analyze/rand.c \
  320. $(srcroot)test/analyze/sizes.c
  321. TESTS_STRESS := $(srcroot)test/stress/batch_alloc.c \
  322. $(srcroot)test/stress/fill_flush.c \
  323. $(srcroot)test/stress/hookbench.c \
  324. $(srcroot)test/stress/large_microbench.c \
  325. $(srcroot)test/stress/mallctl.c \
  326. $(srcroot)test/stress/microbench.c
  327. TESTS := $(TESTS_UNIT) $(TESTS_INTEGRATION) $(TESTS_INTEGRATION_CPP) \
  328. $(TESTS_ANALYZE) $(TESTS_STRESS)
  329. PRIVATE_NAMESPACE_HDRS := $(objroot)include/jemalloc/internal/private_namespace.h $(objroot)include/jemalloc/internal/private_namespace_jet.h
  330. PRIVATE_NAMESPACE_GEN_HDRS := $(PRIVATE_NAMESPACE_HDRS:%.h=%.gen.h)
  331. C_SYM_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.sym.$(O))
  332. C_SYMS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.sym)
  333. C_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.$(O))
  334. CPP_OBJS := $(CPP_SRCS:$(srcroot)%.cpp=$(objroot)%.$(O))
  335. C_PIC_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.pic.$(O))
  336. CPP_PIC_OBJS := $(CPP_SRCS:$(srcroot)%.cpp=$(objroot)%.pic.$(O))
  337. C_JET_SYM_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.sym.$(O))
  338. C_JET_SYMS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.sym)
  339. C_JET_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.$(O))
  340. C_TESTLIB_UNIT_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.unit.$(O))
  341. C_TESTLIB_INTEGRATION_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O))
  342. C_UTIL_INTEGRATION_OBJS := $(C_UTIL_INTEGRATION_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O))
  343. C_TESTLIB_ANALYZE_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.analyze.$(O))
  344. C_TESTLIB_STRESS_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.stress.$(O))
  345. C_TESTLIB_OBJS := $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) \
  346. $(C_UTIL_INTEGRATION_OBJS) $(C_TESTLIB_ANALYZE_OBJS) \
  347. $(C_TESTLIB_STRESS_OBJS)
  348. TESTS_UNIT_OBJS := $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%.$(O))
  349. TESTS_INTEGRATION_OBJS := $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%.$(O))
  350. TESTS_INTEGRATION_CPP_OBJS := $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%.$(O))
  351. TESTS_ANALYZE_OBJS := $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%.$(O))
  352. TESTS_STRESS_OBJS := $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%.$(O))
  353. TESTS_OBJS := $(TESTS_UNIT_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_ANALYZE_OBJS) \
  354. $(TESTS_STRESS_OBJS)
  355. TESTS_CPP_OBJS := $(TESTS_INTEGRATION_CPP_OBJS)
  356. .PHONY: all dist build_doc_html build_doc_man build_doc
  357. .PHONY: install_bin install_include install_lib
  358. .PHONY: install_doc_html install_doc_man install_doc install
  359. .PHONY: tests check clean distclean relclean
  360. .SECONDARY : $(PRIVATE_NAMESPACE_GEN_HDRS) $(TESTS_OBJS) $(TESTS_CPP_OBJS)
  361. # Default target.
  362. all: build_lib
  363. dist: build_doc
  364. $(objroot)doc/%$(install_suffix).html : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/html.xsl
  365. ifneq ($(XSLROOT),)
  366. $(XSLTPROC) -o $@ $(objroot)doc/html.xsl $<
  367. else
  368. ifeq ($(wildcard $(DOCS_HTML)),)
  369. @echo "<p>Missing xsltproc. Doc not built.</p>" > $@
  370. endif
  371. @echo "Missing xsltproc. "$@" not (re)built."
  372. endif
  373. $(objroot)doc/%$(install_suffix).3 : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/manpages.xsl
  374. ifneq ($(XSLROOT),)
  375. $(XSLTPROC) -o $@ $(objroot)doc/manpages.xsl $<
  376. # The -o option (output filename) of xsltproc may not work (it uses the
  377. # <refname> in the .xml file). Manually add the suffix if so.
  378. ifneq ($(install_suffix),)
  379. @if [ -f $(objroot)doc/jemalloc.3 ]; then \
  380. mv $(objroot)doc/jemalloc.3 $(objroot)doc/jemalloc$(install_suffix).3 ; \
  381. fi
  382. endif
  383. else
  384. ifeq ($(wildcard $(DOCS_MAN3)),)
  385. @echo "Missing xsltproc. Doc not built." > $@
  386. endif
  387. @echo "Missing xsltproc. "$@" not (re)built."
  388. endif
  389. build_doc_html: $(DOCS_HTML)
  390. build_doc_man: $(DOCS_MAN3)
  391. build_doc: $(DOCS)
  392. #
  393. # Include generated dependency files.
  394. #
  395. ifdef CC_MM
  396. -include $(C_SYM_OBJS:%.$(O)=%.d)
  397. -include $(C_OBJS:%.$(O)=%.d)
  398. -include $(CPP_OBJS:%.$(O)=%.d)
  399. -include $(C_PIC_OBJS:%.$(O)=%.d)
  400. -include $(CPP_PIC_OBJS:%.$(O)=%.d)
  401. -include $(C_JET_SYM_OBJS:%.$(O)=%.d)
  402. -include $(C_JET_OBJS:%.$(O)=%.d)
  403. -include $(C_TESTLIB_OBJS:%.$(O)=%.d)
  404. -include $(TESTS_OBJS:%.$(O)=%.d)
  405. -include $(TESTS_CPP_OBJS:%.$(O)=%.d)
  406. endif
  407. $(C_SYM_OBJS): $(objroot)src/%.sym.$(O): $(srcroot)src/%.c
  408. $(C_SYM_OBJS): CPPFLAGS += -DJEMALLOC_NO_PRIVATE_NAMESPACE
  409. $(C_SYMS): $(objroot)src/%.sym: $(objroot)src/%.sym.$(O)
  410. $(C_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.c
  411. $(CPP_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.cpp
  412. $(C_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.c
  413. $(C_PIC_OBJS): CFLAGS += $(PIC_CFLAGS)
  414. $(CPP_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.cpp
  415. $(CPP_PIC_OBJS): CXXFLAGS += $(PIC_CFLAGS)
  416. $(C_JET_SYM_OBJS): $(objroot)src/%.jet.sym.$(O): $(srcroot)src/%.c
  417. $(C_JET_SYM_OBJS): CPPFLAGS += -DJEMALLOC_JET -DJEMALLOC_NO_PRIVATE_NAMESPACE
  418. $(C_JET_SYMS): $(objroot)src/%.jet.sym: $(objroot)src/%.jet.sym.$(O)
  419. $(C_JET_OBJS): $(objroot)src/%.jet.$(O): $(srcroot)src/%.c
  420. $(C_JET_OBJS): CPPFLAGS += -DJEMALLOC_JET
  421. $(C_TESTLIB_UNIT_OBJS): $(objroot)test/src/%.unit.$(O): $(srcroot)test/src/%.c
  422. $(C_TESTLIB_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST
  423. $(C_TESTLIB_INTEGRATION_OBJS): $(objroot)test/src/%.integration.$(O): $(srcroot)test/src/%.c
  424. $(C_TESTLIB_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST
  425. $(C_UTIL_INTEGRATION_OBJS): $(objroot)src/%.integration.$(O): $(srcroot)src/%.c
  426. $(C_TESTLIB_ANALYZE_OBJS): $(objroot)test/src/%.analyze.$(O): $(srcroot)test/src/%.c
  427. $(C_TESTLIB_ANALYZE_OBJS): CPPFLAGS += -DJEMALLOC_ANALYZE_TEST
  428. $(C_TESTLIB_STRESS_OBJS): $(objroot)test/src/%.stress.$(O): $(srcroot)test/src/%.c
  429. $(C_TESTLIB_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST -DJEMALLOC_STRESS_TESTLIB
  430. $(C_TESTLIB_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
  431. $(TESTS_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST
  432. $(TESTS_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST
  433. $(TESTS_INTEGRATION_CPP_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_CPP_TEST
  434. $(TESTS_ANALYZE_OBJS): CPPFLAGS += -DJEMALLOC_ANALYZE_TEST
  435. $(TESTS_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST
  436. $(TESTS_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.c
  437. $(TESTS_CPP_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.cpp
  438. $(TESTS_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
  439. $(TESTS_CPP_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
  440. ifneq ($(IMPORTLIB),$(SO))
  441. $(CPP_OBJS) $(C_SYM_OBJS) $(C_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS): CPPFLAGS += -DDLLEXPORT
  442. endif
  443. # Dependencies.
  444. ifndef CC_MM
  445. HEADER_DIRS = $(srcroot)include/jemalloc/internal \
  446. $(objroot)include/jemalloc $(objroot)include/jemalloc/internal
  447. HEADERS = $(filter-out $(PRIVATE_NAMESPACE_HDRS),$(wildcard $(foreach dir,$(HEADER_DIRS),$(dir)/*.h)))
  448. $(C_SYM_OBJS) $(C_OBJS) $(CPP_OBJS) $(C_PIC_OBJS) $(CPP_PIC_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS) $(TESTS_CPP_OBJS): $(HEADERS)
  449. $(TESTS_OBJS) $(TESTS_CPP_OBJS): $(objroot)test/include/test/jemalloc_test.h
  450. endif
  451. $(C_OBJS) $(CPP_OBJS) $(C_PIC_OBJS) $(CPP_PIC_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_INTEGRATION_CPP_OBJS): $(objroot)include/jemalloc/internal/private_namespace.h
  452. $(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_ANALYZE_OBJS) $(C_TESTLIB_STRESS_OBJS) $(TESTS_UNIT_OBJS) $(TESTS_ANALYZE_OBJS) $(TESTS_STRESS_OBJS): $(objroot)include/jemalloc/internal/private_namespace_jet.h
  453. $(C_SYM_OBJS) $(C_OBJS) $(C_PIC_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS): %.$(O):
  454. @mkdir -p $(@D)
  455. $(CC) $(CFLAGS) -c $(CPPFLAGS) $(CTARGET) $<
  456. ifdef CC_MM
  457. @$(CC) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $<
  458. endif
  459. $(C_SYMS): %.sym:
  460. @mkdir -p $(@D)
  461. $(DUMP_SYMS) $< | $(AWK) -f $(objroot)include/jemalloc/internal/private_symbols.awk > $@
  462. $(C_JET_SYMS): %.sym:
  463. @mkdir -p $(@D)
  464. $(DUMP_SYMS) $< | $(AWK) -f $(objroot)include/jemalloc/internal/private_symbols_jet.awk > $@
  465. $(objroot)include/jemalloc/internal/private_namespace.gen.h: $(C_SYMS)
  466. $(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@
  467. $(objroot)include/jemalloc/internal/private_namespace_jet.gen.h: $(C_JET_SYMS)
  468. $(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@
  469. %.h: %.gen.h
  470. @if ! `cmp -s $< $@` ; then echo "cp $< $@"; cp $< $@ ; fi
  471. $(CPP_OBJS) $(CPP_PIC_OBJS) $(TESTS_CPP_OBJS): %.$(O):
  472. @mkdir -p $(@D)
  473. $(CXX) $(CXXFLAGS) -c $(CPPFLAGS) $(CTARGET) $<
  474. ifdef CC_MM
  475. @$(CXX) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $<
  476. endif
  477. ifneq ($(SOREV),$(SO))
  478. %.$(SO) : %.$(SOREV)
  479. @mkdir -p $(@D)
  480. ln -sf $(<F) $@
  481. endif
  482. $(objroot)lib/$(LIBJEMALLOC).$(SOREV) : $(if $(PIC_CFLAGS),$(C_PIC_OBJS),$(C_OBJS)) $(if $(PIC_CFLAGS),$(CPP_PIC_OBJS),$(CPP_OBJS))
  483. @mkdir -p $(@D)
  484. $(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS)
  485. $(objroot)lib/$(LIBJEMALLOC)_pic.$(A) : $(C_PIC_OBJS) $(CPP_PIC_OBJS)
  486. $(objroot)lib/$(LIBJEMALLOC).$(A) : $(C_OBJS) $(CPP_OBJS)
  487. $(objroot)lib/$(LIBJEMALLOC)_s.$(A) : $(C_OBJS) $(CPP_OBJS)
  488. $(STATIC_LIBS):
  489. @mkdir -p $(@D)
  490. $(AR) $(ARFLAGS)@AROUT@ $+
  491. $(objroot)test/unit/%$(EXE): $(objroot)test/unit/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS)
  492. @mkdir -p $(@D)
  493. $(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
  494. $(objroot)test/integration/%$(EXE): $(objroot)test/integration/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
  495. @mkdir -p $(@D)
  496. $(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LJEMALLOC) $(LDFLAGS) $(filter-out -lm,$(filter -lrt -pthread -lstdc++,$(LIBS))) $(LM) $(EXTRA_LDFLAGS)
  497. $(objroot)test/integration/cpp/%$(EXE): $(objroot)test/integration/cpp/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
  498. @mkdir -p $(@D)
  499. $(CXX) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(EXTRA_LDFLAGS)
  500. $(objroot)test/analyze/%$(EXE): $(objroot)test/analyze/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_ANALYZE_OBJS)
  501. @mkdir -p $(@D)
  502. $(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
  503. $(objroot)test/stress/%$(EXE): $(objroot)test/stress/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_STRESS_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
  504. @mkdir -p $(@D)
  505. $(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
  506. build_lib_shared: $(DSOS)
  507. build_lib_static: $(STATIC_LIBS)
  508. ifeq ($(enable_shared), 1)
  509. build_lib: build_lib_shared
  510. endif
  511. ifeq ($(enable_static), 1)
  512. build_lib: build_lib_static
  513. endif
  514. install_bin:
  515. $(INSTALL) -d $(BINDIR)
  516. @for b in $(BINS); do \
  517. $(INSTALL) -v -m 755 $$b $(BINDIR); \
  518. done
  519. install_include:
  520. $(INSTALL) -d $(INCLUDEDIR)/jemalloc
  521. @for h in $(C_HDRS); do \
  522. $(INSTALL) -v -m 644 $$h $(INCLUDEDIR)/jemalloc; \
  523. done
  524. install_lib_shared: $(DSOS)
  525. $(INSTALL) -d $(LIBDIR)
  526. $(INSTALL) -v -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)
  527. ifneq ($(SOREV),$(SO))
  528. ln -sf $(LIBJEMALLOC).$(SOREV) $(LIBDIR)/$(LIBJEMALLOC).$(SO)
  529. endif
  530. install_lib_static: $(STATIC_LIBS)
  531. $(INSTALL) -d $(LIBDIR)
  532. @for l in $(STATIC_LIBS); do \
  533. $(INSTALL) -v -m 755 $$l $(LIBDIR); \
  534. done
  535. install_lib_pc: $(PC)
  536. $(INSTALL) -d $(LIBDIR)/pkgconfig
  537. @for l in $(PC); do \
  538. $(INSTALL) -v -m 644 $$l $(LIBDIR)/pkgconfig; \
  539. done
  540. ifeq ($(enable_shared), 1)
  541. install_lib: install_lib_shared
  542. endif
  543. ifeq ($(enable_static), 1)
  544. install_lib: install_lib_static
  545. endif
  546. install_lib: install_lib_pc
  547. install_doc_html: build_doc_html
  548. $(INSTALL) -d $(DATADIR)/doc/jemalloc$(install_suffix)
  549. @for d in $(DOCS_HTML); do \
  550. $(INSTALL) -v -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \
  551. done
  552. install_doc_man: build_doc_man
  553. $(INSTALL) -d $(MANDIR)/man3
  554. @for d in $(DOCS_MAN3); do \
  555. $(INSTALL) -v -m 644 $$d $(MANDIR)/man3; \
  556. done
  557. install_doc: install_doc_html install_doc_man
  558. install: install_bin install_include install_lib
  559. ifeq ($(enable_doc), 1)
  560. install: install_doc
  561. endif
  562. uninstall_bin:
  563. $(RM) -v $(foreach b,$(notdir $(BINS)),$(BINDIR)/$(b))
  564. uninstall_include:
  565. $(RM) -v $(foreach h,$(notdir $(C_HDRS)),$(INCLUDEDIR)/jemalloc/$(h))
  566. rmdir -v $(INCLUDEDIR)/jemalloc
  567. uninstall_lib_shared:
  568. $(RM) -v $(LIBDIR)/$(LIBJEMALLOC).$(SOREV)
  569. ifneq ($(SOREV),$(SO))
  570. $(RM) -v $(LIBDIR)/$(LIBJEMALLOC).$(SO)
  571. endif
  572. uninstall_lib_static:
  573. $(RM) -v $(foreach l,$(notdir $(STATIC_LIBS)),$(LIBDIR)/$(l))
  574. uninstall_lib_pc:
  575. $(RM) -v $(foreach p,$(notdir $(PC)),$(LIBDIR)/pkgconfig/$(p))
  576. ifeq ($(enable_shared), 1)
  577. uninstall_lib: uninstall_lib_shared
  578. endif
  579. ifeq ($(enable_static), 1)
  580. uninstall_lib: uninstall_lib_static
  581. endif
  582. uninstall_lib: uninstall_lib_pc
  583. uninstall_doc_html:
  584. $(RM) -v $(foreach d,$(notdir $(DOCS_HTML)),$(DATADIR)/doc/jemalloc$(install_suffix)/$(d))
  585. rmdir -v $(DATADIR)/doc/jemalloc$(install_suffix)
  586. uninstall_doc_man:
  587. $(RM) -v $(foreach d,$(notdir $(DOCS_MAN3)),$(MANDIR)/man3/$(d))
  588. uninstall_doc: uninstall_doc_html uninstall_doc_man
  589. uninstall: uninstall_bin uninstall_include uninstall_lib
  590. ifeq ($(enable_doc), 1)
  591. uninstall: uninstall_doc
  592. endif
  593. tests_unit: $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%$(EXE))
  594. tests_integration: $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%$(EXE)) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%$(EXE))
  595. tests_analyze: $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%$(EXE))
  596. tests_stress: $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%$(EXE))
  597. tests: tests_unit tests_integration tests_analyze tests_stress
  598. check_unit_dir:
  599. @mkdir -p $(objroot)test/unit
  600. check_integration_dir:
  601. @mkdir -p $(objroot)test/integration
  602. analyze_dir:
  603. @mkdir -p $(objroot)test/analyze
  604. stress_dir:
  605. @mkdir -p $(objroot)test/stress
  606. check_dir: check_unit_dir check_integration_dir
  607. check_unit: tests_unit check_unit_dir
  608. $(SHELL) $(objroot)test/test.sh $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%)
  609. check_integration_prof: tests_integration check_integration_dir
  610. ifeq ($(enable_prof), 1)
  611. $(MALLOC_CONF)="prof:true" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
  612. $(MALLOC_CONF)="prof:true,prof_active:false" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
  613. endif
  614. check_integration_decay: tests_integration check_integration_dir
  615. $(MALLOC_CONF)="dirty_decay_ms:-1,muzzy_decay_ms:-1" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
  616. $(MALLOC_CONF)="dirty_decay_ms:0,muzzy_decay_ms:0" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
  617. check_integration: tests_integration check_integration_dir
  618. $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
  619. analyze: tests_analyze analyze_dir
  620. ifeq ($(enable_prof), 1)
  621. $(MALLOC_CONF)="prof:true" $(SHELL) $(objroot)test/test.sh $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%)
  622. else
  623. $(SHELL) $(objroot)test/test.sh $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%)
  624. endif
  625. stress: tests_stress stress_dir
  626. $(SHELL) $(objroot)test/test.sh $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%)
  627. check: check_unit check_integration check_integration_decay check_integration_prof
  628. clean:
  629. rm -f $(PRIVATE_NAMESPACE_HDRS)
  630. rm -f $(PRIVATE_NAMESPACE_GEN_HDRS)
  631. rm -f $(C_SYM_OBJS)
  632. rm -f $(C_SYMS)
  633. rm -f $(C_OBJS)
  634. rm -f $(CPP_OBJS)
  635. rm -f $(C_PIC_OBJS)
  636. rm -f $(CPP_PIC_OBJS)
  637. rm -f $(C_JET_SYM_OBJS)
  638. rm -f $(C_JET_SYMS)
  639. rm -f $(C_JET_OBJS)
  640. rm -f $(C_TESTLIB_OBJS)
  641. rm -f $(C_SYM_OBJS:%.$(O)=%.d)
  642. rm -f $(C_OBJS:%.$(O)=%.d)
  643. rm -f $(CPP_OBJS:%.$(O)=%.d)
  644. rm -f $(C_PIC_OBJS:%.$(O)=%.d)
  645. rm -f $(CPP_PIC_OBJS:%.$(O)=%.d)
  646. rm -f $(C_JET_SYM_OBJS:%.$(O)=%.d)
  647. rm -f $(C_JET_OBJS:%.$(O)=%.d)
  648. rm -f $(C_TESTLIB_OBJS:%.$(O)=%.d)
  649. rm -f $(TESTS_OBJS:%.$(O)=%$(EXE))
  650. rm -f $(TESTS_OBJS)
  651. rm -f $(TESTS_OBJS:%.$(O)=%.d)
  652. rm -f $(TESTS_OBJS:%.$(O)=%.out)
  653. rm -f $(TESTS_CPP_OBJS:%.$(O)=%$(EXE))
  654. rm -f $(TESTS_CPP_OBJS)
  655. rm -f $(TESTS_CPP_OBJS:%.$(O)=%.d)
  656. rm -f $(TESTS_CPP_OBJS:%.$(O)=%.out)
  657. rm -f $(DSOS) $(STATIC_LIBS)
  658. distclean: clean
  659. rm -f $(objroot)bin/jemalloc-config
  660. rm -f $(objroot)bin/jemalloc.sh
  661. rm -f $(objroot)bin/jeprof
  662. rm -f $(objroot)config.log
  663. rm -f $(objroot)config.status
  664. rm -f $(objroot)config.stamp
  665. rm -f $(cfghdrs_out)
  666. rm -f $(cfgoutputs_out)
  667. relclean: distclean
  668. rm -f $(objroot)configure
  669. rm -f $(objroot)VERSION
  670. rm -f $(DOCS_HTML)
  671. rm -f $(DOCS_MAN3)
  672. #===============================================================================
  673. # Re-configuration rules.
  674. ifeq ($(enable_autogen), 1)
  675. $(srcroot)configure : $(srcroot)configure.ac
  676. cd ./$(srcroot) && $(AUTOCONF)
  677. $(objroot)config.status : $(srcroot)configure
  678. ./$(objroot)config.status --recheck
  679. $(srcroot)config.stamp.in : $(srcroot)configure.ac
  680. echo stamp > $(srcroot)config.stamp.in
  681. $(objroot)config.stamp : $(cfgoutputs_in) $(cfghdrs_in) $(srcroot)configure
  682. ./$(objroot)config.status
  683. @touch $@
  684. # There must be some action in order for make to re-read Makefile when it is
  685. # out of date.
  686. $(cfgoutputs_out) $(cfghdrs_out) : $(objroot)config.stamp
  687. @true
  688. endif