rules_preprocess.rake 1.0 KB

1234567891011121314151617181920212223242526
  1. # invocations against this rule should only happen when enhanced dependencies are enabled;
  2. # otherwise, dependency tracking will be too shallow and preprocessed files could intermittently
  3. # fail to be updated when they actually need to be.
  4. rule(/#{PROJECT_TEST_PREPROCESS_FILES_PATH}\/.+/ => [
  5. proc do |task_name|
  6. @ceedling[:file_finder].find_test_or_source_or_header_file(task_name)
  7. end
  8. ]) do |file|
  9. if (not @ceedling[:configurator].project_use_deep_dependencies)
  10. raise 'ERROR: Ceedling preprocessing rule invoked though neccessary auxiliary dependency support not enabled.'
  11. end
  12. @ceedling[:generator].generate_preprocessed_file(TEST_SYM, file.source)
  13. end
  14. # invocations against this rule can always happen as there are no deeper dependencies to consider
  15. rule(/#{PROJECT_TEST_PREPROCESS_INCLUDES_PATH}\/.+/ => [
  16. proc do |task_name|
  17. @ceedling[:file_finder].find_test_or_source_or_header_file(task_name)
  18. end
  19. ]) do |file|
  20. @ceedling[:generator].generate_shallow_includes_list(TEST_SYM, file.source)
  21. end