home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume27 / dmake / part27 < prev    next >
Encoding:
Text File  |  1992-01-29  |  40.0 KB  |  1,326 lines

  1. Newsgroups: comp.sources.misc
  2. From: dvadura@plg.waterloo.edu (Dennis Vadura)
  3. Subject:  v27i128:  dmake - dmake Version 3.8, Part27/41
  4. Message-ID: <1992Jan28.214805.20014@sparky.imd.sterling.com>
  5. X-Md4-Signature: 02fa2f9727a0b7a3e2b6ae8c41b94094
  6. Date: Tue, 28 Jan 1992 21:48:05 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: dvadura@plg.waterloo.edu (Dennis Vadura)
  10. Posting-number: Volume 27, Issue 128
  11. Archive-name: dmake/part27
  12. Environment: Atari-ST, Coherent, Mac, MSDOS, OS/2, UNIX
  13. Supersedes: dmake: Volume 19, Issue 22-58
  14.  
  15. ---- Cut Here and feed the following to sh ----
  16. # this is dmake.shar.27 (part 27 of a multipart archive)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file dmake/msdos/ztcdos/public.h continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 27; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test -f _shar_wnt_.tmp; then
  33. sed 's/^X//' << 'SHAR_EOF' >> 'dmake/msdos/ztcdos/public.h' &&
  34. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  35. --      GNU General Public License for more details.
  36. -- 
  37. --      You should have received a copy of the GNU General Public License
  38. --      along with this program;  if not, write to the Free Software
  39. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  40. --
  41. -- LOG
  42. --     $Log$
  43. */
  44. X
  45. #ifndef _DMAKE_PUBLIC_h
  46. #define _DMAKE_PUBLIC_h
  47. X
  48. void Infer_recipe ANSI((CELLPTR, CELLPTR));
  49. int Make_targets ANSI(());
  50. int Exec_commands ANSI((CELLPTR));
  51. void Print_cmnd ANSI((char *, int, int));
  52. void Pop_dir ANSI((int));
  53. void Append_line ANSI((char *, int, FILE *, char *, int, int));
  54. void Stat_target ANSI((CELLPTR, int));
  55. char * Expand ANSI((char *));
  56. char * Apply_edit ANSI((char *, char *, char *, int, int));
  57. void Map_esc ANSI((char *));
  58. char* Apply_modifiers ANSI((int, char *));
  59. char* Tokenize ANSI((char *, char *));
  60. char * _strjoin ANSI((char *, char *, int, int));
  61. char * _stradd ANSI((char *, char *, int));
  62. char * _strapp ANSI((char *, char *));
  63. char * _strdup ANSI((char *));
  64. char * _strdup2 ANSI((char *));
  65. char * _strpbrk ANSI((char *, char *));
  66. char * _strspn ANSI((char *, char *));
  67. char * _strstr ANSI((char *, char *));
  68. char * _substr ANSI((char *, char *));
  69. uint16 Hash ANSI((char *, uint32 *));
  70. HASHPTR Get_name ANSI((char *, HASHPTR *, int));
  71. HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
  72. HASHPTR Def_macro ANSI((char *, char *, int));
  73. CELLPTR Def_cell ANSI((char *));
  74. LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
  75. void Clear_prerequisites ANSI((CELLPTR));
  76. int Test_circle ANSI((CELLPTR, int));
  77. STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
  78. t_attr Rcp_attribute ANSI((char *));
  79. int main ANSI((int, char **));
  80. FILE * Openfile ANSI((char *, int, int));
  81. FILE * Closefile ANSI(());
  82. FILE * Search_file ANSI((char *, char **));
  83. char * Filename ANSI(());
  84. int Nestlevel ANSI(());
  85. void No_ram ANSI(());
  86. int Usage ANSI((int));
  87. int Version ANSI(());
  88. char * Get_suffix ANSI((char *));
  89. char * Build_path ANSI((char *, char *));
  90. void Make_rules ANSI(());
  91. void Create_macro_vars ANSI(());
  92. time_t Do_stat ANSI((char *, char *, char **));
  93. int Do_touch ANSI((char *, char *, char **));
  94. void Void_lib_cache ANSI((char *, char *));
  95. time_t Do_time ANSI(());
  96. int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
  97. char ** Pack_argv ANSI((int, int, char *));
  98. char * Read_env_string ANSI((char *));
  99. int Write_env_string ANSI((char *, char *));
  100. void ReadEnvironment ANSI(());
  101. void Catch_signals ANSI((void (*)()));
  102. void Clear_signals ANSI(());
  103. void Prolog ANSI((int, char* []));
  104. void Epilog ANSI((int));
  105. char * Get_current_dir ANSI(());
  106. int Set_dir ANSI((char*));
  107. char Get_switch_char ANSI(());
  108. FILE* Get_temp ANSI((char **, char *, int));
  109. FILE * Start_temp ANSI((char *, CELLPTR, char **));
  110. void Open_temp_error ANSI((char *, char *));
  111. void Link_temp ANSI((CELLPTR, FILE *, char *));
  112. void Close_temp ANSI((CELLPTR, FILE *));
  113. void Unlink_temp_files ANSI((CELLPTR));
  114. void Handle_result ANSI((int, int, int, CELLPTR));
  115. void Update_time_stamp ANSI((CELLPTR));
  116. int Remove_file ANSI((char *));
  117. void Parse ANSI((FILE *));
  118. int Get_line ANSI((char *, FILE *));
  119. char * Do_comment ANSI((char *, char **, int));
  120. char * Get_token ANSI((TKSTRPTR, char *, int));
  121. void Quit ANSI(());
  122. void Read_state ANSI(());
  123. void Write_state ANSI(());
  124. int Check_state ANSI((CELLPTR, STRINGPTR *, int));
  125. char* basename ANSI((char *));
  126. void Dump ANSI(());
  127. void Dump_recipe ANSI((STRINGPTR));
  128. int Parse_macro ANSI((char *, int));
  129. int Macro_op ANSI((char *));
  130. int Parse_rule_def ANSI((int *));
  131. int Rule_op ANSI((char *));
  132. void Add_recipe_to_list ANSI((char *, int, int));
  133. void Bind_rules_to_targets ANSI((int));
  134. int Set_group_attributes ANSI((char *));
  135. DFALINKPTR Match_dfa ANSI((char *));
  136. void Check_circle_dfa ANSI(());
  137. void Add_nfa ANSI((char *));
  138. char * Exec_function ANSI((char *));
  139. int If_root_path ANSI((char *));
  140. int runargv ANSI((CELLPTR, int, int, int, int, char *));
  141. void Clean_up_processes ANSI(());
  142. int Wait_for_child ANSI((int, int));
  143. time_t seek_arch ANSI((char*, char*));
  144. int touch_arch ANSI((char*, char*));
  145. int _chdir ANSI((char *));
  146. void Remove_prq ANSI((CELLPTR));
  147. void Hook_std_writes ANSI((char *));
  148. X
  149. #endif
  150. SHAR_EOF
  151. chmod 0640 dmake/msdos/ztcdos/public.h ||
  152. echo 'restore of dmake/msdos/ztcdos/public.h failed'
  153. Wc_c="`wc -c < 'dmake/msdos/ztcdos/public.h'`"
  154. test 5547 -eq "$Wc_c" ||
  155.     echo 'dmake/msdos/ztcdos/public.h: original size 5547, current size' "$Wc_c"
  156. rm -f _shar_wnt_.tmp
  157. fi
  158. # ============= dmake/msdos/ztcdos/startup.mk ==============
  159. if test -f 'dmake/msdos/ztcdos/startup.mk' -a X"$1" != X"-c"; then
  160.     echo 'x - skipping dmake/msdos/ztcdos/startup.mk (File already exists)'
  161.     rm -f _shar_wnt_.tmp
  162. else
  163. > _shar_wnt_.tmp
  164. sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/ztcdos/startup.mk' &&
  165. # MSDOS DMAKE startup file.  Customize to suit your needs.
  166. # Assumes MKS toolkit for the tool commands, and Zortech C.  Change as req'd.
  167. # See the documentation for a description of internally defined macros.
  168. #
  169. # Disable warnings for macros redefined here that were given
  170. # on the command line.
  171. __.SILENT := $(.SILENT)
  172. .SILENT   := yes
  173. X
  174. # Configuration parameters for DMAKE startup.mk file
  175. # Set these to NON-NULL if you wish to turn the parameter on.
  176. _HAVE_RCS    := yes        # yes => RCS  is installed.
  177. _HAVE_SCCS    :=         # yes => SCCS is installed.
  178. X
  179. # Applicable suffix definitions
  180. A := .lib    # Libraries
  181. E := .exe    # Executables
  182. F := .for    # Fortran
  183. O := .obj    # Objects
  184. P := .pas    # Pascal
  185. S := .asm    # Assembler sources
  186. V :=         # RCS suffix
  187. X
  188. # See if these are defined
  189. TMPDIR := $(ROOTDIR)/tmp
  190. .IMPORT .IGNORE : TMPDIR SHELL COMSPEC
  191. X
  192. # Recipe execution configurations
  193. # First set SHELL, If it is not defined, use COMSPEC, otherwise
  194. # it is assumed to be MKS Korn SHELL.
  195. .IF $(SHELL) == $(NULL)
  196. .IF $(COMSPEC) == $(NULL)
  197. X   SHELL := $(ROOTDIR)/bin/sh$E
  198. .ELSE
  199. X   SHELL := $(COMSPEC)
  200. .END
  201. .END
  202. GROUPSHELL := $(SHELL)
  203. X
  204. # Now set remaining arguments depending on which SHELL we
  205. # are going to use.  COMSPEC (assumed to be command.com) or
  206. # MKS Korn Shell.
  207. .IF $(SHELL)==$(COMSPEC)
  208. X   SHELLFLAGS  := $(SWITCHAR)c
  209. X   GROUPFLAGS  := $(SHELLFLAGS)
  210. X   SHELLMETAS  := *"?<>
  211. X   GROUPSUFFIX := .bat
  212. X   DIRSEPSTR   := \\
  213. X   DIVFILE      = $(TMPFILE:s,/,\)
  214. .ELSE
  215. X   SHELLFLAGS  := -c
  216. X   GROUPFLAGS  := 
  217. X   SHELLMETAS  := *"?<>|()&][$$\#`'
  218. X   GROUPSUFFIX := .ksh
  219. X   .MKSARGS    := yes
  220. X   DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
  221. X   DIVSEP_shell_yes := \\\
  222. X   DIVSEP_shell_no  := \\
  223. .END
  224. X
  225. # Standard C-language command names and flags
  226. X   CC      := ztc        # C-compiler and flags
  227. X   CFLAGS  +=
  228. X
  229. X   AS      := masm        # Assembler and flags
  230. X   ASFLAGS +=
  231. X
  232. X   LD       = blink        # Loader and flags
  233. X   LDFLAGS +=
  234. X   LDLIBS   =
  235. X
  236. # Definition of $(MAKE) macro for recursive makes.
  237. X   MAKE = $(MAKECMD) $(MFLAGS)
  238. X
  239. # Language and Parser generation Tools and their flags
  240. X   YACC      := yacc        # standard yacc
  241. X   YFLAGS +=
  242. X   YTAB      := ytab        # yacc output files name stem.
  243. X
  244. X   LEX      := lex        # standard lex
  245. X   LFLAGS +=
  246. X   LEXYY  := lex_yy        # lex output file
  247. X
  248. # Other Compilers, Tools and their flags
  249. X   PC    := any_pc        # pascal compiler
  250. X   RC    := anyf77        # ratfor compiler
  251. X   FC    := anyf77        # fortran compiler
  252. X
  253. X   CO       := co        # check out for RCS
  254. X   COFLAGS += -q
  255. X
  256. X   AR     := ar            # archiver
  257. X   ARFLAGS+= ruv
  258. X
  259. X   RM       := rm        # remove a file command
  260. X   RMFLAGS +=
  261. X
  262. # Implicit generation rules for making inferences.
  263. # We don't provide .yr or .ye rules here.  They're obsolete.
  264. # Rules for making *$O
  265. X   %$O : %.c ; $(CC) $(CFLAGS) -c $<
  266. X   %$O : %.cpp ; $(CC) $(CFLAGS) -c $<
  267. X   %$O : %$P ; $(PC) $(PFLAGS) -c $<
  268. X   %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
  269. X   %$O : %.cl ; class -c $<
  270. X   %$O : %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  271. X
  272. # Executables
  273. X   %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
  274. X
  275. # lex and yacc rules
  276. X   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  277. X   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  278. X
  279. # RCS support
  280. .IF $(_HAVE_RCS)
  281. X   % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
  282. X   .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
  283. .END
  284. X
  285. # SCCS support
  286. .IF $(_HAVE_SCCS)
  287. X   % : s.% ; get $<
  288. X   .NOINFER : s.%
  289. .END
  290. X
  291. # Recipe to make archive files.
  292. %$A :
  293. [
  294. X   $(AR) $(ARFLAGS) $@ $?
  295. X   $(RM) $(RMFLAGS) $?
  296. ]
  297. X
  298. # DMAKE uses this recipe to remove intermediate targets
  299. .REMOVE :; $(RM) -f $<
  300. X
  301. # AUGMAKE extensions for SYSV compatibility
  302. @B = $(@:b)
  303. @D = $(@:d)
  304. @F = $(@:f)
  305. "*B" = $(*:b)
  306. "*D" = $(*:d)
  307. "*F" = $(*:f)
  308. <B = $(<:b)
  309. <D = $(<:d)
  310. <F = $(<:f)
  311. ?B = $(?:b)
  312. ?F = $(?:f)
  313. ?D = $(?:d)
  314. X
  315. # Turn warnings back to previous setting.
  316. .SILENT := $(__.SILENT)
  317. X
  318. # Local init file if any, gets parsed before user makefile
  319. .INCLUDE .IGNORE: "_startup.mk"
  320. SHAR_EOF
  321. chmod 0640 dmake/msdos/ztcdos/startup.mk ||
  322. echo 'restore of dmake/msdos/ztcdos/startup.mk failed'
  323. Wc_c="`wc -c < 'dmake/msdos/ztcdos/startup.mk'`"
  324. test 3867 -eq "$Wc_c" ||
  325.     echo 'dmake/msdos/ztcdos/startup.mk: original size 3867, current size' "$Wc_c"
  326. rm -f _shar_wnt_.tmp
  327. fi
  328. # ============= dmake/msdos/ztcdos/tempnam.c ==============
  329. if test -f 'dmake/msdos/ztcdos/tempnam.c' -a X"$1" != X"-c"; then
  330.     echo 'x - skipping dmake/msdos/ztcdos/tempnam.c (File already exists)'
  331.     rm -f _shar_wnt_.tmp
  332. else
  333. > _shar_wnt_.tmp
  334. sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/ztcdos/tempnam.c' &&
  335. /*LINTLIBRARY*/
  336. #include <stdio.h>
  337. #include <string.h>
  338. #include <stdlib.h>
  339. #include <dos.h>
  340. X
  341. #if defined(max)
  342. #   undef  max
  343. #endif
  344. #define max(A,B) (((A)<(B))?(B):(A))
  345. X
  346. extern char *mktemp();
  347. extern int access();
  348. int _access();
  349. X
  350. /* Zortech C stdio.h doesn't define P_tmpdir, so let's do it here */
  351. /* Under DOS leave the default tmpdir pointing here!        */
  352. static char *P_tmpdir = "";
  353. X
  354. char *
  355. tempnam(dir, prefix)
  356. const char *dir;        /* use this directory please (if non-NULL) */
  357. const char *prefix;        /* use this (if non-NULL) as filename prefix */
  358. {
  359. X   static         int count = 0;
  360. X   register char *p, *q, *tmpdir;
  361. X   int            tl=0, dl=0, pl;
  362. X   char          buf[30];
  363. X
  364. X   pl = strlen(P_tmpdir);
  365. X
  366. X   if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
  367. X   if( dir != NULL ) dl = strlen(dir);
  368. X
  369. X   if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
  370. X     return(NULL);
  371. X
  372. X   *p = '\0';
  373. X
  374. X   if( (tl == 0) || (_access( strcpy(p, tmpdir), 0) != 0) )
  375. X     if( (dl == 0) || (_access( strcpy(p, dir), 0) != 0) )
  376. X    if( _access( strcpy(p, P_tmpdir), 0) != 0 )
  377. X       if( !prefix )
  378. X          prefix = "tp";
  379. X
  380. X   if(prefix)
  381. X   {
  382. X      *(p+strlen(p)+2) = '\0';
  383. X      (void)strncat(p, prefix, 2);
  384. X   }
  385. X
  386. X   sprintf( buf, "%08x", _psp );
  387. X   buf[6]='\0';
  388. X   (void)strcat(p, buf );
  389. X   sprintf( buf, "%04d", count++ );
  390. X   q=p+strlen(p)-6;
  391. X   *q++ = buf[0]; *q++ = buf[1];
  392. X   *q++ = buf[2]; *q++ = buf[3];
  393. X
  394. X   if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
  395. X
  396. X   return(p);
  397. }
  398. X
  399. X
  400. X
  401. _access( name, flag )
  402. char *name;
  403. int  flag;
  404. {
  405. X   char *p;
  406. X   int r;
  407. X
  408. X   if( name == NULL || !*name ) return(1);  /* NULL dir means current dir */
  409. X   r = access( name, flag );
  410. X   p = name+strlen(name)-1;
  411. X   if(*p != '/' && *p != '\\') strcat( p, "/" );
  412. X
  413. X   return( r );
  414. }
  415. SHAR_EOF
  416. chmod 0640 dmake/msdos/ztcdos/tempnam.c ||
  417. echo 'restore of dmake/msdos/ztcdos/tempnam.c failed'
  418. Wc_c="`wc -c < 'dmake/msdos/ztcdos/tempnam.c'`"
  419. test 1738 -eq "$Wc_c" ||
  420.     echo 'dmake/msdos/ztcdos/tempnam.c: original size 1738, current size' "$Wc_c"
  421. rm -f _shar_wnt_.tmp
  422. fi
  423. # ============= dmake/namemax.h ==============
  424. if test -f 'dmake/namemax.h' -a X"$1" != X"-c"; then
  425.     echo 'x - skipping dmake/namemax.h (File already exists)'
  426.     rm -f _shar_wnt_.tmp
  427. else
  428. > _shar_wnt_.tmp
  429. sed 's/^X//' << 'SHAR_EOF' > 'dmake/namemax.h' &&
  430. #ifndef _POSIX_NAME_MAX
  431. #define _POSIX_NAME_MAX 14
  432. #endif
  433. SHAR_EOF
  434. chmod 0640 dmake/namemax.h ||
  435. echo 'restore of dmake/namemax.h failed'
  436. Wc_c="`wc -c < 'dmake/namemax.h'`"
  437. test 58 -eq "$Wc_c" ||
  438.     echo 'dmake/namemax.h: original size 58, current size' "$Wc_c"
  439. rm -f _shar_wnt_.tmp
  440. fi
  441. # ============= dmake/os2/_chdir.c ==============
  442. if test ! -d 'dmake/os2'; then
  443.     mkdir 'dmake/os2'
  444. fi
  445. if test -f 'dmake/os2/_chdir.c' -a X"$1" != X"-c"; then
  446.     echo 'x - skipping dmake/os2/_chdir.c (File already exists)'
  447.     rm -f _shar_wnt_.tmp
  448. else
  449. > _shar_wnt_.tmp
  450. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/_chdir.c' &&
  451. /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/os2/_chdir.c,v 1.1 1992/01/24 03:29:24 dvadura Exp $
  452. -- SYNOPSIS -- Change directory.
  453. -- 
  454. -- DESCRIPTION
  455. --    Under DOS change the current drive as well as the current directory.
  456. --
  457. -- AUTHOR
  458. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  459. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  460. --
  461. -- COPYRIGHT
  462. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  463. -- 
  464. --      This program is free software; you can redistribute it and/or
  465. --      modify it under the terms of the GNU General Public License
  466. --      (version 1), as published by the Free Software Foundation, and
  467. --      found in the file 'LICENSE' included with this distribution.
  468. -- 
  469. --      This program is distributed in the hope that it will be useful,
  470. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  471. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  472. --      GNU General Public License for more details.
  473. -- 
  474. --      You should have received a copy of the GNU General Public License
  475. --      along with this program;  if not, write to the Free Software
  476. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  477. --
  478. -- LOG
  479. --     $Log: _chdir.c,v $
  480. X * Revision 1.1  1992/01/24  03:29:24  dvadura
  481. X * dmake Version 3.8, Initial revision
  482. X *
  483. */
  484. X
  485. #include <dos.h>
  486. #include <os2.h>
  487. #include "extern.h"
  488. X
  489. PUBLIC int
  490. _chdir(path)
  491. char *path;
  492. {
  493. X   int res;
  494. X
  495. X   res = chdir(path);
  496. X
  497. X   if (res == 0 && path[1] == ':')
  498. #ifdef OS2
  499. X      DosSelectDisk((*path & ~0x20) - '@');
  500. #else
  501. X      unsigned new_drive;
  502. X      unsigned max_drives;
  503. X
  504. X      new_drive = (*path & ~0x20) - 'A' + 1;
  505. X      _dos_setdrive(new_drive, &max_drives);
  506. #endif
  507. X
  508. X   return (res);
  509. }
  510. SHAR_EOF
  511. chmod 0640 dmake/os2/_chdir.c ||
  512. echo 'restore of dmake/os2/_chdir.c failed'
  513. Wc_c="`wc -c < 'dmake/os2/_chdir.c'`"
  514. test 1738 -eq "$Wc_c" ||
  515.     echo 'dmake/os2/_chdir.c: original size 1738, current size' "$Wc_c"
  516. rm -f _shar_wnt_.tmp
  517. fi
  518. # ============= dmake/os2/config.mk ==============
  519. if test -f 'dmake/os2/config.mk' -a X"$1" != X"-c"; then
  520.     echo 'x - skipping dmake/os2/config.mk (File already exists)'
  521.     rm -f _shar_wnt_.tmp
  522. else
  523. > _shar_wnt_.tmp
  524. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/config.mk' &&
  525. # This is an OS specific configuration file
  526. #    It assumes that OBJDIR, TARGET and DEBUG are previously defined.
  527. #    It defines    CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
  528. #    It augments    SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
  529. #
  530. OSRELEASE *= mscdos
  531. # Memory model to compile for
  532. # set to s - small, m - medium, c - compact, l - large
  533. # Use only large model now.
  534. MODEL = l
  535. X
  536. STARTUPFILE    = $(OS)/startup.mk
  537. X
  538. CPPFLAGS     = $(CFLAGS)
  539. LDOBJS        = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
  540. LDARGS        = $(LDHEAD) @$(LDTMPOBJ),$(TARGET),NUL.MAP,,$(LDTAIL)
  541. LDTAIL        = $(_libs)$(LDFLAGS:s/ //)
  542. _libs           = $(!null,$(LDLIBS) ,@$(LDTMPLIB))
  543. LDTMPOBJ    = $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"+\n")\n)
  544. LDTMPLIB    = $(mktmp,,$(DIVFILE) $(LDLIBS)\n)
  545. X
  546. # Debug flags
  547. DB_CFLAGS    = -DDBUG
  548. DB_LDFLAGS    =
  549. DB_LDLIBS    =
  550. X
  551. # NO Debug flags
  552. NDB_CFLAGS    = 
  553. NDB_LDFLAGS    =
  554. NDB_LDLIBS      =
  555. X
  556. # Local configuration modifications for CFLAGS.
  557. CFLAGS         += -I$(OS) -DOS2
  558. X
  559. # OS2 does not have a swap version. The operating system will
  560. # handle all swapping.
  561. # To save copying unchanged files in from elsewhere, I shall use them in situ.
  562. OS_SRC  += ruletab.c runargv.c _chdir.c switchar.c
  563. DOS_SRC = dirbrk.c arlib.c
  564. UNIX_SRC = rmprq.c
  565. X
  566. SRC += $(OS_SRC) $(DOS_SRC) $(UNIX_SRC)
  567. .SETDIR=$(OS) : $(ASRC) $(OS_SRC)
  568. .SETDIR=msdos : $(DOS_SRC)
  569. .SETDIR=unix : $(UNIX_SRC)
  570. X
  571. # Set source dirs so that we can find files named in this
  572. # config file.
  573. .SOURCE.h : $(OS)
  574. X
  575. # See if we modify anything in the lower levels.
  576. .IF $(OSRELEASE) != $(NULL)
  577. X   .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
  578. .END
  579. SHAR_EOF
  580. chmod 0640 dmake/os2/config.mk ||
  581. echo 'restore of dmake/os2/config.mk failed'
  582. Wc_c="`wc -c < 'dmake/os2/config.mk'`"
  583. test 1555 -eq "$Wc_c" ||
  584.     echo 'dmake/os2/config.mk: original size 1555, current size' "$Wc_c"
  585. rm -f _shar_wnt_.tmp
  586. fi
  587. # ============= dmake/os2/dmake.bad ==============
  588. if test -f 'dmake/os2/dmake.bad' -a X"$1" != X"-c"; then
  589.     echo 'x - skipping dmake/os2/dmake.bad (File already exists)'
  590.     rm -f _shar_wnt_.tmp
  591. else
  592. > _shar_wnt_.tmp
  593. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/dmake.bad' &&
  594. DOSCWAIT
  595. DOSKILLPROCESS
  596. SHAR_EOF
  597. chmod 0640 dmake/os2/dmake.bad ||
  598. echo 'restore of dmake/os2/dmake.bad failed'
  599. Wc_c="`wc -c < 'dmake/os2/dmake.bad'`"
  600. test 24 -eq "$Wc_c" ||
  601.     echo 'dmake/os2/dmake.bad: original size 24, current size' "$Wc_c"
  602. rm -f _shar_wnt_.tmp
  603. fi
  604. # ============= dmake/os2/dmake.cs ==============
  605. if test -f 'dmake/os2/dmake.cs' -a X"$1" != X"-c"; then
  606.     echo 'x - skipping dmake/os2/dmake.cs (File already exists)'
  607.     rm -f _shar_wnt_.tmp
  608. else
  609. > _shar_wnt_.tmp
  610. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/dmake.cs' &&
  611. (-I. -Icommon -Ios2 -Ios2\mscdos -DHELP -DOS2 -D__STDC__=1 -W1
  612. infer.c make.c stat.c expand.c string.c hash.c dag.c
  613. dmake.c path.c imacs.c sysintf.c parse.c getinp.c quit.c
  614. basename.c dump.c macparse.c rulparse.c percent.c function.c
  615. os2\ruletab.c os2\_chdir.c os2\switchar.c os2\mscdos\tempnam.c os2\runargv.c
  616. msdos\dirbrk.c msdos\arlib.c
  617. unix\rmprq.c unix\explode.c
  618. )
  619. X
  620. dmake.exe
  621. os2\dmake.def
  622. os2\dmake.bad
  623. X
  624. -AC -LB -S0x2000
  625. SHAR_EOF
  626. chmod 0640 dmake/os2/dmake.cs ||
  627. echo 'restore of dmake/os2/dmake.cs failed'
  628. Wc_c="`wc -c < 'dmake/os2/dmake.cs'`"
  629. test 427 -eq "$Wc_c" ||
  630.     echo 'dmake/os2/dmake.cs: original size 427, current size' "$Wc_c"
  631. rm -f _shar_wnt_.tmp
  632. fi
  633. # ============= dmake/os2/dmake.def ==============
  634. if test -f 'dmake/os2/dmake.def' -a X"$1" != X"-c"; then
  635.     echo 'x - skipping dmake/os2/dmake.def (File already exists)'
  636.     rm -f _shar_wnt_.tmp
  637. else
  638. > _shar_wnt_.tmp
  639. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/dmake.def' &&
  640. NAME DMAKE WINDOWCOMPAT NEWFILES
  641. DESCRIPTION 'DMAKE Version 3.8 - for MS-DOS and OS/2'
  642. X
  643. ; IMPORTS
  644. ;    SESMGR.DOSSMSETTITLE
  645. SHAR_EOF
  646. chmod 0640 dmake/os2/dmake.def ||
  647. echo 'restore of dmake/os2/dmake.def failed'
  648. Wc_c="`wc -c < 'dmake/os2/dmake.def'`"
  649. test 121 -eq "$Wc_c" ||
  650.     echo 'dmake/os2/dmake.def: original size 121, current size' "$Wc_c"
  651. rm -f _shar_wnt_.tmp
  652. fi
  653. # ============= dmake/os2/ibm/config.h ==============
  654. if test ! -d 'dmake/os2/ibm'; then
  655.     mkdir 'dmake/os2/ibm'
  656. fi
  657. if test -f 'dmake/os2/ibm/config.h' -a X"$1" != X"-c"; then
  658.     echo 'x - skipping dmake/os2/ibm/config.h (File already exists)'
  659.     rm -f _shar_wnt_.tmp
  660. else
  661. > _shar_wnt_.tmp
  662. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/ibm/config.h' &&
  663. /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/os2/ibm/config.h,v 1.1 1992/01/24 03:29:29 dvadura Exp $
  664. -- SYNOPSIS -- Configurarion include file.
  665. -- 
  666. -- DESCRIPTION
  667. --     There is one of these for each specific machine configuration.
  668. --    It can be used to further tweek the machine specific sources
  669. --    so that they compile.
  670. --
  671. -- AUTHOR
  672. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  673. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  674. --
  675. -- COPYRIGHT
  676. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  677. -- 
  678. --      This program is free software; you can redistribute it and/or
  679. --      modify it under the terms of the GNU General Public License
  680. --      (version 1), as published by the Free Software Foundation, and
  681. --      found in the file 'LICENSE' included with this distribution.
  682. -- 
  683. --      This program is distributed in the hope that it will be useful,
  684. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  685. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  686. --      GNU General Public License for more details.
  687. -- 
  688. --      You should have received a copy of the GNU General Public License
  689. --      along with this program;  if not, write to the Free Software
  690. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  691. --
  692. -- LOG
  693. --     $Log: config.h,v $
  694. X * Revision 1.1  1992/01/24  03:29:29  dvadura
  695. X * dmake Version 3.8, Initial revision
  696. X *
  697. */
  698. X
  699. #if defined (_MSC_VER)
  700. # if _MSC_VER < 500
  701. X    Force a compile-time blowup.
  702. X    Do not define define _MSC_VER for MSC compilers ealier than 5.0.
  703. # endif
  704. #endif
  705. X
  706. /* define this for configurations that don't have the coreleft function
  707. X * so that the code compiles.  To my knowledge coreleft exists only on
  708. X * Turbo C, but it is needed here since the function is used in many debug
  709. X * macros. */
  710. #define coreleft() 0L
  711. X
  712. /* MSC Version 4.0 doesn't understand SIGTERM, later versions do. */
  713. #ifndef SIGTERM
  714. #   define SIGTERM SIGINT
  715. #endif
  716. X
  717. /* This should already be defined under C6.0, also for OS/2 we want buffering
  718. X * to minimise the mess during parallel makes.
  719. X */
  720. #ifndef _IOLBF
  721. #   define _IOLBF   _IOFBF
  722. #endif
  723. X
  724. /* in alloc.h: size_t is redefined
  725. X * defined in stdio.h which is included by alloc.h
  726. X */
  727. #if defined(MSDOS) && defined (_MSC_VER)
  728. #   define _TYPES_
  729. #endif
  730. X
  731. /* Don't need this one either */
  732. #define CONST
  733. X
  734. /* in sysintf.c: SIGQUIT is used, this is not defined in MSC */
  735. #ifndef SIGQUIT
  736. #   define SIGQUIT SIGTERM
  737. #endif
  738. X
  739. /* a small problem with pointer to voids on some unix machines needs this */
  740. #define PVOID void *
  741. SHAR_EOF
  742. chmod 0640 dmake/os2/ibm/config.h ||
  743. echo 'restore of dmake/os2/ibm/config.h failed'
  744. Wc_c="`wc -c < 'dmake/os2/ibm/config.h'`"
  745. test 2567 -eq "$Wc_c" ||
  746.     echo 'dmake/os2/ibm/config.h: original size 2567, current size' "$Wc_c"
  747. rm -f _shar_wnt_.tmp
  748. fi
  749. # ============= dmake/os2/ibm/config.mk ==============
  750. if test -f 'dmake/os2/ibm/config.mk' -a X"$1" != X"-c"; then
  751.     echo 'x - skipping dmake/os2/ibm/config.mk (File already exists)'
  752.     rm -f _shar_wnt_.tmp
  753. else
  754. > _shar_wnt_.tmp
  755. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/ibm/config.mk' &&
  756. # This is the MSC 4.0 and higher OS/2 configuration file for DMAKE
  757. #    It simply modifies the values of SRC, and checks to see if
  758. #    OSENVIRONMENT is defined.  If so it includes the appropriate
  759. #    config.mk file.
  760. #
  761. # It also sets the values of .SOURCE.c and .SOURCE.h to include the local
  762. # directory.
  763. #
  764. osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
  765. X
  766. # Definition of macros for library, and C startup code.
  767. X
  768. # The following sources are required for MSC
  769. OSR_SRC = tempnam.c
  770. .SETDIR=$(osrdir) : $(OSR_SRC)
  771. X
  772. SRC += $(OSR_SRC)
  773. .SOURCE.h : $(osrdir)
  774. X
  775. # Local configuration modifications for CFLAGS 
  776. # OS/2 always has at least a 286 so this is enabled by default:
  777. CFLAGS += -G2
  778. X
  779. SET_STACK = /stack:8192
  780. NDB_LDFLAGS += $(SET_STACK)
  781. X
  782. # Microsoft C doesn't need tail but needs head
  783. LDTAIL = $(OS)$(DIRSEPSTR)$(TARGET:b).def;
  784. LDHEAD = $(LDFLAGS)
  785. X
  786. # Debugging libraries
  787. DB_LDFLAGS += /co /li /map $(SET_STACK)
  788. DB_LDLIBS  +=
  789. X
  790. # NO Debug MSC flags:
  791. # Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
  792. # to get these by default when you make dmake using 'dmake'.
  793. #
  794. # Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
  795. # and sets the flags appropriately.
  796. X
  797. .IMPORT .IGNORE : MSC_VER
  798. MSC_VER *= 6.0              # If unset, assume 6.0 by default.
  799. X
  800. .IF $(MSC_VER) == 4.0
  801. X   CFLAGS      += -I$(osrdir) $(C_$(MODEL):s/A/m/)
  802. X   CFLAGS      += -DM_I86=1      # 5.0+ define this automatically
  803. X   CFLAGS      += -D__STDC__=1    # 5.0, 5.1, but not 6.0 do this automatically
  804. X   NDB_CFLAGS  +=
  805. X   DB_CFLAGS   += -Zi
  806. .ELSE
  807. X   DB_CFLAGS   += -Zi
  808. X   CFLAGS      += -I$(osrdir) $(C_$(MODEL))
  809. X   .IF $(MSC_VER) != 6.0
  810. X      # For 5.0 and 5.1, we define _MSC_VER=500 or 510
  811. X      CFLAGS      += -D_MSC_VER=$(MSC_VER:s,.,,)0
  812. X      NDB_CFLAGS  += -Osl -Gs
  813. X   .ELSE
  814. X      # Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
  815. X      CFLAGS      += -D__STDC__=1 # incredibly not auto done by 6.0
  816. X      NDB_CFLAGS  += -Osecgl -Gs
  817. X
  818. X       # Redefine rule for making our objects, we don't need mv
  819. X      %$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
  820. X   .END
  821. X   NDB_LDFLAGS += /exe /packc /batch
  822. X   NDB_LDLIBS  += /NOD:LLIBCE LLIBCEP
  823. .END
  824. X
  825. # See if we modify anything in the lower levels.
  826. .IF $(OSENVIRONMENT) != $(NULL)
  827. X   .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
  828. .END
  829. X
  830. C_s =
  831. C_m = -AM
  832. C_c = -AC
  833. C_l = -AL
  834. X
  835. S_s = -Dmsmall
  836. S_m = -Dmmedium
  837. S_c = -Dmcompact
  838. S_l = -Dmlarge
  839. SHAR_EOF
  840. chmod 0640 dmake/os2/ibm/config.mk ||
  841. echo 'restore of dmake/os2/ibm/config.mk failed'
  842. Wc_c="`wc -c < 'dmake/os2/ibm/config.mk'`"
  843. test 2395 -eq "$Wc_c" ||
  844.     echo 'dmake/os2/ibm/config.mk: original size 2395, current size' "$Wc_c"
  845. rm -f _shar_wnt_.tmp
  846. fi
  847. # ============= dmake/os2/ibm/dmake.ini ==============
  848. if test -f 'dmake/os2/ibm/dmake.ini' -a X"$1" != X"-c"; then
  849.     echo 'x - skipping dmake/os2/ibm/dmake.ini (File already exists)'
  850.     rm -f _shar_wnt_.tmp
  851. else
  852. > _shar_wnt_.tmp
  853. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/ibm/dmake.ini' &&
  854. # MSDOS DMAKE startup file.  Customize to suit your needs.
  855. # Assumes MKS toolkit for the tool commands, and Microsoft C.  Change as req'd.
  856. # See the documentation for a description of internally defined macros.
  857. #
  858. # Disable warnings for macros redefined here that were given
  859. # on the command line.
  860. __.SILENT := $(.SILENT)
  861. .SILENT   := yes
  862. X
  863. # Configuration parameters for DMAKE startup.mk file
  864. # Set these to NON-NULL if you wish to turn the parameter on.
  865. _HAVE_RCS    := yes        # yes => RCS  is installed.
  866. _HAVE_SCCS    :=         # yes => SCCS is installed.
  867. X
  868. # Applicable suffix definitions
  869. A := .lib    # Libraries
  870. E := .exe    # Executables
  871. F := .for    # Fortran
  872. O := .obj    # Objects
  873. P := .pas    # Pascal
  874. S := .asm    # Assembler sources
  875. V :=         # RCS suffix
  876. X
  877. # See if these are defined
  878. TMPDIR := $(ROOTDIR)/tmp
  879. .IMPORT .IGNORE : TMPDIR SHELL COMSPEC
  880. X
  881. # Recipe execution configurations
  882. # First set SHELL, If it is not defined, use COMSPEC, otherwise
  883. # it is assumed to be MKS Korn SHELL.
  884. .IF $(SHELL) == $(NULL)
  885. .IF $(COMSPEC) == $(NULL)
  886. X   SHELL := $(ROOTDIR)/bin/sh$E
  887. .ELSE
  888. X   SHELL := $(COMSPEC)
  889. .END
  890. .END
  891. GROUPSHELL := $(SHELL)
  892. X
  893. # Now set remaining arguments depending on which SHELL we
  894. # are going to use.  COMSPEC (assumed to be cmd.exe) or
  895. # MKS Korn Shell.
  896. .IF $(SHELL)==$(COMSPEC)
  897. X   SHELLFLAGS  := $(SWITCHAR)c
  898. X   GROUPFLAGS  := $(SHELLFLAGS)
  899. X   SHELLMETAS  := *"?<>|&
  900. X   GROUPSUFFIX := .cmd
  901. X   DIRSEPSTR   := \\
  902. X   DIVFILE      = $(TMPFILE:s,/,\)
  903. .ELSE
  904. X   SHELLFLAGS  := -c
  905. X   GROUPFLAGS  := 
  906. X   SHELLMETAS  := *"?<>|()&][$$\#`'
  907. X   GROUPSUFFIX := .ksh
  908. X   .MKSARGS    := yes
  909. X   DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
  910. X   DIVSEP_shell_yes := \\\
  911. X   DIVSEP_shell_no  := \\
  912. .END
  913. X
  914. # Standard C-language command names and flags
  915. X   CC      := cl        # C-compiler and flags
  916. X   CFLAGS  +=
  917. X
  918. X   AS      := masm        # Assembler and flags
  919. X   ASFLAGS +=
  920. X
  921. X   LD       = link        # Loader and flags
  922. X   LDFLAGS +=
  923. X   LDLIBS   =
  924. X
  925. # Definition of $(MAKE) macro for recursive makes.
  926. X   MAKE = $(MAKECMD) $(MFLAGS)
  927. X
  928. # Language and Parser generation Tools and their flags
  929. X   YACC      := yacc        # standard yacc
  930. X   YFLAGS +=
  931. X   YTAB      := ytab        # yacc output files name stem.
  932. X
  933. X   LEX      := lex        # standard lex
  934. X   LFLAGS +=
  935. X   LEXYY  := lex_yy        # lex output file
  936. X
  937. # Other Compilers, Tools and their flags
  938. X   PC    := any_pc        # pascal compiler
  939. X   RC    := anyf77        # ratfor compiler
  940. X   FC    := anyf77        # fortran compiler
  941. X
  942. X   CO       := co        # check out for RCS
  943. X   COFLAGS += -q
  944. X
  945. X   AR     := ar            # archiver
  946. X   ARFLAGS+= ruv
  947. X
  948. X   RM       := rm        # remove a file command
  949. X   RMFLAGS +=
  950. X
  951. # Implicit generation rules for making inferences.
  952. # We don't provide .yr or .ye rules here.  They're obsolete.
  953. # Rules for making *$O
  954. X   %$O : %.c ; $(CC) $(CFLAGS) -c $<
  955. X   %$O : %$P ; $(PC) $(PFLAGS) -c $<
  956. X   %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
  957. X   %$O : %.cl ; class -c $<
  958. X   %$O : %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  959. X
  960. # Executables
  961. X   %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
  962. X
  963. # lex and yacc rules
  964. X   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  965. X   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  966. X
  967. # RCS support
  968. .IF $(_HAVE_RCS)
  969. X   % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
  970. X   .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
  971. .END
  972. X
  973. # SCCS support
  974. .IF $(_HAVE_SCCS)
  975. X   % : s.% ; get $<
  976. X   .NOINFER : s.%
  977. .END
  978. X
  979. # Recipe to make archive files.
  980. %$A :
  981. [
  982. X   $(AR) $(ARFLAGS) $@ $?
  983. X   $(RM) $(RMFLAGS) $?
  984. ]
  985. X
  986. # DMAKE uses this recipe to remove intermediate targets
  987. .REMOVE :; $(RM) -f $<
  988. X
  989. # AUGMAKE extensions for SYSV compatibility
  990. @B = $(@:b)
  991. @D = $(@:d)
  992. @F = $(@:f)
  993. "*B" = $(*:b)
  994. "*D" = $(*:d)
  995. "*F" = $(*:f)
  996. <B = $(<:b)
  997. <D = $(<:d)
  998. <F = $(<:f)
  999. ?B = $(?:b)
  1000. ?F = $(?:f)
  1001. ?D = $(?:d)
  1002. X
  1003. # Turn warnings back to previous setting.
  1004. .SILENT := $(__.SILENT)
  1005. X
  1006. # Local init file if any, gets parsed before user makefile
  1007. .INCLUDE .IGNORE: "_startup.mk"
  1008. SHAR_EOF
  1009. chmod 0640 dmake/os2/ibm/dmake.ini ||
  1010. echo 'restore of dmake/os2/ibm/dmake.ini failed'
  1011. Wc_c="`wc -c < 'dmake/os2/ibm/dmake.ini'`"
  1012. test 3826 -eq "$Wc_c" ||
  1013.     echo 'dmake/os2/ibm/dmake.ini: original size 3826, current size' "$Wc_c"
  1014. rm -f _shar_wnt_.tmp
  1015. fi
  1016. # ============= dmake/os2/ibm/lib.rsp ==============
  1017. if test -f 'dmake/os2/ibm/lib.rsp' -a X"$1" != X"-c"; then
  1018.     echo 'x - skipping dmake/os2/ibm/lib.rsp (File already exists)'
  1019.     rm -f _shar_wnt_.tmp
  1020. else
  1021. > _shar_wnt_.tmp
  1022. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/ibm/lib.rsp' &&
  1023. \NOD:LLIBCE+
  1024. LLIBCEP
  1025. SHAR_EOF
  1026. chmod 0640 dmake/os2/ibm/lib.rsp ||
  1027. echo 'restore of dmake/os2/ibm/lib.rsp failed'
  1028. Wc_c="`wc -c < 'dmake/os2/ibm/lib.rsp'`"
  1029. test 21 -eq "$Wc_c" ||
  1030.     echo 'dmake/os2/ibm/lib.rsp: original size 21, current size' "$Wc_c"
  1031. rm -f _shar_wnt_.tmp
  1032. fi
  1033. # ============= dmake/os2/ibm/mkc2.cmd ==============
  1034. if test -f 'dmake/os2/ibm/mkc2.cmd' -a X"$1" != X"-c"; then
  1035.     echo 'x - skipping dmake/os2/ibm/mkc2.cmd (File already exists)'
  1036.     rm -f _shar_wnt_.tmp
  1037. else
  1038. > _shar_wnt_.tmp
  1039. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/ibm/mkc2.cmd' &&
  1040. md objects
  1041. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs infer.c
  1042. copy infer.obj objects
  1043. del infer.obj
  1044. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs make.c
  1045. copy make.obj objects
  1046. del make.obj
  1047. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs stat.c
  1048. copy stat.obj objects
  1049. del stat.obj
  1050. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs expand.c
  1051. copy expand.obj objects
  1052. del expand.obj
  1053. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs dmstring.c
  1054. copy dmstring.obj objects
  1055. del dmstring.obj
  1056. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs hash.c
  1057. copy hash.obj objects
  1058. del hash.obj
  1059. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs dag.c
  1060. copy dag.obj objects
  1061. del dag.obj
  1062. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs dmake.c
  1063. copy dmake.obj objects
  1064. del dmake.obj
  1065. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs path.c
  1066. copy path.obj objects
  1067. del path.obj
  1068. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs imacs.c
  1069. copy imacs.obj objects
  1070. del imacs.obj
  1071. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs sysintf.c
  1072. copy sysintf.obj objects
  1073. del sysintf.obj
  1074. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs parse.c
  1075. copy parse.obj objects
  1076. del parse.obj
  1077. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs getinp.c
  1078. copy getinp.obj objects
  1079. del getinp.obj
  1080. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs quit.c
  1081. copy quit.obj objects
  1082. del quit.obj
  1083. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs state.c
  1084. copy state.obj objects
  1085. del state.obj
  1086. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs basename.c
  1087. copy basename.obj objects
  1088. del basename.obj
  1089. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs dmdump.c
  1090. copy dmdump.obj objects
  1091. del dmdump.obj
  1092. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs macparse.c
  1093. copy macparse.obj objects
  1094. del macparse.obj
  1095. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs rulparse.c
  1096. copy rulparse.obj objects
  1097. del rulparse.obj
  1098. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs percent.c
  1099. copy percent.obj objects
  1100. del percent.obj
  1101. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs function.c
  1102. copy function.obj objects
  1103. del function.obj
  1104. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\ruletab.c
  1105. copy ruletab.obj objects
  1106. del ruletab.obj
  1107. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\runargv.c
  1108. copy runargv.obj objects
  1109. del runargv.obj
  1110. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\_chdir.c
  1111. copy _chdir.obj objects
  1112. del _chdir.obj
  1113. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\switchar.c
  1114. copy switchar.obj objects
  1115. del switchar.obj
  1116. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs msdos\dirbrk.c
  1117. copy dirbrk.obj objects
  1118. del dirbrk.obj
  1119. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs msdos\arlib.c
  1120. copy arlib.obj objects
  1121. del arlib.obj
  1122. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs unix\rmprq.c
  1123. copy rmprq.obj objects
  1124. del rmprq.obj
  1125. cl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\ibm\tempnam.c
  1126. copy tempnam.obj objects
  1127. del tempnam.obj
  1128. copy os2\ibm\startup.mk startup.mk
  1129. link /stack:8192 /exe /packc /batch @os2\ibm\obj.rsp,dmake.exe,NUL.MAP,,os2\dmake.def;
  1130. SHAR_EOF
  1131. chmod 0640 dmake/os2/ibm/mkc2.cmd ||
  1132. echo 'restore of dmake/os2/ibm/mkc2.cmd failed'
  1133. Wc_c="`wc -c < 'dmake/os2/ibm/mkc2.cmd'`"
  1134. test 3413 -eq "$Wc_c" ||
  1135.     echo 'dmake/os2/ibm/mkc2.cmd: original size 3413, current size' "$Wc_c"
  1136. rm -f _shar_wnt_.tmp
  1137. fi
  1138. # ============= dmake/os2/ibm/obj.rsp ==============
  1139. if test -f 'dmake/os2/ibm/obj.rsp' -a X"$1" != X"-c"; then
  1140.     echo 'x - skipping dmake/os2/ibm/obj.rsp (File already exists)'
  1141.     rm -f _shar_wnt_.tmp
  1142. else
  1143. > _shar_wnt_.tmp
  1144. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/ibm/obj.rsp' &&
  1145. objects\infer.obj+
  1146. objects\make.obj+
  1147. objects\stat.obj+
  1148. objects\expand.obj+
  1149. objects\dmstring.obj+
  1150. objects\hash.obj+
  1151. objects\dag.obj+
  1152. objects\dmake.obj+
  1153. objects\path.obj+
  1154. objects\imacs.obj+
  1155. objects\sysintf.obj+
  1156. objects\parse.obj+
  1157. objects\getinp.obj+
  1158. objects\quit.obj+
  1159. objects\state.obj+
  1160. objects\basename.obj+
  1161. objects\dmdump.obj+
  1162. objects\macparse.obj+
  1163. objects\rulparse.obj+
  1164. objects\percent.obj+
  1165. objects\function.obj+
  1166. objects\ruletab.obj+
  1167. objects\runargv.obj+
  1168. objects\_chdir.obj+
  1169. objects\switchar.obj+
  1170. objects\dirbrk.obj+
  1171. objects\arlib.obj+
  1172. objects\rmprq.obj+
  1173. objects\tempnam.obj
  1174. SHAR_EOF
  1175. chmod 0640 dmake/os2/ibm/obj.rsp ||
  1176. echo 'restore of dmake/os2/ibm/obj.rsp failed'
  1177. Wc_c="`wc -c < 'dmake/os2/ibm/obj.rsp'`"
  1178. test 576 -eq "$Wc_c" ||
  1179.     echo 'dmake/os2/ibm/obj.rsp: original size 576, current size' "$Wc_c"
  1180. rm -f _shar_wnt_.tmp
  1181. fi
  1182. # ============= dmake/os2/ibm/optoff.h ==============
  1183. if test -f 'dmake/os2/ibm/optoff.h' -a X"$1" != X"-c"; then
  1184.     echo 'x - skipping dmake/os2/ibm/optoff.h (File already exists)'
  1185.     rm -f _shar_wnt_.tmp
  1186. else
  1187. > _shar_wnt_.tmp
  1188. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/ibm/optoff.h' &&
  1189. #if _MSC_VER < 600
  1190. # pragma loop_opt(off)
  1191. #endif
  1192. SHAR_EOF
  1193. chmod 0640 dmake/os2/ibm/optoff.h ||
  1194. echo 'restore of dmake/os2/ibm/optoff.h failed'
  1195. Wc_c="`wc -c < 'dmake/os2/ibm/optoff.h'`"
  1196. test 49 -eq "$Wc_c" ||
  1197.     echo 'dmake/os2/ibm/optoff.h: original size 49, current size' "$Wc_c"
  1198. rm -f _shar_wnt_.tmp
  1199. fi
  1200. # ============= dmake/os2/ibm/public.h ==============
  1201. if test -f 'dmake/os2/ibm/public.h' -a X"$1" != X"-c"; then
  1202.     echo 'x - skipping dmake/os2/ibm/public.h (File already exists)'
  1203.     rm -f _shar_wnt_.tmp
  1204. else
  1205. > _shar_wnt_.tmp
  1206. sed 's/^X//' << 'SHAR_EOF' > 'dmake/os2/ibm/public.h' &&
  1207. /* RCS      -- $Header$
  1208. -- WARNING  -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
  1209. --
  1210. -- SYNOPSIS -- Local functions exported to be visible by others.
  1211. --
  1212. -- DESCRIPTION
  1213. --      This file is generated by 'genpub'.  Function declarations
  1214. --      that appear in this file are extracted by 'genpub' from
  1215. --      source files.  Any function in the source file whose definition
  1216. --      appears like:
  1217. --
  1218. --          PUBLIC return_type
  1219. --          function( arg_list );
  1220. --          type_expr1 arg1;
  1221. --          ...
  1222. --
  1223. --      has its definition extracted and a line of the form:
  1224. --
  1225. --          return_type function ANSI((type_expr1,type_expr2,...));
  1226. --
  1227. --      entered into the output file.
  1228. --
  1229. -- AUTHOR
  1230. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  1231. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  1232. --
  1233. -- COPYRIGHT
  1234. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  1235. -- 
  1236. --      This program is free software; you can redistribute it and/or
  1237. --      modify it under the terms of the GNU General Public License
  1238. --      (version 1), as published by the Free Software Foundation, and
  1239. --      found in the file 'LICENSE' included with this distribution.
  1240. -- 
  1241. --      This program is distributed in the hope that it will be useful,
  1242. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  1243. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1244. --      GNU General Public License for more details.
  1245. -- 
  1246. --      You should have received a copy of the GNU General Public License
  1247. --      along with this program;  if not, write to the Free Software
  1248. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1249. --
  1250. -- LOG
  1251. --     $Log$
  1252. */
  1253. X
  1254. #ifndef _DMAKE_PUBLIC_h
  1255. #define _DMAKE_PUBLIC_h
  1256. X
  1257. void Infer_recipe ANSI((CELLPTR, CELLPTR));
  1258. int Make_targets ANSI(());
  1259. int Exec_commands ANSI((CELLPTR));
  1260. void Print_cmnd ANSI((char *, int, int));
  1261. void Pop_dir ANSI((int));
  1262. void Append_line ANSI((char *, int, FILE *, char *, int, int));
  1263. void Stat_target ANSI((CELLPTR, int));
  1264. char * Expand ANSI((char *));
  1265. char * Apply_edit ANSI((char *, char *, char *, int, int));
  1266. void Map_esc ANSI((char *));
  1267. char* Apply_modifiers ANSI((int, char *));
  1268. char* Tokenize ANSI((char *, char *));
  1269. char * _strjoin ANSI((char *, char *, int, int));
  1270. char * _stradd ANSI((char *, char *, int));
  1271. char * _strapp ANSI((char *, char *));
  1272. char * _strdup ANSI((char *));
  1273. char * _strdup2 ANSI((char *));
  1274. char * _strpbrk ANSI((char *, char *));
  1275. char * _strspn ANSI((char *, char *));
  1276. char * _strstr ANSI((char *, char *));
  1277. char * _substr ANSI((char *, char *));
  1278. uint16 Hash ANSI((char *, uint32 *));
  1279. HASHPTR Get_name ANSI((char *, HASHPTR *, int));
  1280. HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
  1281. HASHPTR Def_macro ANSI((char *, char *, int));
  1282. CELLPTR Def_cell ANSI((char *));
  1283. LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
  1284. void Clear_prerequisites ANSI((CELLPTR));
  1285. int Test_circle ANSI((CELLPTR, int));
  1286. STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
  1287. t_attr Rcp_attribute ANSI((char *));
  1288. int main ANSI((int, char **));
  1289. FILE * Openfile ANSI((char *, int, int));
  1290. FILE * Closefile ANSI(());
  1291. FILE * Search_file ANSI((char *, char **));
  1292. char * Filename ANSI(());
  1293. int Nestlevel ANSI(());
  1294. void No_ram ANSI(());
  1295. int Usage ANSI((int));
  1296. int Version ANSI(());
  1297. char * Get_suffix ANSI((char *));
  1298. char * Build_path ANSI((char *, char *));
  1299. void Make_rules ANSI(());
  1300. void Create_macro_vars ANSI(());
  1301. time_t Do_stat ANSI((char *, char *, char **));
  1302. int Do_touch ANSI((char *, char *, char **));
  1303. void Void_lib_cache ANSI((char *, char *));
  1304. time_t Do_time ANSI(());
  1305. int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
  1306. char ** Pack_argv ANSI((int, int, char *));
  1307. char * Read_env_string ANSI((char *));
  1308. int Write_env_string ANSI((char *, char *));
  1309. void ReadEnvironment ANSI(());
  1310. void Catch_signals ANSI((void (*)()));
  1311. void Clear_signals ANSI(());
  1312. void Prolog ANSI((int, char* []));
  1313. void Epilog ANSI((int));
  1314. char * Get_current_dir ANSI(());
  1315. int Set_dir ANSI((char*));
  1316. char Get_switch_char ANSI(());
  1317. FILE* Get_temp ANSI((char **, char *, int));
  1318. FILE * Start_temp ANSI((char *, CELLPTR, char **));
  1319. SHAR_EOF
  1320. true || echo 'restore of dmake/os2/ibm/public.h failed'
  1321. fi
  1322. echo 'End of part 27, continue with part 28'
  1323. echo 28 > _shar_seq_.tmp
  1324. exit 0
  1325. exit 0 # Just in case...
  1326.