From 4643b181bdf1d9121f9d6d4214e991e7b9f52d30 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 1 Jan 2002 21:57:28 +0000 Subject: Change all 'cd ; bar' constructs to 'cd && bar' for proper error checking -Erik --- extra/scripts/get-needed-libgcc-objects.sh | 8 ++++---- ldso/ldso/Makefile | 4 ++-- ldso/libdl/Makefile | 4 ++-- ldso/util/Makefile | 2 +- libc/Makefile | 6 +++--- libc/sysdeps/linux/i386/Makefile | 4 ++-- libc/sysdeps/linux/m68k/Makefile | 4 ++-- libc/sysdeps/linux/mips/Makefile | 2 +- libcrypt/Makefile | 4 ++-- libm/Makefile | 4 ++-- libpthread/Makefile | 4 ++-- libresolv/Makefile | 4 ++-- libutil/Makefile | 4 ++-- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/extra/scripts/get-needed-libgcc-objects.sh b/extra/scripts/get-needed-libgcc-objects.sh index 0caa2c5f6..827262ac7 100755 --- a/extra/scripts/get-needed-libgcc-objects.sh +++ b/extra/scripts/get-needed-libgcc-objects.sh @@ -36,7 +36,7 @@ fi rm -rf tmp-gcc mkdir tmp-gcc -(cd tmp-gcc ; $AR -x $LIBGCC) +(cd tmp-gcc && $AR -x $LIBGCC) rm -f libgcc.ldr echo Extracting referenced libgcc.a objects ... @@ -44,7 +44,7 @@ echo Extracting referenced libgcc.a objects ... rm -f obj.need.0 touch obj.need.0 while [ -s obj.need ] && ! cmp -s obj.need obj.need.0 ; do - (cd tmp-gcc ; cat ../obj.need | uniq | xargs $LD -r -o ../libgcc.ldr) + (cd tmp-gcc && cat ../obj.need | uniq | xargs $LD -r -o ../libgcc.ldr) cp obj.need obj.need.0 if $NM --undefined-only libgcc.ldr > sym.need ; then for SYM in `cat sym.need | sed -e 's/ U //g'` ; do @@ -56,12 +56,12 @@ while [ -s obj.need ] && ! cmp -s obj.need obj.need.0 ; do done cat obj.need | sort | uniq > obj.need.0 -(cd tmp-gcc ; cp `cat ../obj.need` ..) +(cd tmp-gcc && cp `cat ../obj.need` ..) if [ -s obj.need.0 ] ; then echo Objects added from $LIBGCC: cat obj.need.0 - (cd tmp-gcc ; cat ../obj.need | uniq | xargs $AR r ../libgcc-need.a) + (cd tmp-gcc && cat ../obj.need | uniq | xargs $AR r ../libgcc-need.a) else echo No objects added from $LIBGCC. fi diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile index a61998b10..d85900fbb 100644 --- a/ldso/ldso/Makefile +++ b/ldso/ldso/Makefile @@ -32,7 +32,7 @@ TARGET_CFLAGS += #-DDL_DEBUG #-funroll-loops LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so TARGET_CFLAGS+=-fPIC -D__PIC__ -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR); pwd)\" + -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" CSRC= boot1.c hash.c readelflib1.c $(TARGET_ARCH)/elfinterp.c COBJS=$(patsubst %.c,%.o, $(CSRC)) ASRC=$(shell ls $(TARGET_ARCH)/*.S) @@ -47,7 +47,7 @@ lib:: ld.so.h $(OBJS) $(DLINK_OBJS) -Wl,-soname,$(UCLIBC_LDSO) $(OBJS) install -d $(TOPDIR)lib install -m 755 $(LDSO_FULLNAME) $(TOPDIR)lib - (cd $(TOPDIR)lib;ln -sf $(LDSO_FULLNAME) $(UCLIBC_LDSO)) + (cd $(TOPDIR)lib && ln -sf $(LDSO_FULLNAME) $(UCLIBC_LDSO)) ld.so.h: Makefile echo "#define _dl_static_progname \""$(UCLIBC_LDSO)"\"" > ld.so.h diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile index 3187ee340..faaced6c0 100644 --- a/ldso/libdl/Makefile +++ b/ldso/libdl/Makefile @@ -55,8 +55,8 @@ shared: all install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBDL_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib; - (cd $(TOPDIR)lib; ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED)); - (cd $(TOPDIR)lib; ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED).$(MAJOR_VERSION)); + (cd $(TOPDIR)lib && ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED)); + (cd $(TOPDIR)lib && ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED).$(MAJOR_VERSION)); clean: $(RM) -f .depend $(LIBDL_SHARED)* $(LIBDL_SHARED_FULLNAME) core *.o *.a *.s *.i tmp_make foo *~ diff --git a/ldso/util/Makefile b/ldso/util/Makefile index 6e3d5530b..99d0bf04b 100644 --- a/ldso/util/Makefile +++ b/ldso/util/Makefile @@ -50,7 +50,7 @@ endif ldd: ldd.c $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR); pwd)\" \ + -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \ -static ldd.c -o $@ $(STRIPTOOL) -x -R .note -R .comment $@ diff --git a/libc/Makefile b/libc/Makefile index ee8dfef75..295386c2b 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -43,7 +43,7 @@ $(LIBNAME): subdirs shared: $(TOPDIR)lib/$(LIBNAME) @rm -rf tmp @mkdir tmp - @(cd tmp; CC=$(CC) LD=$(LD) NM=$(NM) AR=$(AR) /bin/sh ../../extra/scripts/get-needed-libgcc-objects.sh) + @(cd tmp && CC=$(CC) LD=$(LD) NM=$(NM) AR=$(AR) /bin/sh ../../extra/scripts/get-needed-libgcc-objects.sh) if [ -s ./tmp/libgcc-need.a ] ; then \ $(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \ -Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \ @@ -58,8 +58,8 @@ shared: $(TOPDIR)lib/$(LIBNAME) install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(SHARED_FULLNAME) install -m 644 $(SHARED_FULLNAME) $(TOPDIR)lib - (cd ../lib; ln -sf $(SHARED_FULLNAME) libc.so); - (cd ../lib; ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME)); + (cd ../lib && ln -sf $(SHARED_FULLNAME) libc.so); + (cd ../lib && ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME)); halfclean: diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile index 4a333801f..6178c662c 100644 --- a/libc/sysdeps/linux/i386/Makefile +++ b/libc/sysdeps/linux/i386/Makefile @@ -74,8 +74,8 @@ $(COBJS): %.o : %.c headers: @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) - cd $(TOPDIR)/include/sys;ln -fs ../../libc/sysdeps/linux/i386/vm86.h . - cd $(TOPDIR)/include/sys;ln -fs ../../libc/sysdeps/linux/i386/reg.h . + cd $(TOPDIR)/include/sys && ln -fs ../../libc/sysdeps/linux/i386/vm86.h . + cd $(TOPDIR)/include/sys && ln -fs ../../libc/sysdeps/linux/i386/reg.h . clean: diff --git a/libc/sysdeps/linux/m68k/Makefile b/libc/sysdeps/linux/m68k/Makefile index ae81e2230..701f339dd 100644 --- a/libc/sysdeps/linux/m68k/Makefile +++ b/libc/sysdeps/linux/m68k/Makefile @@ -72,10 +72,10 @@ $(COBJS): %.o : %.c headers: @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) - cd $(TOPDIR)/include/sys;ln -fs ../../libc/sysdeps/linux/m68k/reg.h . + cd $(TOPDIR)/include/sys && ln -fs ../../libc/sysdeps/linux/m68k/reg.h . ifeq ($(strip $(HAVE_ELF)),false) echo "Working around compiler bug in the m68k-pic-coff toolchain" - cd $(TOPDIR)/include;ln -fs ../libc/sysdeps/linux/m68k/float.h . + cd $(TOPDIR)/include && ln -fs ../libc/sysdeps/linux/m68k/float.h . endif diff --git a/libc/sysdeps/linux/mips/Makefile b/libc/sysdeps/linux/mips/Makefile index 18a0e5f68..2d881d774 100644 --- a/libc/sysdeps/linux/mips/Makefile +++ b/libc/sysdeps/linux/mips/Makefile @@ -74,7 +74,7 @@ $(COBJS): %.o : %.c headers: @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) - cd $(TOPDIR)/include;ln -fs ../libc/sysdeps/linux/mipsel/sgidefs.h . + cd $(TOPDIR)/include && ln -fs ../libc/sysdeps/linux/mipsel/sgidefs.h . clean: rm -f *.[oa] *~ core diff --git a/libcrypt/Makefile b/libcrypt/Makefile index 20c177ba3..4d6354b73 100644 --- a/libcrypt/Makefile +++ b/libcrypt/Makefile @@ -53,8 +53,8 @@ shared: all install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib; - (cd $(TOPDIR)lib; ln -sf $(LIBCRYPT_SHARED_FULLNAME) $(LIBCRYPT_SHARED)); - (cd $(TOPDIR)lib; ln -sf $(LIBCRYPT_SHARED_FULLNAME) $(LIBCRYPT_SHARED).$(MAJOR_VERSION)); + (cd $(TOPDIR)lib && ln -sf $(LIBCRYPT_SHARED_FULLNAME) $(LIBCRYPT_SHARED)); + (cd $(TOPDIR)lib && ln -sf $(LIBCRYPT_SHARED_FULLNAME) $(LIBCRYPT_SHARED).$(MAJOR_VERSION)); clean: rm -f *.[oa] *~ core $(LIBCRYPT_SHARED)* $(LIBCRYPT_SHARED_FULLNAME)* diff --git a/libm/Makefile b/libm/Makefile index 28f672f9f..ef86ab672 100644 --- a/libm/Makefile +++ b/libm/Makefile @@ -98,8 +98,8 @@ shared: all install -d $(TOPDIR)lib; \ rm -f $(TOPDIR)lib/$(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION); \ install -m 644 $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib; \ - (cd $(TOPDIR)lib; ln -sf $(LIBM_SHARED_FULLNAME) $(LIBM_SHARED)); \ - (cd $(TOPDIR)lib; ln -sf $(LIBM_SHARED_FULLNAME) $(LIBM_SHARED).$(MAJOR_VERSION)); \ + (cd $(TOPDIR)lib && ln -sf $(LIBM_SHARED_FULLNAME) $(LIBM_SHARED)); \ + (cd $(TOPDIR)lib && ln -sf $(LIBM_SHARED_FULLNAME) $(LIBM_SHARED).$(MAJOR_VERSION)); \ fi; ar-target: $(OBJS) diff --git a/libpthread/Makefile b/libpthread/Makefile index 6c10431af..f844ee82a 100644 --- a/libpthread/Makefile +++ b/libpthread/Makefile @@ -53,8 +53,8 @@ shared: all install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib; - (cd $(TOPDIR)lib; ln -sf $(LIBPTHREAD_SHARED_FULLNAME) $(LIBPTHREAD_SHARED)); - (cd $(TOPDIR)lib; ln -sf $(LIBPTHREAD_SHARED_FULLNAME) $(LIBPTHREAD_SHARED).$(MAJOR_VERSION)); + (cd $(TOPDIR)lib && ln -sf $(LIBPTHREAD_SHARED_FULLNAME) $(LIBPTHREAD_SHARED)); + (cd $(TOPDIR)lib && ln -sf $(LIBPTHREAD_SHARED_FULLNAME) $(LIBPTHREAD_SHARED).$(MAJOR_VERSION)); clean: rm -f *.[oa] *~ core $(LIBPTHREAD_SHARED)* $(LIBPTHREAD_SHARED_FULLNAME)* diff --git a/libresolv/Makefile b/libresolv/Makefile index 897532fcf..44b02b58a 100644 --- a/libresolv/Makefile +++ b/libresolv/Makefile @@ -54,8 +54,8 @@ shared: all install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBRESOLV_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib; - (cd $(TOPDIR)lib; ln -sf $(LIBRESOLV_SHARED_FULLNAME) $(LIBRESOLV_SHARED)); - (cd $(TOPDIR)lib; ln -sf $(LIBRESOLV_SHARED_FULLNAME) $(LIBRESOLV_SHARED).$(MAJOR_VERSION)); + (cd $(TOPDIR)lib && ln -sf $(LIBRESOLV_SHARED_FULLNAME) $(LIBRESOLV_SHARED)); + (cd $(TOPDIR)lib && ln -sf $(LIBRESOLV_SHARED_FULLNAME) $(LIBRESOLV_SHARED).$(MAJOR_VERSION)); clean: rm -f *.[oa] *~ core $(LIBRESOLV_SHARED)* $(LIBRESOLV_SHARED_FULLNAME)* diff --git a/libutil/Makefile b/libutil/Makefile index bd7083eff..705f89fa1 100644 --- a/libutil/Makefile +++ b/libutil/Makefile @@ -55,8 +55,8 @@ shared: all install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBUTIL_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/; - (cd $(TOPDIR)lib; ln -sf $(LIBUTIL_SHARED_FULLNAME) $(LIBUTIL_SHARED)); - (cd $(TOPDIR)lib; ln -sf $(LIBUTIL_SHARED_FULLNAME) $(LIBUTIL_SHARED).$(MAJOR_VERSION)); + (cd $(TOPDIR)lib && ln -sf $(LIBUTIL_SHARED_FULLNAME) $(LIBUTIL_SHARED)); + (cd $(TOPDIR)lib && ln -sf $(LIBUTIL_SHARED_FULLNAME) $(LIBUTIL_SHARED).$(MAJOR_VERSION)); clean: rm -f *.[oa] *~ core $(LIBUTIL_SHARED)* $(LIBUTIL_SHARED_FULLNAME)* -- cgit v1.2.3