2 /* make a Makefile from an Imakefile from inside or outside the sources
4 * $XFree86: xc/config/util/xmkmf.cmd,v 3.1 1996/04/15 11:14:27 dawes Exp $
8 /* this is actually used here */
9 x11root = getenv('X11ROOT')
11 /* these ones are checked only, because later scripts rely on their existance */
12 libpath = getenv('LIBRARY_PATH')
13 incpath = getenv('C_INCLUDE_PATH')
16 PARSE ARG arg0 arg1 arg2 arg3
18 /* from here almost everything is the same as in the xmkmf sh script */
23 IF arg0 = '-a' THEN DO
33 IF \(arg0 = '') THEN DO
38 IF \(arg2 = '') | SUBSTR(topdir,1,1) = '-' THEN DO
39 SAY 'usage: xmkmf [-a] [top_of_sources_pathname [current_directory]]'
43 IF exists('Makefile') THEN DO
44 SAY 'mv -f Makefile Makefile.bak'
45 'COPY Makefile Makefile.bak >nul 2>&1'
46 'DEL Makefile >nul 2>&1'
50 iargs = '-DUseInstalled -I'x11root'/XFree86/lib/X11/config'
52 iargs = '-I'topdir'/config/cf -DTOPDIR='topdir' -DCURDIR='curdir
70 'DIR "'ARG(1)'" > nul 2>nul'
71 IF rc = 0 THEN RETURN 1
75 x = VALUE(ARG(1),,'OS2ENVIRONMENT')
78 SAY 'No 'ARG(1)' environment variable set!'