Hiho there,

I am trying to write a header file when qmake is executed and I can't make it write the characters "<" and ">".
More detailed, I would (simplified) like qmake to write following lines in a file called "test.hpp" for example!
As I am stuck at Qt4, I can't use the function "write_file", so my way would be to use "system()" instead, which works fine.

Qt Code:
  1. ...
  2. H = $$LITERAL_HASH
  3. line01 = "$${H}ifndef TEST_HPP"
  4. line02 = "$${H}define TEST_HPP"
  5. line03 = "\n"
  6. line04 = "$${H}include <QString>"
  7. line05 = "\\n"
  8. line06 = "$${H}endif //TEST_HPP"
  9.  
  10. ...
  11. system(echo $${line01} > test.hpp)
  12. system(echo $${line02} >> test.hpp)
  13. system(echo $${line03} >> test.hpp)
  14. system(echo $${line04} >> test.hpp)
  15. system(echo $${line05} >> test.hpp)
  16. system(echo $${line06} >> test.hpp)
  17. ...
To copy to clipboard, switch view to plain text mode 

As long as I include those two characters, the file is not containing "line04".
The other minor problem is that I can't also create the empty line, as in "line03" and "line05". Backslash and double backslash doesn't work here!
But I could live without that if the include would work properly!
So, if you know the way, please enlighten me too... And if you know a better way of creating that file, please feel free to point this out.

Thanks in advance!

freeman_w