home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / live / usr / X11R6 / lib / X11 / config / os2.rules < prev    next >
Text File  |  1999-09-03  |  18KB  |  537 lines

  1. XCOMM $XConsortium: os2.rules /main/1 1996/10/31 14:47:27 kaleb $
  2.  
  3.  
  4.  
  5. XCOMM platform:  $XFree86: xc/config/cf/os2.rules,v 3.15.2.1 1998/10/11 12:34:48 hohndel Exp $
  6.  
  7. .SUFFIXES: .Osuf .c .CCsuf
  8.  
  9. .c.Osuf:
  10.     $(CC) $(CFLAGS) -c $*.c
  11.  
  12. #if HasCplusplus
  13. .CCsuf.Osuf:
  14.     $(CXX) $(CFLAGS) -c $*.CCsuf
  15. #endif
  16.  
  17. #ifndef UseInstalled
  18. #define ImakeHelper \imakesvc
  19. #define IMmode n
  20. #define ImakeIndir \indir
  21. #define ImakeSubCmdHelper \imake -I$(IRULESRC) $(IMAKE_DEFINES)
  22. #define Fontc \bdftopcf
  23. #define MkFontDir \mkfontdir
  24. #define XkbComp \xkbcomp
  25. #else
  26. #define ImakeHelper imakesvc
  27. #define IMmode u
  28. #define ImakeIndir indir
  29. #define ImakeSubCmdHelper $(IMAKE_CMD)
  30. #define Fontc bdftopcf
  31. #define MkFontDir mkfontdir
  32. #define XkbComp xkbcomp
  33. #endif
  34.  
  35. #define echo ImakeHelper 8 
  36. #define RunProgram(progvar,options) $(subst /,\,$(progvar)) options
  37. #define RemoveFile(file) $(RM) file
  38. #define RemoveFiles(files) $(RM) files
  39. #define NeedLdLibraryPathForXkbComp NO
  40.  
  41. #define LibObjCompile(dir,options) RemoveFiles($@ dir\$@)        @@\
  42.     $(CC) $(CCOPTIONS) $(ALLDEFINES) options -c  $*.c        @@\
  43.     $(MV) $@ dir\$@
  44.  
  45. #define MakeDir(dir) $(MKDIRHIER) dir
  46.  
  47. #define BuildIncludesTop(srclist)                    @@\
  48. includes:: srclist                            @@\
  49.     MakeDir($(BUILDINCDIR))                        @@\
  50.     @for %i in (srclist) do ImakeHelper 2 $(BUILDINCDIR) $(BUILDINCTOP) $(CURRENT_DIR) %i
  51.  
  52. #define    ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib)    @@\
  53. ProgramTargetName(program): $(objs)                     @@\
  54.     RemoveTargetProgram($@)                        @@\
  55.     LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib)    @@\
  56.                                     @@\
  57. InstallProgram(program,$(BINDIR))                    @@\
  58. InstallManPage(program,$(MANDIR))
  59.  
  60. #if 0
  61. #define    ProgramTargetHelperNoMan(program,srcs,objs,deplib,locallib,syslib)    @@\
  62. ProgramTargetName(program): $(objs)                     @@\
  63.     RemoveTargetProgram($@)                        @@\
  64.     LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib)    @@\
  65.                                     @@\
  66. InstallProgram(program,$(BINDIR))
  67. #endif
  68.  
  69.  
  70. #define BuildIncludes(srclist,dstsubdir,dstupdir)            @@\
  71. includes:: srclist                            @@\
  72.     MakeDir($(BUILDINCDIR)/dstsubdir)                @@\
  73.     @for %i in (srclist) do ImakeHelper 3 $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR) $(BUILDINCDIR)/dstsubdir %i
  74.  
  75. #define LinkFileList(step,list,dir,sub)                    @@\
  76. step::  list                                @@\
  77.     @for %i in (list) do ImakeHelper 3 sub dir %i
  78.  
  79. #define ComplexProgramTarget(program)                    @@\
  80. PROGRAM = ProgramTargetName(program)                    @@\
  81.                                     @@\
  82. AllTarget(ProgramTargetName(program))                    @@\
  83.                                     @@\
  84. ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
  85.                                     @@\
  86. DependTarget()                                @@\
  87. LintTarget()                                @@\
  88.                                     @@\
  89. clean::                                    @@\
  90.     RemoveFile($(PROGRAM))
  91.  
  92. #define ComplexProgramTarget_1(program,locallib,syslib)            @@\
  93. OBJS = $(OBJS1) $(OBJS2) $(OBJS3)                    @@\
  94. SRCS = $(SRCS1) $(SRCS2) $(SRCS3)                    @@\
  95. PROGRAM1 = ProgramTargetName(program)                    @@\
  96.                                     @@\
  97. AllTarget($(PROGRAM1) $(PROGRAM2) $(PROGRAM3))                @@\
  98.                                     @@\
  99. ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib)    @@\
  100.                                     @@\
  101. DependTarget()                                @@\
  102. LintTarget()                                @@\
  103.                                     @@\
  104. clean::                                    @@\
  105.     RemoveFiles($(PROGRAMS))
  106.  
  107. #define ComplexProgramTarget_2(program,locallib,syslib)            @@\
  108. PROGRAM2 = ProgramTargetName(program)                    @@\
  109.                                     @@\
  110. ProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib)
  111.  
  112. #define ComplexProgramTarget_3(program,locallib,syslib)            @@\
  113. PROGRAM3 = ProgramTargetName(program)                    @@\
  114.                                     @@\
  115. ProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib)
  116.  
  117. #define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs)    @@\
  118. ProgramTargetName(program): objects                     @@\
  119.     RemoveTargetProgram($@)                        @@\
  120.     LinkRule($@,$(LDOPTIONS),objects,locallibs $(LDLIBS) syslibs)    @@\
  121.                                     @@\
  122. clean::                                    @@\
  123.     RemoveFile(ProgramTargetName(program))
  124.  
  125. #if 0
  126. #define ComplexProgramTargetNoMan(program)                @@\
  127. PROGRAM = ProgramTargetName(program)                    @@\
  128.                                     @@\
  129. AllTarget(ProgramTargetName(program))                    @@\
  130.                                     @@\
  131. ProgramTargetHelperNoMan(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
  132.                                     @@\
  133. DependTarget()                                @@\
  134. LintTarget()                                @@\
  135.                                     @@\
  136. clean::                                    @@\
  137.     RemoveFile($(PROGRAM))
  138. #endif
  139.  
  140. #define MoveToBakFile(file) ImakeHelper 5 file
  141.  
  142. #define RMoveToBakFile(file) ImakeHelper 6 file
  143.  
  144. #define InstallMultipleDestFlags(step,list,dest,flags)            @@\
  145. step:: list                                @@\
  146.     MakeDir($(DESTDIR)dest)                            @@\
  147.     $(INSTALL) $(INSTALLFLAGS) flags list $(subst /,\,$(DESTDIR)dest)
  148.  
  149. #define    CleanTarget()                            @@\
  150. clean::                                    @@\
  151.     RemoveFiles(FilesToClean ExtraFilesToClean)
  152.  
  153. #define LinkSourceFile(src,dir)                        @@\
  154. src:                                    @@\
  155.     ImakeHelper 3 dir . src                        @@\
  156.                                     @@\
  157. includes:: src                                @@\
  158.                                     @@\
  159. depends:: src                                @@\
  160.                                     @@\
  161. clean::                                    @@\
  162.     RemoveFile(src)
  163.  
  164. #define LinkFile(tofile,fromfile)                    @@\
  165. tofile:: fromfile                            @@\
  166.     ImakeHelper 7 fromfile tofile                    @@\
  167.                                     @@\
  168. includes:: tofile                            @@\
  169.                                     @@\
  170. depend:: tofile                                @@\
  171.                                     @@\
  172. clean::                                    @@\
  173.     RemoveFile(tofile)
  174.  
  175. #ifndef UseInstalled
  176. #define ImakeDependency(target)                        @@\
  177. target:: ProgramTargetName($(IMAKE))                    @@\
  178.                                     @@\
  179. ProgramTargetName($(IMAKE)):                        @@\
  180.     @ImakeIndir $(IMAKESRC) if exist Makefile $(MAKE) SHELL= MAKE=x11make all        @@\
  181.     @ImakeIndir $(IMAKESRC) if not exist Makefile $(MAKE) SHELL= MAKE=x11make -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"
  182. #endif
  183.  
  184. #ifndef UseInstalled
  185. #define DependDependency()                         @@\
  186. depend:: ProgramTargetName($(DEPEND))                    @@\
  187.                                     @@\
  188. ProgramTargetName($(DEPEND)):                        @@\
  189.     @ImakeIndir $(DEPENDSRC) $(MAKE) SHELL= MAKE=x11make 
  190. #endif
  191.  
  192. #define    DependTarget()                            @@\
  193. DependDependency()                            @@\
  194.                                     @@\
  195. depend::                                @@\
  196.     $(subst /,\,$(DEPEND)) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)
  197.  
  198. #define    DependTarget3(srcs1,srcs2,srcs3)                @@\
  199. DependDependency()                            @@\
  200.  
  201. /* Currently this stuff doesn't work correctly for libX11
  202. depend::                                @@\
  203.     $(subst /,\,$(DEPEND)) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1 @@\
  204.     $(subst /,\,$(DEPEND)) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs2 @@\
  205.     $(subst /,\,$(DEPEND)) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs3
  206. */
  207.  
  208. #define ForceSubdirs(dirs)                        @@\
  209. dirs: DONE                                @@\
  210.                                     @@\
  211. DONE:                                    @@\
  212.     @for %i in (dirs) do ImakeIndir %i $(MAKE) SHELL= MAKE=x11make $(MFLAGS) PassCDebugFlags all @@\
  213.     touch DONE                            @@\
  214.                                     @@\
  215. clean::                                    @@\
  216.     RemoveFile(DONE)
  217.  
  218. #define MakeMakeSubdirs(dirs,target)                    @@\
  219. MMSDIRS = dirs                                @@\
  220. MMSTOP = $(TOP)                                @@\
  221. MMSRULES = $(IRULESRC)                            @@\
  222. MMSCUR = $(CURRENT_DIR)                            @@\
  223. target::                                @@\
  224.     @for %i in ($(subst /,\,$(MMSDIRS))) do ImakeHelper 1 IMmode %i $(MMSRULES) $(MMSTOP) $(MMSCUR)
  225.  
  226. #define NamedTargetSubdirs(name,dirs,verb,flags,subname)        @@\
  227. Concat(SUBST,name) = dirs                        @@\
  228. name::                                    @@\
  229.     @for %i in ($(subst /,\,$(Concat(SUBST,name)))) do ImakeIndir %i $(MAKE) SHELL= MAKE=x11make $(MFLAGS) flags subname
  230.  
  231. #define InstallNamedTarget(step,srcname,flags,dest,dstname)        @@\
  232. step:: srcname                                @@\
  233.     MakeDir($(DESTDIR)dest)                        @@\
  234.     $(INSTALL) $(INSTALLFLAGS) flags srcname $(subst \,/,$(DESTDIR)dest)/dstname
  235.  
  236. #define    BuildMakefileTarget(notused,imakeflags)                @@\
  237. ImakeDependency(Makefile)                        @@\
  238.                                     @@\
  239. Makefile::                                 @@\
  240.     RMoveToBakFile(Makefile)                    @@\
  241.     ImakeSubCmdHelper -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) imakeflags
  242.  
  243. #define AssembleObject(flags) $(RM) $@                                  @@\
  244.     $(CPP) AsmDefines $(DEFINES) $(INCLUDES) flags $*.s | grep -v '^\#' > _tmp_.s                                     @@\
  245.     $(CC) $(CFLAGS) -o $*.Osuf -c _tmp_.s                           @@\
  246.     $(RM) _tmp_.s
  247.  
  248. #define NormalAsmObjectRule()                                           @@\
  249. .s.Osuf:                                                                @@\
  250.     AssembleObject($(_NOOP_))
  251.  
  252. #define ObjectMapIncludeFromSpecialSource(dst,src,flags)        @@\
  253. dst.c: src.c                                @@\
  254.     ImakeHelper 9 $@ mfbmap.h $?                    @@\
  255.                                     @@\
  256. SpecialCObjectRule(dst,NullParameter,flags)                @@\
  257.                                     @@\
  258. depend:: dst.c                                @@\
  259.                                     @@\
  260. clean::                                    @@\
  261.     RemoveFile(dst.c)
  262.  
  263. #define FontBaseObj(basename)basename.pcf
  264. /*
  265.  * UncompressedFontTarget
  266.  */
  267. #define UncompressedFontTarget(basename)                @@\
  268. FontBaseObj(basename):  FontSrc(basename)                @@\
  269.     Fontc $(FONTCFLAGS) $? -o $@
  270.  
  271. /*
  272.  * CompressedFontTarget
  273.  */
  274. #ifndef CompressedFontTarget
  275. #if GzipFontCompression
  276. #define CompressedFontTarget(basename)                    @@\
  277. FontBaseObj(basename).gz:  FontSrc(basename)                @@\
  278.     Fontc $(FONTCFLAGS) $? | $(GZIPCMD) > $@
  279. #else
  280. #define CompressedFontTarget(basename)                    @@\
  281. FontBaseObj(basename).Z:  FontSrc(basename)                @@\
  282.     Fontc $(FONTCFLAGS) $? | $(COMPRESS) > $@
  283. #endif
  284. #endif
  285.  
  286. /*
  287.  * MakeFontsDir - generate rules to build fonts.dir database.
  288.  */
  289. #define MakeFontsDir(deplist)                        @@\
  290. all:: fonts.dir                                @@\
  291.                                     @@\
  292. fonts.dir:  deplist                            @@\
  293.     MkFontDir .                            @@\
  294.                                     @@\
  295. clean::                                    @@\
  296.     RemoveFile(fonts.dir)
  297.  
  298. /* OS/2 scripts are based on REXX
  299.  * it is just the SHELL variable that is messed up that forces me to
  300.  * modify this rule
  301.  */
  302. #define ConfigTargetLong(target,dep,script,args,extra)            @@\
  303. all:: Configure                                @@\
  304.                                     @@\
  305. Configure:: target.o                            @@\
  306.                                     @@\
  307. target.c: script dep                            @@\
  308.     $(MAKE) SHELL= MAKE=x11make $(MFLAGS) extra Concat(Build,target)            @@\
  309.                                     @@\
  310. Concat(Build,target):                            @@\
  311.     $(RM) target.c                            @@\
  312.     script args                            @@\
  313.                                     @@\
  314. clean::                                    @@\
  315.     $(RM) target.c
  316.  
  317. #ifndef ServerTargetWithFlags
  318. #define    ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
  319. AllTarget(ProgramTargetName(server))                    @@\
  320. ProgramTargetName(server): subdirs objects libs                @@\
  321.     MoveToBakFile($@)                        @@\
  322.     LinkRule($@,$(LDOPTIONS),objects,libs $(LDLIBS) syslibs)    @@\
  323.     emxbind -a ProgramTargetName(server) -h255            @@\
  324.                                     @@\
  325. Concat(load,server):                            @@\
  326.     MoveToBakFile(ProgramTargetName(server))            @@\
  327.     LinkRule(ProgramTargetName(server),$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\
  328.                                     @@\
  329. loadX:: Concat(load,server)                        @@\
  330.                                     @@\
  331. SentinelProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
  332. SentinelLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
  333. PurifyProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
  334. PurifyLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
  335. ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
  336. ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
  337.                                     @@\
  338. InstallProgramWithFlags(server,$(BINDIR),flags)                @@\
  339.                                     @@\
  340. clean::                                    @@\
  341.     RemoveFile(ProgramTargetName(server))
  342. #endif /* ServerTargetWithFlags */
  343.  
  344. /*
  345.  * ServerTarget - rules to compile, link, and relink a normal server
  346.  * Need a .def file for OS/2
  347.  */
  348. #ifndef ServerTarget
  349. #define    ServerTarget(server,subdirs,objects,libs,syslibs)        @@\
  350. ServerTargetWithFlags(server,subdirs,objects,libs,syslibs server.def,$(_NOOP_)) @@\
  351.                                     @@\
  352. ProgramTargetName(server): server.def
  353. #endif /* ServerTarget */
  354.  
  355. /*
  356.  * ToolkitMakeStrings generates a string-table, i.e., a C source
  357.  * file and the matching header(s), e.g., Xt's StringDefs.c, StringDefs.h,
  358.  * and Shell.h files; or Motif's XmStrDefs.c and XmStrDefs.h files.
  359.  *
  360.  * The 'files' argument is the list of files that will be produced by
  361.  * this rule, e.g., for Xt they would be "Shell.h StringDefs.c StringDefs.h"
  362.  * and for Motif they would be "XmStrDefs.c XmStrDefs.h".
  363.  *
  364.  * The 'source' argument is the string-list file to be parsed, e.g., in
  365.  * Xt that would be "util/string.list".  For Motif 2.0 it would be
  366.  * "../../tools/makestr/xmstring.list", and for Motif-CDE1 it would be
  367.  * "util/xmstring.list".
  368.  *
  369.  * The 'options' argument is passed by the library's Imakefile, see the
  370.  * Xt Imakefile for an example.  Typically this would be nothing, -intelabi,
  371.  * or -sparcabi; there are other choices, but these are typical.
  372.  *
  373.  * The 'depends' argument names additional files the target files
  374.  * depend on.  It should name the #ctmpl and #htmpl files from the
  375.  * 'source' file.
  376.  *
  377.  * The 'dest' argument is the C source output file.  For Xt this should
  378.  * be "StringDefs.c", and for all versions of Motif it would be "XmStrDefs.c"
  379.  *
  380.  * Headers are generated and named according to data in the 'source'
  381.  * file.
  382.  */
  383.  
  384. #ifndef ToolkitMakeStrings
  385. #define ToolkitMakeStrings(files,source,options,depends,dest)        @@\
  386. MAKESTRS = $(CONFIGSRC)/util/makestrs                    @@\
  387. MAKESTRS1 = /makestrs.exe                        @@\
  388.                                     @@\
  389. ProgramTargetName($(MAKESTRS)): $(MAKESTRS).c                @@\
  390.     ImakeIndir $(CONFIGSRC)/util make SHELL= ProgramTargetName(makestrs)    @@\
  391.     ImakeHelper 7 $(CONFIGSRC)/util/makestrs.exe /            @@\
  392.                                     @@\
  393. files: ProgramTargetName($(MAKESTRS)) source depends            @@\
  394.     RemoveFiles(files)                        @@\
  395.     RunProgram(MAKESTRS1,options < source > dest)            @@\
  396.                                     @@\
  397. AllTarget(files)                            @@\
  398.                                     @@\
  399. includes:: files                            @@\
  400.                                     @@\
  401. depend:: files                                @@\
  402.                                     @@\
  403. clean::                                    @@\
  404.     RemoveFiles(files)
  405.  
  406. #endif /* ToolkitMakeStrings */
  407.  
  408. /*#define CppSedMagic SedMagic*/
  409. #define CppSedMagic sed -e '/^#  *[0-9][0-9]*  *.*$$/d' -e 's/^XCOMM/#/g' -e 's/^XCOMM[^a-zA-Z0-9_]/#/g'
  410.  
  411. #ifndef InstallNamedTargetNoClobber
  412. #define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname)    @@\
  413. step:: srcname                                @@\
  414.     MakeDir($(DESTDIR)dest)                        @@\
  415.     if not exist $(subst /,\,$(DESTDIR)dest)\dstname $(INSTALL) $(INSTALLFLAGS) flags srcname $(DESTDIR)dest/dstname
  416.  
  417. #endif /* InstallNamedTargetNoClobber */
  418.  
  419. #if CompressManPages
  420.  
  421. #ifndef InstallManPageLong
  422. #define InstallManPageLong(file,destdir,dest)                           @@\
  423. install.man:: file.man                                                  @@\
  424.     MakeDir($(DESTDIR)destdir)                    @@\
  425.     ImakeHelper 12 file $(DESTDIR)destdir dest
  426. #endif
  427.  
  428. #ifndef InstallManPageAliases
  429. #define InstallManPageAliases(file,destdir,aliases)                     @@\
  430. install.man::                                                           @@\
  431.     MakeDir($(DESTDIR)destdir)                    @@\
  432.     for %i in (aliases) do $(INSTALL) $(DESTDIR)destdir/file.gz $(DESTDIR)destdir/%i.gz
  433. #endif
  434.  
  435. #ifndef InstallGenManPageLong
  436. #define InstallGenManPageLong(file,destdir,dest,suffix)                 @@\
  437. install.man:: file.man                                                  @@\
  438.     MakeDir($(DESTDIR)destdir)                    @@\
  439.     ImakeHelper 12 file $(DESTDIR)destdir dest
  440. #endif
  441.  
  442. #ifndef InstallMultipleMan
  443. #define InstallMultipleMan(list,dest)                                   @@\
  444. install.man:: list                                                      @@\
  445.     MakeDir($(DESTDIR)dest)                        @@\
  446.     for %i in (list) do ImakeHelper 12 %i $(DESTDIR)dest %i
  447. #endif
  448.  
  449. #else /* CompressManPages */
  450.  
  451. #ifndef InstallManPageLong
  452. #define InstallManPageLong(file,destdir,dest)                           @@\
  453. install.man:: file.man                                                  @@\
  454.     MakeDir($(DESTDIR)destdir)                    @@\
  455.     ImakeHelper 10 file $(DESTDIR)destdir dest $(MANSUFFIX)
  456. #endif
  457.  
  458. #ifndef InstallManPageAliases
  459. #define InstallManPageAliases(file,destdir,aliases)                     @@\
  460. install.man::                                                           @@\
  461.     MakeDir($(DESTDIR)destdir)                    @@\
  462.     for %i in (aliases) do $(INSTALL) $(DESTDIR)destdir/file.$(MANSUFFIX) $(DESTDIR)destdir/%i.$(MANSUFFIX) 
  463. #endif
  464.  
  465. #ifndef InstallGenManPageLong
  466. #define InstallGenManPageLong(file,destdir,dest,suffix)                 @@\
  467. install.man:: file.man                                                  @@\
  468.     MakeDir($(DESTDIR)destdir)                    @@\
  469.     ImakeHelper 10 file $(DESTDIR)destdir dest suffix
  470. #endif
  471.  
  472. #ifndef InstallMultipleMan
  473. #define InstallMultipleMan(list,dest)                                   @@\
  474. install.man:: list                                                      @@\
  475.     MakeDir($(DESTDIR)dest)                        @@\
  476.     for %i in (list) do ImakeHelper 10 %i $(DESTDIR)dest %i $(MANSUFFIX)
  477. #endif
  478.  
  479. #endif
  480.  
  481. #ifndef NormalLintTarget
  482. #define NormalLintTarget(srclist)
  483. #endif /* NormalLintTarget */
  484.  
  485. #ifndef MakeDirectories
  486. #define MakeDirectories(step,dirs)                    @@\
  487. step::                                    @@\
  488.     -for %i in (dirs) do $(MKDIRHIER) $(DESTDIR)%i
  489. #endif /* MakeDirectories */
  490.  
  491. #ifndef YaccFile
  492. #define YaccFile(file,flags)                        @@\
  493. depend:: file.c                                @@\
  494.                                     @@\
  495. file.h file.c: file.y                            @@\
  496.     $(YACC) flags file.y                        @@\
  497.     $(MV) y.tab.c file.c                        @@\
  498.     @if exist y.tab.h $(MV) y.tab.h file.h                @@\
  499.                                     @@\
  500. clean::                                    @@\
  501.     RemoveFiles(y.tab.c y.tab.h file.h file.c)
  502. #endif /* YaccFile */
  503.  
  504. #ifndef StaticLibrary
  505. #define StaticLibrary(libpath,libname) Concat4(libpath,/,libname,_s.a)
  506. #endif
  507.  
  508. #ifndef MakeXkbDir
  509. #define MakeXkbDir(basedir,subdir)                    @@\
  510. all::    Concat(subdir,.dir)                        @@\
  511.                                     @@\
  512. Concat(subdir,.dir):                            @@\
  513.     $(XKBCOMPCMD) -lfhlpR -o Concat(subdir,.dir) *            @@\
  514.                                     @@\
  515. InstallTarget(install,Concat(subdir,.dir),$(INSTDATFLAGS),basedir)
  516. #endif
  517.  
  518. /* This is to replace an ugly hack in /xc/nls/XLC_LOCALE */
  519. /* the corresponding Imake.rules rule would be:
  520.    define LinkFileSpecial(gotodir,tofile,fromfile)    @@\
  521.         @MakeFlagsToShellFlags(i,set +e); \        @@\
  522.     cd dir && (set -x; RemoveFile(tofile); $(LN) fromfile tofile)
  523.  */
  524. #ifndef LinkFileSpecial
  525. #define LinkFileSpecial(gotodir,tofile,fromfile)            @@\
  526.     ImakeHelper 13 gotodir fromfile tofile
  527. #endif
  528.  
  529. #ifndef LinkBuildBinary
  530. #define LinkBuildBinary(binary)                        @@\
  531. all:: $(BUILDBINDIR)/binary binary                    @@\
  532.                                     @@\
  533. $(BUILDBINDIR)/binary: binary                        @@\
  534.     ImakeHelper 13 $(BUILDBINDIR) $(BUILDBINTOP)/$(CURRENT_DIR)/binary binary @@\
  535.     $(CP) binary /
  536. #endif /* LinkBuildBinary */
  537.