#!/usr/bin/perl $dir_uboot = "u-boot"; $dir_out = "configxs"; open (MAKEFILE, "<$dir_uboot/Makefile") || die "$dir_uboot/Makefile must be the top level Makefile"; -d $dir_out || qx(mkdir -p $dir_out); qx(rm $dir_out/* 2>&1); my %configs = (); while () { next if ! m/^(.*_config):/; $configs{$1} = 1; } for $c (sort (keys (%configs))) { print "$c \n"; -f "$dir_uboot/configx.mk" && unlink ("$dir_uboot/configx.mk"); print qx(cd $dir_uboot; make $c; make configx.mk); # print qq(mv "$dir_uboot/configx.mk" "$dir_out/${c}_configx.mk"); qx!mv "$dir_uboot/configx.mk" "$dir_out/${c}_configx.mk"!; last; } 0;