2014-03-07 14:59:12 +08:00
|
|
|
|
跟我一起写Makefile (PDF重制版)
|
|
|
|
|
##############################
|
2014-02-25 19:19:40 +08:00
|
|
|
|
|
|
|
|
|
简介
|
|
|
|
|
----
|
|
|
|
|
|
2014-03-07 16:23:24 +08:00
|
|
|
|
《跟我一起写Makefile》是\ `陈皓`_\ 发表在其CSDN博客上的系列文章,一直受到读者的推荐,是很多人学习Makefile的首选文档。目前网络上流传的PDF版本多为祝冬华整理的版本。这个版本的排版一般,代码部分没有做任何语法高亮。
|
2014-02-25 19:19:40 +08:00
|
|
|
|
|
2014-03-07 14:59:12 +08:00
|
|
|
|
2010年初学Makefile的时候,读了前几章皮毛,一直用到了现在。最近想着重新学习一下Makefile,顺便学习一下Sphinx,重新制作一个更精美的PDF版本。
|
2014-02-25 19:19:40 +08:00
|
|
|
|
|
|
|
|
|
相关
|
|
|
|
|
----
|
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
- 书的文字部分来自于 `Andriki`_ 提供的Mediawiki源码;
|
|
|
|
|
- 使用 `Sphinx`_ 制作文档
|
2014-03-07 14:59:12 +08:00
|
|
|
|
- 项目主页:https://github.com/seisman/how-to-write-makefile
|
2016-03-27 03:03:58 -05:00
|
|
|
|
- 网页在线版:http://how-to-write-makefile.readthedocs.org/zh_CN/latest/
|
|
|
|
|
- PDF下载:https://media.readthedocs.org/pdf/how-to-write-makefile/latest/how-to-write-makefile.pdf
|
2014-02-25 19:19:40 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
本地编译
|
|
|
|
|
--------
|
2014-03-01 17:22:18 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
#. Clone项目到本地::
|
2014-03-01 17:22:18 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
$ git clone https://github.com/seisman/how-to-write-makefile.git
|
2014-03-01 17:22:18 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
#. 安装依赖::
|
2014-03-01 17:22:18 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
$ pip install sphinx sphinx_rtd_theme pygments
|
2014-03-01 17:22:18 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
#. 编译生成HTML::
|
2014-03-01 17:22:18 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
$ make html
|
|
|
|
|
$ firefox build/html/index.html&
|
|
|
|
|
|
|
|
|
|
#. 编译生成PDF(要求安装TeXLive 2015)::
|
2014-03-07 14:59:12 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
$ make xelatexpdf
|
2016-02-17 16:37:03 +08:00
|
|
|
|
$ evince build/latex/Makefile.pdf&
|
2014-03-07 14:59:12 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
sphinx中文支持
|
|
|
|
|
--------------
|
|
|
|
|
|
|
|
|
|
sphinx和readthedocs网站默认是不支持中文的,因为对 ``conf.py`` 和 ``Makefile`` 做了些许修改。详情参考 `sphinx生成中文PDF <http://seisman.info/chinese-support-for-sphinx.html>`_ 或 `Commit 35288db <https://github.com/seisman/how-to-write-makefile/commit/35288dbcd859abf5107dd6900dca25f0d1b44db7>`_
|
2014-03-07 14:59:12 +08:00
|
|
|
|
|
2015-11-09 10:33:05 +08:00
|
|
|
|
.. _`陈皓`: http://coolshell.cn/haoel
|
|
|
|
|
.. _`Andriki`: http://andriki.com/mediawiki/index.php?title=Linux:%E8%B7%9F%E6%88%91%E4%B8%80%E8%B5%B7%E5%86%99Makefile
|
|
|
|
|
.. _`Sphinx`: http://sphinx-doc.org/
|