mk_target 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. set -e
  2. . macros
  3. : machine-dependant stuff
  4. create_dir $TARGET_HOME
  5. create_dir $TARGET_HOME/config
  6. create_dir $TARGET_HOME/lib.bin
  7. create_dir $TARGET_HOME/modules
  8. create_dir $TARGET_HOME/modules/h
  9. create_dir $TARGET_HOME/modules/man
  10. create_dir $TARGET_HOME/modules/pkg
  11. create_dir $TARGET_HOME/modules/lib
  12. create_dir $TARGET_HOME/bin
  13. ( cd $SRC_HOME/modules/h ; tar chf - . ) | ( cd $TARGET_HOME/modules/h ; tar xf - )
  14. cp local.h em_path.h $TARGET_HOME/config
  15. ( cd $SRC_HOME/bin ; tar chf - . ) | ( cd $TARGET_HOME/bin ; tar xf - )
  16. echo "echo $SYSNAME" > $TARGET_HOME/bin/ack_sys
  17. chmod +x $TARGET_HOME/bin/ack_sys
  18. : machine-independant stuff
  19. if [ $DO_MACHINE_INDEP = n ]
  20. then
  21. exit 0
  22. fi
  23. create_dir $TARGET_HOME/lib
  24. create_dir $TARGET_HOME/etc
  25. create_dir $TARGET_HOME/h
  26. create_dir $TARGET_HOME/include
  27. create_dir $TARGET_HOME/doc
  28. create_dir $TARGET_HOME/man
  29. cp $SRC_HOME/etc/ip_spec.t $TARGET_HOME/etc/ip_spec.t
  30. ( cd $SRC_HOME/lib ; tar chf - . ) | ( cd $TARGET_HOME/lib ; tar xf - )
  31. ( cd $SRC_HOME/include ; tar chf - . ) | ( cd $TARGET_HOME/include ; tar xf - )
  32. ( cd $SRC_HOME/h ; tar chf - . ) | ( cd $TARGET_HOME/h ; tar xf - )
  33. ( cd $SRC_HOME/man ; tar chf - . ) | ( cd $TARGET_HOME/man ; tar xf - )
  34. ( cd $SRC_HOME/doc ; tar chf - . ) | ( cd $TARGET_HOME/doc ; tar xf - )
  35. exit 0