Code Monkey home page Code Monkey logo

make2help's Introduction

make2help's People

Contributors

515hikaru avatar

Watchers

 avatar  avatar

make2help's Issues

コマンドライン引数の追加

コマンドライン引数

make2help ${TARGET_NAME} でそのターゲットのヘルプのみを表示する

${TSRGET_NAME} が定義されていない場合は定義されていないとエラーメッセージを表示。

コマンドラインオプション

実装したいオプションは下記

  • -f, --file: Makefile へのパスを指定
  • -a, --all: すべてのターゲットのヘルプを表示
  • -t, --target-only: ターゲットのみを一覧で表示

依存関係のあるファイルについては `:` のあとを表示しないようにする

## Show target list
help:
	@python make2help.py
## sample target
target1:
	@echo "This is sample target."
## Shoe content in `foo,txt`
target2: foo.txt
	@cat foo.txt

現在は出力は下記になる。

$ make
help:	Show target list
target1:	sample target
target2: foo.tx:	Shoe content in `foo,txt` 

実際に期待している出力は下記

help:	Show target list
target1:	sample target
target2: 	Shoe content in `foo,txt` 

ターゲット以外も表示されてしまっている

.DEFAULT_GOAL := help
## install this command
install:
        python3 setup.py install
## install for development
develop:
        python3 setup.py develop
## exec unit test
test: tests/test_make2help.py
        python3 -m unittest tests/test_make2help.py
## Show target list
help:
        @make2help

.PHONY: install develop test help

上記の Makefilemake help すると下記が起こる

.DEFAULT_GOAL :
install:        install this command
develop:        install for development
test:   exec unit test
help:   Show target list
.PHONY:

.PHONY.DEFAULT_GOAL を外す必要がある

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.