您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

45 行
1.5 KiB

  1. #!/bin/sh
  2. # This script is intended to test the python program genlink.py for the linker
  3. # script generator feature.
  4. #
  5. # See ld/README file for more info.
  6. #
  7. # This file is part of the libopencm3 project.
  8. #
  9. # Copyright (C) 2013 Frantisek Burian <Bufran@seznam.cz>
  10. # Copyright (C) 2013 Werner Almesberger <wpwrak>
  11. #
  12. # This library is free software: you can redistribute it and/or modify
  13. # it under the terms of the GNU Lesser General Public License as published by
  14. # the Free Software Foundation, either version 3 of the License, or
  15. # (at your option) any later version.
  16. #
  17. # This library is distributed in the hope that it will be useful,
  18. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. # GNU Lesser General Public License for more details.
  21. #
  22. # You should have received a copy of the GNU Lesser General Public License
  23. # along with this library. If not, see <http://www.gnu.org/licenses/>.
  24. # run test
  25. DEVICE=`basename $1`;
  26. (scripts/genlink.py $1.data $DEVICE CPPFLAGS; echo) > $1.out
  27. (scripts/genlink.py $1.data $DEVICE DEFS; echo) >> $1.out
  28. (scripts/genlink.py $1.data $DEVICE FAMILY; echo) >> $1.out
  29. (scripts/genlink.py $1.data $DEVICE SUBFAMILY; echo) >> $1.out
  30. (scripts/genlink.py $1.data $DEVICE CPU; echo) >> $1.out
  31. (scripts/genlink.py $1.data $DEVICE FPU; echo) >> $1.out
  32. #check test
  33. if ! diff -q $1.out $1.result >/dev/null; then
  34. exit 1;
  35. fi
  36. #remove workout only if it is OK
  37. rm -f $1.out
  38. exit 0