{"id":23722686,"url":"https://github.com/remko/scons2ninja","last_synced_at":"2025-09-03T23:31:53.403Z","repository":{"id":9486010,"uuid":"11374952","full_name":"remko/scons2ninja","owner":"remko","description":"Generate Ninja build files for SCons","archived":true,"fork":false,"pushed_at":"2014-11-14T10:49:14.000Z","size":240,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-04T03:42:56.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-12T18:12:16.000Z","updated_at":"2023-04-25T10:47:49.000Z","dependencies_parsed_at":"2022-09-06T02:43:11.752Z","dependency_job_id":null,"html_url":"https://github.com/remko/scons2ninja","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/remko/scons2ninja","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fscons2ninja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fscons2ninja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fscons2ninja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fscons2ninja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remko","download_url":"https://codeload.github.com/remko/scons2ninja/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fscons2ninja/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273528191,"owners_count":25121755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-30T23:55:42.598Z","updated_at":"2025-09-03T23:31:53.172Z","avatar_url":"https://github.com/remko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [scons2ninja: Generate Ninja build files for SCons](https://el-tramo.be/scons2ninja)\n\n## About\n\nThis script generates a [Ninja](http://martine.github.io/ninja/) build file for a\n[SCons](http://scons.org) project.\n\n## Usage\n\nFirst of all, you need to do a small change to the `SConstruct` file of your project.\nThis script assumes that the `SConstruct` has a configuration variable \n`dump_trace`, which, when set, executes the following:\n\n    env.SetOption('no_exec', True)\n    env.Decider(lambda x, y, z: True)\n    SCons.Node.Python.Value.changed_since_last_build = (lambda x, y, z: True)\n\n(i.e. a dry run of rebuilding all files). Also make sure the command line\nis fully printed.\n\nTo generate the initial `build.ninja` file, run the following from the\ntoplevel directory:\n\n    path/to/scons2ninja.py \u003coptional scons flags\u003e\n\nThis will generate the `build.ninja` file for an equivalent SCons build with the given flags. \nFrom then on, you can just type `ninja` to build.\nThe `build.ninja` file will be automatically regenerated when necessary (i.e. when a \n`SCons*` file changes).\n\nThe script also reads in a `.scons2ninja.conf` file in the current directory, which can\nbe used to hook your own custom steps into the process. See the example configuration file\nto see some customizations.\n\n## Caveats\n\n- This script isn't fully generic yet, so there are still pretty big holes in customization and\n  configuration.\n- This script has only been tested with a very limited set of tools (gcc, clang, Visual Studio,\n  Qt, ...). Since the script requires full\n  knowledge of all tools run by SCons, it will fail if it finds an unsupported tool. Feel free\n  to send a patch with support for your favorite tools.\n- The script does not take into account environment variables etc. set from SCons, and\n  the ninja build will use the current environment instead.\n- Files that have dynamic content (i.e. content depending on other things than files, such as\n  `Value`s), will not be regenerated automatically. This is a general problem with generator-based\n  build systems. Delete the file if you want it to be regenerated.\n\n## TODO\n\n- Use the batching feature for SCons-generated files, when/if it is implemented in Ninja.\n  This allows to build all SCons-generated files in one SCons invocation, saving SCons startup\n  time for every file.\n\n## Other projects\n\nNaCl recently [added their own script](https://groups.google.com/forum/#!msg/native-client-dev/Ev06azGi7pI/2bGp2h_kY-UJ) for integrating Ninja with SCons. It plugs in directly into the SCons backend to get dependency information,\nwhich means it does not require full knowledge of all tools used in the build process. I will look into following\na similar approach for scons2ninja, which would make it more generic and work better out of the box.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremko%2Fscons2ninja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremko%2Fscons2ninja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremko%2Fscons2ninja/lists"}