From patchwork Sun Oct 31 03:16:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent McIntyre X-Patchwork-Id: 4769 Return-path: Envelope-to: mchehab@gaivota Delivery-date: Mon, 01 Nov 2010 14:40:31 -0400 Received: from mchehab by gaivota with local (Exim 4.72) (envelope-from ) id 1PCzJ0-0002Zj-J3 for mchehab@gaivota; Mon, 01 Nov 2010 14:40:31 -0400 Received: from casper.infradead.org [85.118.1.10] by gaivota with IMAP (fetchmail-6.3.17) for (single-drop); Mon, 01 Nov 2010 14:40:30 -0400 (EDT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PCOP9-0004Np-Hg; Sun, 31 Oct 2010 03:16:23 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754542Ab0JaDQV (ORCPT + 1 other); Sat, 30 Oct 2010 23:16:21 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:46474 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753642Ab0JaDQU (ORCPT ); Sat, 30 Oct 2010 23:16:20 -0400 Received: by gyg4 with SMTP id 4so2630301gyg.19 for ; Sat, 30 Oct 2010 20:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=Hz99ETLh7tbnlSrJd+343TxF2RgKUcME/yaFplJs6zs=; b=wsASSMvvwBI6A1wI/eCCKDjJ9uMXOg2FDKhv93+VwobaylxNvJD6VmmlSLwURU7cwZ NZZcZJjEDR7pD4UF6ivAdRTTtGGpqEUciJpHo8x+Q2zus4/K94FeNiowaISldlbbSRTa dAk15ADLmSnkMXoHB06ZPDxqk4KKGFs9s4SZ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=LwVOBVatBn39NXWNKAPu6P9l/nCds6ru/3zUv+/WOTwMuX+TQNwYWhiAAbFscX+rcr nRQLp6nVeEkgTV+nF4xhNTKxM46GOwQ/DSeVgZx3sPDi5PsI8tZ1MwCztWIasVkaq7RH 3TQFCpzzzVADagyc2pY0JH2212G6jH4KM5pnM= MIME-Version: 1.0 Received: by 10.151.50.20 with SMTP id c20mr19998614ybk.180.1288494978633; Sat, 30 Oct 2010 20:16:18 -0700 (PDT) Received: by 10.151.102.20 with HTTP; Sat, 30 Oct 2010 20:16:18 -0700 (PDT) Date: Sun, 31 Oct 2010 14:16:18 +1100 Message-ID: Subject: [patch] new_build.git - remove bashist equality testing From: Vincent McIntyre To: linux-media Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Mauro Carvalho Chehab Hi, while trying to build this on ubuntu 10.04 (2.6.32-24-generic) I noticed some of the equality tests in linux/Makefile are bash-style, not POSIX-style. The problem I encountered was error messages like: ... make -C ../linux apply_patches make[2]: Entering directory `/home/ltv/git/clones/linuxtv.org/new_build/linux' [: 23: v2.6.32: unexpected operator cat: .patches_applied: No such file or directory [: 23: unexpected operator Please consider applying the attached patch, which fixes the problem for me. Cheers Vince diff --git a/linux/Makefile b/linux/Makefile index 563ed17..801081f 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -60,11 +60,11 @@ help: @echo " untar|clean|distclean" todaytar: - @if [ "$(DIR)" == "" ]; then echo "make $@ DIR="; exit -1; fi + @if [ "$(DIR)" = "" ]; then echo "make $@ DIR="; exit -1; fi -rm $(PWD)/$(TODAY_TAR).bz2 tar cf $(PWD)/$(TODAY_TAR) -C $(DIR) $(TARFILES) for i in $(TARDIR); do \ - if [ "`echo $$i|grep Documentation`" == "" ]; then \ + if [ "`echo $$i|grep Documentation`" = "" ]; then \ dir="`(cd $(DIR); find $$i -type f -name *.[ch])`"; \ dir="$$dir `(cd $(DIR); find $$i -type f -name Makefile)`"; \ dir="$$dir `(cd $(DIR); find $$i -type f -name Kconfig)`"; \ @@ -74,11 +74,11 @@ todaytar: fi; done; bzip2 $(PWD)/$(TODAY_TAR) tar: - @if [ "$(DIR)" == "" ]; then echo "make $@ DIR="; exit -1; fi + @if [ "$(DIR)" = "" ]; then echo "make $@ DIR="; exit -1; fi -rm $(PWD)/linux-media.tar.bz2 tar cf $(PWD)/linux-media.tar -C $(DIR) $(TARFILES) for i in $(TARDIR); do \ - if [ "`echo $$i|grep Documentation`" == "" ]; then \ + if [ "`echo $$i|grep Documentation`" = "" ]; then \ dir="`(cd $(DIR); find $$i -type f -name *.[ch])`"; \ dir="$$dir `(cd $(DIR); find $$i -type f -name Makefile)`"; \ dir="$$dir `(cd $(DIR); find $$i -type f -name Kconfig)`"; \ @@ -94,14 +94,14 @@ clean: -rm -rf $(MAINDIRS) .patches_applied dir: clean - @if [ "$(DIR)" == "" ]; then echo "make $@ DIR="; exit -1; fi + @if [ "$(DIR)" = "" ]; then echo "make $@ DIR="; exit -1; fi @echo "Searching in $(DIR)/Makefile for kernel version." for i in $(TARFILES); do \ install -D $(DIR)/$$i $$i; \ done for i in $(TARDIR); do \ - if [ "`echo $$i|grep Documentation`" == "" ]; then \ + if [ "`echo $$i|grep Documentation`" = "" ]; then \ dir="`(cd $(DIR); find $$i -type f -name *.[ch])`"; \ dir="$$dir `(cd $(DIR); find $$i -type f -name Makefile)`"; \ dir="$$dir `(cd $(DIR); find $$i -type f -name Kconfig)`"; \ @@ -125,9 +125,9 @@ apply_patches apply-patches: fi; \ fi; \ if [ "$(VER)" != "" ]; then dir="v$(VER)"; fi; \ - if [ "$$dir" == "" ]; then echo "make $@ VER="; exit -1; fi; \ + if [ "$$dir" = "" ]; then echo "make $@ VER="; exit -1; fi; \ if [ -e ../backports/$$dir/series ]; then \ - if [ "`cat .patches_applied`" == "$$dir" ]; then \ + if [ "`cat .patches_applied`" = "$$dir" ]; then \ echo "Patches for $$dir already applied."; exit; \ else \ $(MAKE) unapply_patches; \