From 0656ec0eb49ae2202b6b2978d517c054dfcd3503 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Wed, 7 Apr 2010 23:37:35 -0700 Subject: [PATCH] Fix build system problems. Split library build rules up so that parallel building works. Fix autoconf-related dependencies. Remove obsolete JEMALLOC_VERSION definition. --- .gitignore | 3 +- jemalloc/Makefile.in | 33 ++++++++----------- jemalloc/cfgoutputs.stamp.in | 0 .../{cfghdrs.stamp.in => config.stamp.in} | 0 jemalloc/configure.ac | 12 +++---- jemalloc/include/jemalloc/jemalloc_defs.h.in | 5 --- 6 files changed, 21 insertions(+), 32 deletions(-) delete mode 100644 jemalloc/cfgoutputs.stamp.in rename jemalloc/{cfghdrs.stamp.in => config.stamp.in} (100%) diff --git a/.gitignore b/.gitignore index 07772acc..d9e49f8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /jemalloc/autom4te.cache/ -/jemalloc/cfghdrs.stamp -/jemalloc/cfgoutputs.stamp +/jemalloc/config.stamp /jemalloc/config.log /jemalloc/config.status /jemalloc/configure diff --git a/jemalloc/Makefile.in b/jemalloc/Makefile.in index 79a65095..ce705887 100644 --- a/jemalloc/Makefile.in +++ b/jemalloc/Makefile.in @@ -63,11 +63,17 @@ all: $(DSOS) $(CC) $(CFLAGS) -c $(CPPFLAGS) -o $@ $< @$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $@)))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.o \2/g\" > $(@:%.o=%.d)" -$(DSOS): $(CSRCS:@srcroot@%.c=@objroot@%.o) +%.so : %.so.$(REV) @mkdir -p $(@D) - $(CC) -shared -Wl,-soname,libjemalloc@install_suffix@.so.$(REV) -o $@ $+ $(LDFLAGS) $(LIBS) - ln -sf libjemalloc@install_suffix@.so.$(REV) lib/libjemalloc@install_suffix@.so - ar crus @objroot@lib/libjemalloc@install_suffix@_pic.a $+ + ln -sf $( @srcroot@cfghdrs.stamp.in +@srcroot@config.stamp.in : @srcroot@configure.ac + echo stamp > @srcroot@config.stamp.in -@objroot@cfghdrs.stamp : @cfghdrs_in@ @srcroot@configure - ./@objroot@config.status - @touch $@ - -@cfghdrs@ : @objroot@cfghdrs.stamp - -# cfgoutputs rules. -@srcroot@cfgoutputs.stamp.in : @srcroot@configure.ac - echo stamp > @srcroot@cfgoutputs.stamp.in - -@objroot@cfgoutputs.stamp : @cfgoutputs_in@ @srcroot@configure +@objroot@config.stamp : @cfgoutputs_in@ @cfghdrs_in@ @srcroot@configure ./@objroot@config.status @touch $@ # There must be some action in order for make to re-read Makefile when it is # out of date. -@cfgoutputs@ : @objroot@cfgoutputs.stamp +@cfgoutputs_out@ @cfghdrs_out@ : @objroot@config.stamp @true endif diff --git a/jemalloc/cfgoutputs.stamp.in b/jemalloc/cfgoutputs.stamp.in deleted file mode 100644 index e69de29b..00000000 diff --git a/jemalloc/cfghdrs.stamp.in b/jemalloc/config.stamp.in similarity index 100% rename from jemalloc/cfghdrs.stamp.in rename to jemalloc/config.stamp.in diff --git a/jemalloc/configure.ac b/jemalloc/configure.ac index 9f51999c..4582c71f 100644 --- a/jemalloc/configure.ac +++ b/jemalloc/configure.ac @@ -263,9 +263,9 @@ AC_ARG_WITH([install_suffix], install_suffix="$INSTALL_SUFFIX" AC_SUBST([install_suffix]) -cfgoutputs_in="Makefile doc/jemalloc.3.in" -cfgoutputs_in="${cfgoutputs_in} include/jemalloc/jemalloc.h.in" -cfgoutputs_in="${cfgoutputs_in} include/jemalloc/internal/jemalloc_internal.h.in" +cfgoutputs_in="${srcroot}Makefile.in ${srcroot}doc/jemalloc.3.in" +cfgoutputs_in="${cfgoutputs_in} ${srcroot}include/jemalloc/jemalloc.h.in" +cfgoutputs_in="${cfgoutputs_in} ${srcroot}include/jemalloc/internal/jemalloc_internal.h.in" cfgoutputs_out="Makefile doc/jemalloc${install_suffix}.3" cfgoutputs_out="${cfgoutputs_out} include/jemalloc/jemalloc${install_suffix}.h" @@ -275,7 +275,7 @@ cfgoutputs_tup="Makefile doc/jemalloc${install_suffix}.3:doc/jemalloc.3.in" cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/jemalloc${install_suffix}.h:include/jemalloc/jemalloc.h.in" cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/internal/jemalloc_internal.h" -cfghdrs_in="include/jemalloc/jemalloc_defs.h.in" +cfghdrs_in="${srcroot}include/jemalloc/jemalloc_defs.h.in" cfghdrs_out="include/jemalloc/jemalloc_defs${install_suffix}.h" @@ -720,11 +720,11 @@ AC_HEADER_STDBOOL dnl Process .in files. AC_SUBST([cfghdrs_in]) AC_SUBST([cfghdrs_out]) -AC_CONFIG_HEADERS([$cfghdrs_tup cfghdrs.stamp]) +AC_CONFIG_HEADERS([$cfghdrs_tup]) dnl ============================================================================ dnl Generate outputs. -AC_CONFIG_FILES([$cfgoutputs_tup cfgoutputs.stamp]) +AC_CONFIG_FILES([$cfgoutputs_tup config.stamp]) AC_SUBST([cfgoutputs_in]) AC_SUBST([cfgoutputs_out]) AC_OUTPUT diff --git a/jemalloc/include/jemalloc/jemalloc_defs.h.in b/jemalloc/include/jemalloc/jemalloc_defs.h.in index ddf960d5..8b98d670 100644 --- a/jemalloc/include/jemalloc/jemalloc_defs.h.in +++ b/jemalloc/include/jemalloc/jemalloc_defs.h.in @@ -1,11 +1,6 @@ #ifndef JEMALLOC_DEFS_H_ #define JEMALLOC_DEFS_H_ -/* - * jemalloc version string. - */ -#undef JEMALLOC_VERSION - /* * If JEMALLOC_PREFIX is defined, it will cause all public APIs to be prefixed. * This makes it possible, with some care, to use multiple allocators