Patchwork Fix abuild -sb

login
register
about
Submitter Patrick Georgi
Date 2010-04-19 09:59:36
Message ID <4BCC2988.5020906@georgi-clan.de>
Download mbox | patch
Permalink /patch/1241/
State Superseded
Headers show

Comments

Patrick Georgi - 2010-04-19 09:59:36
Hi,

abuild's scanbuild support was broken, and we didn't noticed. Following
patch also cleans up some rough edges.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>

 drivers:=

Patch

Index: util/abuild/abuild
===================================================================
--- util/abuild/abuild  (revision 5455)
+++ util/abuild/abuild  (working copy)
@@ -430,12 +430,15 @@ 
        stime=`perl -e 'print time();' 2>/dev/null || date +%s`
        create_buildenv $VENDOR $MAINBOARD $CONFIG
        if [ $? -eq 0  -a  $configureonly -eq 0 ]; then
+               if [ "$scanbuild" = "true" ]; then
+                       rm -rf $TARGET/scan-build-results-tmp
+               fi
                compile_target $VENDOR $MAINBOARD &&
                        xml "  <status>ok</status>" ||
                        xml "<status>broken</status>"
                if [ "$scanbuild" = "true" ]; then
+                       rm -rf $TARGET/${VENDOR}_${MAINBOARD}-scanbuild
                        mv `dirname
$TARGET/scan-build-results-tmp/*/index.html`
$TARGET/${VENDOR}_${MAINBOARD}-scanbuild
-                       MAKE=$origMAKE
                fi
        fi
        # Not calculated here because we still print it in compile_target
Index: Makefile
===================================================================
--- Makefile    (revision 5455)
+++ Makefile    (working copy)
@@ -155,6 +155,10 @@ 
        mkdir -p $(obj)/mainboard/$(MAINBOARDDIR)
        $(objutil)/sconfig/sconfig $(MAINBOARDDIR)
$(obj)/mainboard/$(MAINBOARDDIR)

+$(obj)/%.o: $(obj)/%.c $(obj)/config.h
+       printf "    CC         $(subst $(obj)/,,$(@))\n"
+       $(CC) -MMD $(CFLAGS) -c -o $@ $<
+
 objs:=$(obj)/mainboard/$(MAINBOARDDIR)/static.o
 initobjs:=