SPEC-3482: Add package-all in the autobuild case 91/25091/2
authorCorentin LABBE <clabbe@baylibre.com>
Mon, 10 Aug 2020 13:01:21 +0000 (15:01 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 10 Aug 2020 18:16:09 +0000 (20:16 +0200)
Add package-all in the autobuild case

v2 (jsmoeller): update autobuild section, fail on non-autobuild
                and remove old code.

Bug-AGL: SPEC-3482

Change-Id: I57063a3955e140c03d4ae9a23746014a45074669
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
jjb/common/include-apps-build-app.sh
jjb/common/include-old-make-cmake-qmake.sh [new file with mode: 0644]

index ac1a0ec..4a70820 100644 (file)
@@ -71,72 +71,25 @@ if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "apps/"); t
 
         git log -1 --pretty=oneline
 
-        # Fixme: use aglbuild script
-        #set -x
-
         export DONE=0
         export isAUTOBUILD=0
        if [[ -f autobuild/agl/autobuild ]]
        then
             mkdir -p $(pwd)/package/
-           chmod a+x autobuild/agl/autobuild
-           autobuild/agl/autobuild package DEST=$(pwd)/package
+            chmod a+x autobuild/agl/autobuild
+            autobuild/agl/autobuild package-all DEST=$(pwd)/package
             export isAUTOBUILD=1
             export DONE=1
        else
             echo "Your binding doesn't use an autobuild script. Please add it in your project."
            echo "It has to be stored in your root project directory in autobuild/agl/autobuild file"
-           echo "and be able to generate an AGL package in the build root directory using the call"
-           echo "autobuild/agl/autobuild package DEST=build"
-        fi
-
-        ######################################################################
-        # /!\/!\/!\   DEPRECATED FALLBACK WAY TO BUILD AGL APPS /!\/!\/!\    #
-        ######################################################################
-
-        export isCMAKE=0
-        export isMAKE=0
-        export isQMAKE=0
-
-        if test x"0" = x"$DONE" -a -f conf.d/autobuild/agl/autobuild ; then
-            mkdir -p $(pwd)/package/
-            conf.d/autobuild/agl/autobuild package DEST=$(pwd)/package/
-            export isAUTOBUILD=1
-            export DONE=1
-        fi
-        if test x"0" = x"$DONE" -a -f CMakeLists.txt; then
-            rm -rf build || true
-            mkdir build
-            pushd build
-            cmake ../
-            make
-            if test x"0" = x"$DONE" -a -f ../conf.d/autobuild/agl/autobuild ; then
-                ../conf.d/autobuild/agl/autobuild package DEST=$(pwd)/package
-                export isAUTOBUILD=1
-           else
-                make package || true
-               make package-all || true
-           fi
-            popd
-            export isCMAKE=1
-            export DONE=1
-        fi
-        if test x"0" = x"$DONE" -a -f Makefile ; then
-            make
-            make package
-            export isMAKE=1
-            export DONE=1
-        fi
-        if test x"0" = x"$DONE" -a -f ${MYPROJECT}.pro; then
-            qmake
-            make
-            make package
-            export isQMAKE=1
-            export DONE=1
+           echo "and be able to generate an AGL package in the build root directory using the call:"
+            echo "  autobuild/agl/autobuild package DEST=somefolder"
+            echo ""
+            echo "and for all subtypes ... debug, test, coverage:"
+           echo "  autobuild/agl/autobuild package-all DEST=somefolder"
+           exit 1
         fi
-        ######################################################################
-        # /!\/!\/!\                  Ends Here                  /!\/!\/!\    #
-        ######################################################################
 
     popd
 
diff --git a/jjb/common/include-old-make-cmake-qmake.sh b/jjb/common/include-old-make-cmake-qmake.sh
new file mode 100644 (file)
index 0000000..50d2d72
--- /dev/null
@@ -0,0 +1,40 @@
+        ######################################################################
+        # /!\/!\/!\   DEPRECATED FALLBACK WAY TO BUILD AGL APPS /!\/!\/!\    #
+        ######################################################################
+
+        export isCMAKE=0
+        export isMAKE=0
+        export isQMAKE=0
+
+        if test x"0" = x"$DONE" -a -f CMakeLists.txt; then
+           echo "DEBUG: fallback to cmake."
+            rm -rf build || true
+            mkdir build
+            pushd build
+            cmake ../
+            make
+            popd
+            export isCMAKE=1
+            export DONE=1
+        fi
+        if test x"0" = x"$DONE" -a -f Makefile ; then
+           echo "DEBUG: fallback to make"
+            make
+           echo "DEBUG: make package"
+            make package
+            export isMAKE=1
+            export DONE=1
+        fi
+        if test x"0" = x"$DONE" -a -f ${MYPROJECT}.pro; then
+           echo "DEBUG: fallback to qmake"
+            qmake
+           echo "DEBUG: qmake: make"
+            make
+           echo "DEBUG: qmake: make package"
+            make package
+            export isQMAKE=1
+            export DONE=1
+        fi
+        ######################################################################
+        # /!\/!\/!\                  Ends Here                  /!\/!\/!\    #
+        ######################################################################