Skip to contentSkip to conversation

pkg-stats: update grep tests for package type

PATCH New H Hartley Sweeten 2 participants 2 messages Oct 4, 2011 – Oct 5, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkg-stats: update grep tests for package type

Update the grep tests used to determine the package type.

The package name and directory are now worked out magically due to:

package: add helper functions to get package name and directory magically

Because of this the extra arguments were removed by patches:

package: remove useless arguments from GENTARGETS
package: remove useless arguments from AUTOTARGETS
package: remove useless arguments from CMAKETARGETS

---

support/scripts/pkg-stats +6 -6
index bb1c27d..8602b0f 100755
@@ -98,27 +98,27 @@ for i in $(find package/ -name '*.mk') ; do
     is_manual_target=0
     is_manual_host=0
 
-    if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then
+    if grep -E "\(call AUTOTARGETS,host\)" $i > /dev/null ; then
 	is_auto_host=1
     fi
 
-    if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then
+    if grep -E "\(call AUTOTARGETS\)" $i > /dev/null ; then
 	is_auto_target=1
     fi
 
-    if grep -E "\(call GENTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then
+    if grep -E "\(call GENTARGETS,host\)" $i > /dev/null ; then
 	is_pkg_host=1
     fi
 
-    if grep -E "\(call GENTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then
+    if grep -E "\(call GENTARGETS\)" $i > /dev/null ; then
 	is_pkg_target=1
     fi
 
-    if grep -E "\(call CMAKETARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then
+    if grep -E "\(call CMAKETARGETS,host\)" $i > /dev/null ; then
 	is_cmake_host=1
     fi
 
-    if grep -E "\(call CMAKETARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then
+    if grep -E "\(call CMAKETARGETS\)" $i > /dev/null ; then
 	is_cmake_target=1
     fi
 
#1 lore raw

PATCH 1/1 pkg-stats: update grep tests for package type

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"H" == H Hartley Sweeten <[email protected]> writes:

H> Update the grep tests used to determine the package type. H> The package name and directory are now worked out magically due to:

H> package: add helper functions to get package name and directory magically

H> Because of this the extra arguments were removed by patches:

 H>  package: remove useless arguments from GENTARGETS
 H>  package: remove useless arguments from AUTOTARGETS
 H>  package: remove useless arguments from CMAKETARGETS

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard