Scroll to navigation

IMAKE(1) General Commands Manual IMAKE(1)

̾??

imake - make ?桼?ƥ????ƥ????Ф??? C ?ץ??ץ????å??Υ??󥿥ե?????

????

imake [ -Ddefine ] [ -Idir ] [ -Udefine ] [ -Ttemplate ] [ -f filename ] [ -C filename ] [ -s filename ] [ -e ] [ -v ]

????

imake ?ϡ??ƥ??ץ졼?ȡ?cpp ?ޥ????ؿ?????Imakefile ?ȸƤФ????ǥ? ?쥯?ȥꤴ?Ȥ????ϥե????뤫?? Makefile ?????????롣???????Ȥ??? ?Ȥˤ??ꡢ?ץ????????????ۤ??뤿?????͡??????Ǥε??Ҥ??顢?ޥ????˰?¸ ??????ʬ(?????ѥ????Υ??ץ????󡢰ۤʤ륳?ޥ???̾?????̤? make ?ε?§?ʤ?)???ڤ?Υ?????Ȥ??Ǥ??롣

???ץ?????

?ʲ??Υ??ޥ??ɹԥ??ץ??????? imake ???Ϥ????롣

???Υ??ץ???????ľ?? cpp ???Ϥ????롣???Υ??ץ????????̾?ǥ? ?쥯?ȥ???ͭ???ѿ??򥻥åȤ??뤿???˻Ȥ????롣?㤨?С?X???????ɥ????? ?ƥ??Ϥ??Υե饰???Ȥäơ?TOPDIR ?˥????ǥ????ȥ??ӥ塼???????? ?Ǿ??̥ǥ??쥯?ȥ???̾???򥻥åȤ???CURDIR ?ˤϺǾ??̥ǥ??쥯?? ?꤫?饫?????Ȥȥǥ??쥯?ȥ??ؤ????Хѥ??򥻥åȤ??롣
???Υ??ץ???????ľ?? cpp ???Ϥ????롣???Υ??ץ????????̾ imake ?Υƥ??ץ졼?Ȥ??????ե????뤬?????ǥ??쥯?ȥ??????ꤹ?뤿 ???˻Ȥ????롣
???Υ??ץ???????ľ?? cpp ???Ϥ????롣???Υ??ץ????????̾ imake ???????ե????????ǥХå??????Ȥ????ѿ??򥻥åȲ??????뤿?? ?˻Ȥ???
???Υ??ץ??????ϡ?cpp ???Ȥ??ޥ??????ƥ??ץ졼?ȥե?????(?̾??? -I ?ǻ??ꤵ?줿?ǥ??쥯?ȥ????֤?????)??̾???????ꤹ?롣 ?ǥե??????ͤ? Imake.tmpl ?Ǥ??롣
???Υ??ץ??????ϡ??ǥ??쥯?ȥꤴ?Ȥ??֤????ϥե???????̾???????ꤹ?롣 ?ǥե??????ͤ? Imakefile ?Ǥ??롣
???Υ??ץ??????ϡ????????ȥǥ??쥯?ȥ??˺??????? .c ?ե???????̾?????? ?ꤹ?롣?ǥե??????ͤ? Imakefile.c ?Ǥ??롣
???Υ??ץ??????Ǥϡ??????????? make ???ҥե???????̾???????ꤹ?? ???????Υ??ץ??????????ꤷ?Ƥ? make ???¹Ԥ????뤳?ȤϤʤ??? filename ?????å???(-)?ʤ??С????Ϥ? stdout ???Ф??ƹԤ? ???롣?ǥե????Ȥ?ư???Ǥ? Makefile ?????????뤬???¹ԤϤ??ʤ???
???Υ??ץ??????????ꤹ???ȡ?imake ?????????? Makefile ???? ?Ԥ??롣?ǥե????ȤǤϡ?Makefile ?μ¹Ԥϥ桼????Ǥ?????Ƥ??롣
???Υ??ץ??????????ꤹ???ȡ?imake ?? Makefile ???????˻Ȥ? cpp ?Υ??ޥ??ɹԤ?ɽ?????롣

imake ??ư??

imake ?ϡ????ޥ??ɹԤ? -I ???ץ??????? -D ???? ?????????Ϥ???cpp ????ư???????????Ƥ????ĥե?????̾???Ϥ???

		#define IMAKE_TEMPLATE "Imake.tmpl"
		#define INCLUDE_IMAKEFILE <Imakefile>
		#include IMAKE_TEMPLATE

???ΤȤ???Imake.tmpl ????ʬ?ϥ??ޥ??ɤ? -T ???ץ??????ǽ? ???????????뤳?Ȥ????ꡢImakefile ????ʬ?? -f ???ץ????? ?ǽ񤭴????????뤳?Ȥ????롣

IMAKE_TEMPLATE ???̾?ޥ?????¸?Υѥ??᡼??(cpp ?Υ????ܥ??ǻ? ?ꤹ??)???񤫤줿?ե????롢????????ͭ?Υѥ??᡼???ե????롢?ѿ??????? ?????ե????롢make ?????????뤿???? cpp ?Υޥ????ؿ??????? ?줿?ե????롢???????ȥǥ??쥯?ȥ??? Imakefile (INCLUDE_IMAKEFILE ?ǻ??ꤹ??)???ɤࡣImakefile ?ϡ????Υޥ????? ?????Ѥ??????????٤??оݤ򼨤???imake ?ϡ???Ǥ?????ä?Ŭ?ڤʵ?§ ?????????롣

Imake ???????ե??????ϡ?2?ĤΥ????פ??ѿ??????ġ????ʤ?????imake ?ѿ??? make ?ѿ??Ǥ??롣imake ?ѿ??? imake ???¹Ԥ????ݤ? cpp ?ˤ??äƲ??ᤵ???롣?????ˤ??ꡢimake ?ѿ???̾???? ??ʸ???Ⱦ?ʸ?????????ä????Ȥʤ롣make ?ѿ??? Makefile ?˽񤭹??ޤ졢???? make ?˲??ᤵ???롣 ?????ˤ??ꡢmake ?ѿ???̾??????ʸ???ǽ񤫤??롣

??§?ե?????(?̾????????ǥ??쥯?ȥ??? Imake.rules)?ˤϡ????ߤΥ? ???åȥե??????ˤ??????ä????ꤵ?줿 cpp ?ޥ????ؿ????????Ҥ??? ?Ƥ??롣?ޥ?????ʣ???Ԥ? make ??§???????Ǥ????褦?ˡ? imake ??ʸ???? ``@@'' ?????????ȡ??????????Ԥ??֤??????롣 ?㤨?С????Υޥ???

 #define	program_target(program, objlist)	@@\

program: objlist @@\ $(CC) -o $@ objlist $(LDFLAGS)
?ϡ? program_target(foo, foo1.o foo2.o) ?ǸƤФ줿?Ȥ???

foo: foo1.o foo2.o $(CC) -o $@ foo1.o foo2.o $(LDFLAGS)
?Τ褦??Ÿ???????롣

imake ?? ``XCOMM'' ?????????ȡ??????? ``#'' ʸ?????ִ????롣 ?????ˤ??ꡢ?ץ??ץ????å??? ``invalid directive'' ???顼???Ф????뤳 ?Ȥʤ? Makefile ?˥??????Ȥ??֤????Ȥ??Ǥ??롣

ʣ???? imake ?ξ??硢?????????? make ?ѿ????ޥ????Τ??줾 ???θƤӽФ??ˤ????ƶɽ?????ɬ?פʤ??Ȥ????롣?????Ϥ??Ф??С??????? ???ޥ??????Ϥ??????ѥ??᡼???˰?¸???뤿???˵????롣 ???Τ褦???ѿ??ϡ?XVARdefn ?η????? imake ?ѿ????Ȥ? ?ƺ??뤳?Ȥ??Ǥ??롣?????ǡ?n ??1???ο????Ǥ??롣 ???դ˷??ޤ? make ?ˤ????????Ԥ????롣?????ѿ? XVARusen ?????줿?Ȥ??????????б????? XVARdefn ?ˤ??ä????????줿?ѿ????֤??????????롣

cpp ??ʣ???Υ??֤???????1?Ĥζ????˸??餹?褦?ʥ????ƥ??ˤ????? ?ϡ?imake ??ɬ?פʥ??֤??᤽???Ȼ??ߤ?(make ?ϥ??֤ȶ????? ?㤤?????Ѹ?????)?????Τ??ᡢ???ޥ??ɹԤǤϥ?????(:)?????˥Хå??? ???å???(\)???֤??ʤ????Фʤ??ʤ???

X ???????ɥ??????ƥ??Ǥ?????

X ???????ɥ??????ƥ??ϡ????????????Υ????ƥ????Τι??ۤȳ??????եȥ??? ???ι??ۤ?ξ???? imake ?򹭤??Ѥ??롣???˽Ҥ٤??褦?ˡ????Хѥ? ̾???Ѥ????ե??????λ??Ȥ??ưפˤ??뤿????2?Ĥ????̤??ѿ? TOPDIR ?? CURDIR ?????åȤ????롣?㤨?С?lib/X/ ?ˤ????? Makefile ?????뤿?ᡢ???Υ??ޥ??ɤ???ưŪ????????????(???????κ? ???̥ǥ??쥯?ȥ꤫???????Хѥ?):

	%  ../.././config/imake  -I../.././config  \
		-DTOPDIR=../../.   -DCURDIR=./lib/X

???????ĥ꡼?˴ޤޤ??ʤ? X ?Υץ????????????ۤ????ݤˤϡ??ü??ʥ????? ?? UseInstalled ?????????졢TOPDIR ?? CURDIR ??̵?? ?????롣?????ե????뤬?????????󥹥ȡ??뤵???Ƥ????С????????ץ? xmkmf(1) ???Ȥ????Ȥ??Ǥ??롣

???ϥե?????

X ?˻Ȥ??????Ȥ??? imake ???ɤ??ե??????ˤĤ??Ƥγ?ά?򼨤??? ???????ϡ?¾?Υե??????򥤥󥯥롼?ɤ??뤳?Ȥ򼨤???


Imake.tmpl ????Ū???ѿ?
site.def ?????ȸ?ͭ??BeforeVendorCF ????????????
*.cf ?ޥ?????ͭ
*Lib.rules ??ͭ?饤?֥????ε?§
site.def ?????ȸ?ͭ??AfterVendorCF ????????????
Imake.rules ??§
Project.tmpl X ??ͭ???ѿ?
*Lib.tmpl ??ͭ?饤?֥????ˤĤ??Ƥ??ѿ?
Imakefile
Library.tmpl ?饤?֥????ˤĤ??Ƥε?§
Server.tmpl ?????ФˤĤ??Ƥε?§
Threads.tmpl ?ޥ????????åɤˤĤ??Ƥε?§

site.def ??2?٥??󥯥롼?ɤ????????????դ??衣1???ܤ? *.cf ?ե??????????ǡ????Ϥ??Υե??????θ??Ǥ??롣?????Ȥˤ????륫?????ޥ??? ?ΤۤȤ??ɤ? *.cf ?ե??????θ??Ǥʤ????Фʤ??ʤ??????????ѥ????? ?????Τ褦?????˻??ꤷ?ʤ????Фʤ??ʤ????Τ⤢?롣¾???ѿ????꤬?????? ?˰?¸???Ƥ??뤫???Ǥ??롣

?ǽ??? site.def ?򥤥󥯥롼?ɤ????Ȥ??ˤ??ѿ? BeforeVendorCF ?????????졢2???ܤ˥??󥯥롼?ɤ????Ȥ??ˤ??ѿ? AfterVendorCF ???????? ???롣site.def ?????ƤΥ????ɤϤɤ??餫?Υ????ܥ??ˤĤ??Ƥ? #ifdef ????¦???֤????Ƥ????Ϥ??Ǥ??롣

?ե?????

Imakefile.c cpp ?????Ϥ˻Ȥ??????ե?????
/tmp/Imf.XXXXXX -s ?Τ????ΰ???Ū?? Makefile
/tmp/IIf.XXXXXX ???ꤷ?? Imakefile ?? # ?????Υ??????Ȥ??ȤäƤ????????ΰ???Ū?? Imakefile
/lib/cpp ?ǥե????Ȥ? C ?ץ??ץ????å?

??Ϣ????

make(1), xmkmf(1)
S. I. Feldman, Make — ?????ԥ塼???Υץ????????????????뤿???Υץ?????????????

?Ķ??ѿ?

?ʲ??δĶ??ѿ??????ꤹ?뤳?Ȥ??Ǥ??롣???????????????? imake ?? ?¹Ԥ??????Ȥ????ưפˤϤ狼???ʤ???¸?ط????⤿?餹???ᡢ???ޤ??Ȥ??? ???ۤ????褤??

???δĶ??ѿ??????????줿???硢C ?ץ??ץ????å??˥??󥯥롼?ɤΰ????? ``-I'' ???Ϥ????Ȥ????ꡣ??: ``-I/usr/X11/config''.
???δĶ??ѿ??????????줿???硢?????ϥץ??ץ????å??Υץ?????????ͭ???? ?ѥ??Ǥʤ????Фʤ??ʤ??? ??: ``/usr/local/cpp''. ?ǥե????ȤǤϡ? imake ?? /lib/cpp ???Ѥ??롣
???δĶ??ѿ??????????줿???硢?????? ``/usr/local/make'' ?Τ褦?? make ?ץ?????????ͭ???ʥѥ??Ǥʤ????Фʤ??ʤ??? ?ǥե????ȤǤϡ? execvp(3) ???ȤäƸ??Ĥ??? make ?????Ѥ??롣 ???δĶ??ѿ??????Ѥ??????Τϡ?``-e'' ???ץ????󤬻??ꤵ?줿?Ȥ??????? ???롣

????

Todd Brunhoff, Tektronix and MIT Project Athena; Jim Fulton, MIT X Consortium

Release 6.5 X Version 11