{"id":19297226,"url":"https://github.com/chinaran/color-compile","last_synced_at":"2025-04-22T08:31:19.158Z","repository":{"id":24918311,"uuid":"28335252","full_name":"chinaran/color-compile","owner":"chinaran","description":"show compile message with color when show up error/warning/note/make using gcc/g++/make","archived":false,"fork":false,"pushed_at":"2017-02-26T12:46:59.000Z","size":586,"stargazers_count":94,"open_issues_count":1,"forks_count":53,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-09T23:02:24.509Z","etag":null,"topics":["compile","fdiagnostics-color","gcc","make"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chinaran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-22T11:00:50.000Z","updated_at":"2024-05-22T02:39:55.000Z","dependencies_parsed_at":"2022-08-23T07:50:51.179Z","dependency_job_id":null,"html_url":"https://github.com/chinaran/color-compile","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinaran%2Fcolor-compile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinaran%2Fcolor-compile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinaran%2Fcolor-compile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinaran%2Fcolor-compile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chinaran","download_url":"https://codeload.github.com/chinaran/color-compile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250206150,"owners_count":21392195,"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","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":["compile","fdiagnostics-color","gcc","make"],"created_at":"2024-11-09T23:01:48.564Z","updated_at":"2025-04-22T08:31:15.505Z","avatar_url":"https://github.com/chinaran.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"color-compile\n=============\n\nShow compile message with color when show up error/warning/note using gcc/g++/make\n\n**(1) compile** (\"\\make\" means using system make, not alias)\n\n    $ \\make\n\n**(2) install** (need root permission)\n\n    $ \\make install\n\n// copy exec program to /usr/local/bin/\n\n// alias gcc/g++/make in corresponding shell config file (like ~/.bashrc)\n\n**(3) test**\n\n// open a new terminal\n\n    $ make TEST (== gcc test.c -Wall)\n\nNote:\n-----\n**(1)** If your gcc version \u003e= 4.9.0, you can use -fdiagnostics-color=auto argument to show compiling color(It's similar to color-compile).\n\n**(2)** If you want to uninstall or reinstall, please remove alias added in ~/.bashrc at the end of line manually.\n\n**(3)** If you want to add new compile tool, you can add it at Makefile, like echo 'alias arm-linux-gcc=\"color_compile arm-linux-gcc\"' \u003e\u003e $(ALIAS_FILE) or change ~/.bashrc directly.\n\n**(4)** If you want to change the color of color-compile showed, you can change out_color_info.c, there are some macro define color.\n\nresult:\n-------\nbefore using color-compile\n![before using color-compile](https://github.com/chinaran/my-pictures/blob/master/color-compile/before.png)\n\nafter using color-compile\n![after using color-compile](https://github.com/chinaran/my-pictures/blob/master/color-compile/after.png)\n\nAuthor: Alan Wang \u003cgchinaran@gmail.com\u003e\n\nStarted: Dec. 20, 2014\n\nLicence: Apache Licene 2.0\n\n中文说明：\n---------\n**(1) 编译** （进到项目根目录，\"\\make\" 是使用系统make，而不是alias别名）\n\n    $ \\make\n\n**(2) 安装** (需要超级权限)\n\n    $ \\make install\n\n（这一步做了两件事，一是把主程序拷贝到 /usr/local/bin/ 下，二是添加了 gcc/g++/make 的别名到对应的 shell 配置文件的末尾，例如 ~/.bashrc）\n\n**(3) 测试** （新打开一个终端）\n\n    $ make TEST  (== gcc test.c -Wall)\n\n注意事项:\n-----\n**(1)** 如果你的 gcc 版本 \u003e= 4.9.0，可以直接使用 -fdiagnostics-color=auto 参数，显示效果和 color-compile 类似\n\n**(2)** 如果你需要卸载或者重装，请删除 ~/.bashrc 末尾处的gcc/g++/make 别名，以免影响之后的使用。\n\n**(3)** 如果你需要添加新的编译工具，可以修改Makefile 的 install: 处，以 arm-linux-gcc 为例，echo 'alias arm-linux-gcc=\"color_compile arm-linux-gcc\"' \u003e\u003e $(ALIAS_FILE)，或者直接修改 ~/.bashrc 都行。\n\n**(4)** 如果你需要更改显示的颜色，直接修改 out_color_info.c 源码就行，其中有一些颜色定义的宏。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinaran%2Fcolor-compile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinaran%2Fcolor-compile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinaran%2Fcolor-compile/lists"}