]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix issues with lib/malloc out-of-dir builds
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Dec 2020 03:16:27 +0000 (19:16 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Dec 2020 03:17:04 +0000 (19:17 -0800)
Problem reported by Mattias EngdegĂ„rd in:
https://lists.gnu.org/r/emacs-devel/2020-12/msg01626.html
* configure.ac: If the scratch_buffer module is enabled, create
lib/malloc and (if doing dependencies) lib/deps/malloc.
* lib/Makefile.in (DEPFLAGS) [AUTO_DEPEND]: No longer any need to
squash lib dependencies into a single directory.
(clean): Also remove */*.o and $(DEPDIR)/*/*.d, to clean out
malloc/*.o and deps/malloc/*.d.  Just remove *.d files in
dependencies so that rm does not complain about not being able to
remove deps/malloc.
(extraclean): Also remove malloc, if it is empty.

configure.ac
lib/Makefile.in

index 888b41514870252036518442602ef6c27d32fb56..bf768441fe3ef59b14872082a3c88282813b343c 100644 (file)
@@ -5878,6 +5878,12 @@ if test $AUTO_DEPEND = yes; then
      AS_MKDIR_P([$dir/deps])
    done
 fi
+if $gl_gnulib_enabled_scratch_buffer; then
+  AS_MKDIR_P([lib/malloc])
+  if test $AUTO_DEPEND = yes; then
+    AS_MKDIR_P([lib/deps/malloc])
+  fi
+fi
 
 AC_OUTPUT
 
index a280b7a33118b4f3e4e76bb295b6910c168f87cf..e6b1ae6a9ab87c7e7766b34e83fb3f4075c57c13 100644 (file)
@@ -67,7 +67,7 @@ endif
 
 DEPDIR = deps
 ifeq ($(AUTO_DEPEND),yes)
-  DEPFLAGS = -MMD -MF $(DEPDIR)/$(*F).d -MP
+  DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP
   -include $(ALLOBJS:%.o=$(DEPDIR)/%.d)
 else
   DEPFLAGS =
@@ -118,7 +118,7 @@ TAGS: $(ETAGS) $(tagsfiles)
 .PHONY: $(ETAGS) tags
 
 clean:
-       rm -f ./*.[ao] ./*-t \#* $(DEPDIR)/*
+       rm -f ./*.[ao] ./*/*.o ./*-t \#* $(DEPDIR)/*.d $(DEPDIR)/*/*.d
 mostlyclean: clean
        rm -f $(filter-out %-t,$(MOSTLYCLEANFILES))
 distclean bootstrap-clean: mostlyclean
@@ -127,7 +127,7 @@ distclean bootstrap-clean: mostlyclean
 maintainer-clean: distclean
        rm -f TAGS gnulib.mk
 extraclean: distclean
-       -rmdir sys 2>/dev/null
+       -rmdir malloc sys 2>/dev/null
 
 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean