Article View: comp.unix.programmer
Article #3715how to do this with Makefile
From: FangQ
Date: Thu, 14 Dec 2006 00:34
Date: Thu, 14 Dec 2006 00:34
41 lines
2446 bytes
2446 bytes
hi I am writing a Makefile to convert a bdf file into different pcf files corresponding to different unicode ranges, the striped down version of my Makefile looks like the following B2P=bdftopcf SLICE=bdfmerge.pl CJKBASIC=0x4E00--0x9FA5 CJKEXTA=0x3400--0x4DB5 CJK1=0x1100--0x11FF 0x2460--0x24EA CJK2=0x2605--0x2606 0x262F--0x2637 CJK3=0x3105--0x312C 0x3131--0x318E RANGE=$(CJKBASIC) $(CJKEXTA) $(CJK1) $(CJK2) $(CJK3) cjk0: RANGE=$(CJKBASIC) cjka: RANGE=$(CJKEXTA) cjk: $(SLICE) $(SLICE) $(RANGE) $(R9).bdf > $(R9)_cjk.bdf $(SLICE) $(RANGE) $(R10).bdf > $(R10)_cjk.bdf $(SLICE) $(RANGE) $(R11).bdf > $(R11)_cjk.bdf $(B2P) $(R9)_cjk.bdf > $(R9).pcf $(B2P) $(R10)_cjk.bdf > $(R10).pcf $(B2P) $(R11)_cjk.bdf > $(R11).pcf (the above code snip does not work, as you may notice) what I want to do is when user make different targets, I want the variable RANGE to change its value correspondingly. However, I don't want to repeat the command block for each target. I believe there must be an elegant way of doing this, i.e. set variables differently for each target and execute a common set of commands. However, I can not find it after an hour of search, so I hope someone can help me up. thank you Qianqian
Technical Details
Message-ID:
<1166056492.050495.19580@73g2000cwn.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!73g2000cwn.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fc89c,ae7c4df633e2435b,start X-Google-Thread: 109f73,ae7c4df633e2435b,start X-Google-Attributes: gidfc89c,gid109f73,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!73g2000cwn.googlegroups.com!not-for-mail From: "FangQ" <fangqq@gmail.com> Newsgroups: comp.unix.programmer,gnu.utils.help Subject: how to do this with Makefile Date: 13 Dec 2006 16:34:52 -0800 Organization: http://groups.google.com Lines: 42 Message-ID: <1166056492.050495.19580@73g2000cwn.googlegroups.com> NNTP-Posting-Host: 132.183.136.107 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1166056497 31701 127.0.0.1 (14 Dec 2006 00:34:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 14 Dec 2006 00:34:57 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061109 CentOS/1.5.0.8-0.1.el4.centos4 Firefox/1.5.0.8 pango-text,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 73g2000cwn.googlegroups.com; posting-host=132.183.136.107; posting-account=wKQegA0AAACeg2UtAcCNOEmIqPhLhbD3