summaryrefslogtreecommitdiff
blob: 6a0eddfd0474b43faa92c21b81322b7c9fe9a003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- libelf-0.8.9/lib/Makefile.in.orig	2007-06-29 00:09:41.876160240 -0400
+++ libelf-0.8.9/lib/Makefile.in	2007-06-29 00:10:13.601337280 -0400
@@ -174,7 +174,7 @@ installdirs: $(top_srcdir)/mkinstalldirs
 	    $(SHELL) $(top_srcdir)/mkinstalldirs $(instroot)$$dir; \
 	done
 
-install-data:
+install-data: installdirs
 	$(INSTALL_DATA) libelf.a $(instroot)$(libdir)
 	-cd $(instroot)$(libdir) && $(RANLIB) libelf.a
 	files="$(HDRS) $(AUXHDRS) elf_repl.h"; for file in $$files; do \
@@ -194,7 +194,7 @@ uninstall-data:
 
 install-shared-yes: install-shared
 install-shared-no:
-install-shared: $(SHLIB)
+install-shared: installdirs $(SHLIB)
 	$(INSTALL_SHLIB) $(SHLIB) $(instroot)$(libdir)
 	if test "$(SONAME)" = "$(SHLIB)"; then true; else \
 	  cd $(instroot)$(libdir) && $(RM) $(SONAME) && $(LN_S) $(SHLIB) $(SONAME); \
@@ -210,7 +210,7 @@ uninstall-shared:
 
 install-compat-yes: install-compat
 install-compat-no:
-install-compat:
+install-compat: installdirs
 	files="$(HDRS)"; for file in $$files; do \
 	  if test -f $(instroot)$(includedir)/$$file; then true; else \
 	    echo "#include <libelf/$$file>" > $(instroot)$(includedir)/$$file; \
--- libelf-0.8.9/mkinstalldirs.orig	2007-06-29 15:22:54.048886832 -0400
+++ libelf-0.8.9/mkinstalldirs	2007-06-29 15:31:49.261522144 -0400
@@ -23,7 +23,13 @@ for file in ${1+"$@"} ; do 
 
      if test ! -d "${pathcomp}"; then
         echo "mkdir $pathcomp" 1>&2
-        mkdir "${pathcomp}" || errstatus=$?
+        mkdir "${pathcomp}"
+        tmpstatus=$?
+        if test "${tmpstatus}" != 0; then
+           # If there was an error but the dir exists 
+           # then a race happened so ignore the error
+           test -d "${pathcomp}" || errstatus=${tmpstatus}
+        fi
      fi
 
      pathcomp="${pathcomp}/"