7

Makefile notdir = Python basename / Golang path.Base

 2 years ago
source link: http://siongui.github.io/2016/03/21/makefile-notdir-is-python-basename-and-go-path-Base/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Makefile notdir = Python basename / Golang path.Base

March 21, 2016

Makefile's notdir = Python basename / Go path.Base.

Example:

URL=http://nanda.online-dhamma.net/Tipitaka/Sutta/Khuddaka/Dhammapada/DhP_Story016.htm
UTF8HTML=/tmp/utf8-$(notdir ${URL})

default:
      @go run big5ToUTF8.go -input=$(notdir ${URL}) -output=${UTF8HTML}

In above Makefile,

$(notdir ${URL}) = DhP_Story016.htm
UTF8HTML = /tmp/utf8-DhP_Story016.htm.

Tested on Ubuntu Linux 15.10, GNU make 4.0-8.2.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK