build_grouped_sources.py 743 B

12345678910111213141516171819202122
  1. #! /usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3. import sys, os
  4. #----------------------------------------------------------------------------------------------------------------------*
  5. separator = "//" + ("—" * 118) + "\n"
  6. #------------------------------ Destination file
  7. destinationFile = sys.argv [1]
  8. # print ("Dest " + destinationFile)
  9. #------------------------------ Header files
  10. s = separator + "\n"
  11. for i in range (2, len (sys.argv)):
  12. s += "#include \"" + sys.argv [i] + "\"\n"
  13. s += "\n" + separator
  14. #------------------------------ Write destination file
  15. f = open (destinationFile, "wt")
  16. f.write (s)
  17. f.close()
  18. #----------------------------------------------------------------------------------------------------------------------*