make install error: dmraid/1.0.0.rc13

douglas baldwin douglasbaldwin at
Thu Nov 2 16:54:49 UTC 2006


I performed make and install with no options.  But, 'make install' generated 
an error.  The message and relevant shell script snippet are attached below. 
I'd appreciate a suggestion on how to correct the script.

I would guess the "if" statement is causing the error.


===error message===

make -C lib install
make[1]: Entering directory `/root/dmraid/1.0.0.rc13/lib'
../lib/libdmraid.a ../lib/libdmraid.a
/bin/sh: -c: line 1: conditional binary operator expected
/bin/sh: -c: line 1: syntax error near `=~'
/bin/sh: -c: line 1: `echo "Installing ../lib/libdmraid.a in /lib"; 
 mkdir -p /lib;  for f in ../lib/libdmraid.a;  do  n=$(basename ${f}) ;  if 
[[ "$n" =~ '.so$' ]]; then  /usr/bin/install -c -m 555   $f 
/lib/${n}.1.0.0.rc13;  ln -s -f ${n}.1.0.0.rc13 /lib/${n};  else 
/usr/bin/install -c -m 555  $f /lib/${n};  fi  done'
make[1]: *** [install_dmraid_libs] Error 2
make[1]: Leaving directory `/root/dmraid/1.0.0.rc13/lib'
make: *** [lib.install] Error 2

===script snippet===

install_dmraid_libs: $(INSTALL_TARGETS)
 @echo "Installing $(INSTALL_TARGETS) in $(libdir)"; \
 mkdir -p $(libdir); \
 for f in $(INSTALL_TARGETS); \
 do \
  n=$$(basename $${f}) ; \
  if [[ "$$n" =~ '.so$$' ]]; then \
   $(INSTALL) -m 555 $(STRIP) \
    $$f $(libdir)/$${n}.1.0.0.rc13; \
   $(LN_S) -f $${n}.1.0.0.rc13 $(libdir)/$${n}; \
  else \
   $(INSTALL) -m 555 $(STRIP) $$f $(libdir)/$${n}; \
  fi \

More information about the Ataraid-list mailing list