gdb.py 739 B

123456789101112131415161718192021222324252627282930313233
  1. from SCons.Builder import Builder
  2. from SCons.Action import Action
  3. def generate(env):
  4. env.SetDefault(
  5. GDB="gdb",
  6. GDBPY="gdb-py",
  7. GDBOPTS="",
  8. GDBPYOPTS="",
  9. GDBCOM="$GDB $GDBOPTS $SOURCES", # no $TARGET
  10. GDBPYCOM="$GDBPY $GDBOPTS $GDBPYOPTS $SOURCES", # no $TARGET
  11. )
  12. env.Append(
  13. BUILDERS={
  14. "GDB": Builder(
  15. action=Action(
  16. "${GDBCOM}",
  17. "${GDBCOMSTR}",
  18. ),
  19. ),
  20. "GDBPy": Builder(
  21. action=Action(
  22. "${GDBPYCOM}",
  23. "${GDBPYCOMSTR}",
  24. ),
  25. ),
  26. }
  27. )
  28. def exists(env):
  29. return True