Author Topic: Missing escaping in Makefile generator  (Read 2758 times)

Offline kkretzsch

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 217
Missing escaping in Makefile generator
« on: 2014 December 22 11:23:18 »
Hi Juan,
Makefile generation didn't work on my workspace since there are some special characters in my PCLDIR directory (e.g. /C++/.../g++/) which I think have to be escaped when using in regular expressions.

    var escaped_PCLSRCDIR = PCLSRCDIR.replace(/([.*+?^=!:${}()|\[\]\\])/g, "\\$1");
    var escaped_PCLDIR = PCLDIR.replace(/([.*+?^=!:${}()|\[\]\\])/g, "\\$1");

Shall I send a pull request on github?

Additionally, it seems that generating debug makefiles removes makefiles which were generated before. I modified the script to write removing and generating steps to the console (see below). In the end the makefile "Makefile" disappeared.  I unchecked the "All platforms" check box and choosed Linux as platform.

Klaus

==> Removing makefile:
/home/klaus/data/C++/PixInsightINDIclient/module/linux/g++

==> Generating makefile:
/home/klaus/data/C++/PixInsightINDIclient/module/linux/g++/makefile-x64
* Directory created: /home/klaus/data/C++/PixInsightINDIclient/module/linux/g++/x64/Release

==> Generating makefile:
/home/klaus/data/C++/PixInsightINDIclient/module/linux/g++/Makefile

==> Removing makefile:
/home/klaus/data/C++/PixInsightINDIclient/module/linux/g++

==> Generating makefile:
/home/klaus/data/C++/PixInsightINDIclient/module/linux/g++/makefile-x64-debug
* Directory created: /home/klaus/data/C++/PixInsightINDIclient/module/linux/g++/x64/Debug






Klaus
« Last Edit: 2014 December 22 13:59:34 by kkretzsch »

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Missing escaping in Makefile generator
« Reply #1 on: 2014 December 23 04:19:08 »
Hi Klaus,

Yes, please send a pull request. Thank you for detecting these problems.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/