فهرست منبع

libelf: Fix trying to 'clean' on BSD where it is not used.

This manifested as a 'rm: libelf: is a directory' because the
configure script has no support for BSD for shared libraries.
It tries to remove libelf@SOLIB@ and ends up trying to remove
the libelf include dir instead
Bryan Drewery 11 سال پیش
والد
کامیت
a1e5909daf
1فایلهای تغییر یافته به همراه8 افزوده شده و 5 حذف شده
  1. 8 5
      lib/Makefile.in

+ 8 - 5
lib/Makefile.in

@@ -4,6 +4,7 @@ top_srcdir = @top_srcdir@
 top_builddir = @top_builddir@
 srcdir = @srcdir@
 VPATH = @srcdir@
+LIBELF_BUNDLED = @LIBELF_BUNDLED@
 
 @SET_MAKE@
 
@@ -15,12 +16,14 @@ default: normal
 
 clean:
 	-+@cd bdlib && $(MAKE) clean
-	-+@test -f libelf/Makefile && cd libelf && $(MAKE) clean
+	-+@[ -n "${LIBELF_BUNDLED}" ] && [ -f libelf/Makefile && \
+	    cd libelf && $(MAKE) clean
 	@rm -f *.a
 
 distclean: clean
 	-+@cd bdlib && $(MAKE) distclean
-	-+@test -f libelf/Makefile && cd libelf && $(MAKE) distclean
+	-+@[ -n "${LIBELF_BUNDLED}" ] && [ -f libelf/Makefile ] && \
+	    cd libelf && $(MAKE) distclean
 
 notice:
 	@echo "[*] Making libraries"
@@ -40,15 +43,15 @@ libelf_notice:
 $(top_builddir)/lib/libelf/lib/libelf.a: libelf_notice
 	+@cd libelf/lib && $(MAKE) CFLAGS="-g -O2 -w" libelf.a
 
-libelf: @LIBELF_BUNDLED@
+libelf: $(LIBELF_BUNDLED)
 
 $(top_builddir)/lib/bdlib/src/libbdlib.a:
 	+@cd bdlib && $(MAKE) bdlib
 
 bdlib: $(top_builddir)/lib/bdlib/src/libbdlib.a
 
-build: $(top_builddir)/lib/bdlib/src/libbdlib.a @LIBELF_BUNDLED@
-build.debug: $(top_builddir)/lib/bdlib/src/libbdlib.a @LIBELF_BUNDLED@
+build: $(top_builddir)/lib/bdlib/src/libbdlib.a $(LIBELF_BUNDLED)
+build.debug: $(top_builddir)/lib/bdlib/src/libbdlib.a $(LIBELF_BUNDLED)
 
 buildcheck: build