home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume15 / dmake-3.6 / part07 < prev    next >
Text File  |  1990-10-14  |  41KB  |  1,255 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: dvadura@watdragon.waterloo.edu
  3. subject: v15i059: dmake version 3.6 (part 07/25)
  4. from: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  5. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  6.  
  7. Posting-number: Volume 15, Issue 59
  8. Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  9. Archive-name: dmake-3.6/part07
  10.  
  11. #!/bin/sh
  12. # this is part 7 of a multipart archive
  13. # do not concatenate these parts, unpack them in order with /bin/sh
  14. # file readme/msdos continued
  15. #
  16. CurArch=7
  17. if test ! -r s2_seq_.tmp
  18. then echo "Please unpack part 1 first!"
  19.      exit 1; fi
  20. ( read Scheck
  21.   if test "$Scheck" != $CurArch
  22.   then echo "Please unpack part $Scheck next!"
  23.        exit 1;
  24.   else exit 0; fi
  25. ) < s2_seq_.tmp || exit 1
  26. echo "x - Continuing file readme/msdos"
  27. sed 's/^X//' << 'SHAR_EOF' >> readme/msdos
  28. X         broken.  I don't know what is wrong and would be happy to hear
  29. X         of suggestions on how to fix the current mess :-)  If you hit
  30. X         ^C more than once when dmake is executing a child then I think
  31. X         it will hang most machines.  If you hit it only once or not at
  32. X         all then things seem to work fine :-).  I tried to get this right
  33. X         by looking at other code, and making some assumptions about what
  34. X         DOS does... NEVER ASSUME ANYTHING ABOUT WHAT DOS DOES :-)
  35. X
  36. X
  37. XOther notes:
  38. X------------
  39. Xdmake does not care if you are running command.com or some other command
  40. Xinterpretter, you must however specify the proper values of the environment
  41. Xvariables SHELL, SHELLFLAGS, GROUPSHELL, and GROUPFLAGS in order for things
  42. Xto work correctly.  Read the man page first.
  43. X
  44. XGroup recipes under DOS that use command.com as the command interpretter
  45. Xrequire you to set the GROUPSUFFIX macro.
  46. X
  47. XAs shipped the startup.mk files for the DOS version try to figure out what
  48. Xcommand interpretter you are using and set things up appropriately.
  49. XTwo command interpretters are supported in the shipped startup.mk file,
  50. Xcommand.com, and the MKS Korn shell.
  51. X
  52. Xdmake does not contain any builtin commands.  It gets all commands it executes
  53. Xfrom an external file system.  It is therefore most useful if it is used in
  54. Xconjunction with an environment similar to that provided by the MKS Tool kit,
  55. Xor equivalent.
  56. X
  57. Xdmake now supports the MKS argument passing conventions.  The facility is
  58. Xenabled by setting .MKSARGS:=1 and is set by default in the startup.mk file
  59. Xif an MKS Korn shell is detected as being the active command interpretter.
  60. SHAR_EOF
  61. echo "File readme/msdos is complete"
  62. chmod 0640 readme/msdos || echo "restore of readme/msdos fails"
  63. echo "x - extracting readme/cover (Text)"
  64. sed 's/^X//' << 'SHAR_EOF' > readme/cover &&
  65. XThis is the DMAKE version 3.6 distribution.  DMAKE is a Make like tool that
  66. Xhas been written by me and has been used by individuals at the University of
  67. XWaterloo for about a year and a half now.  This release replaces the previous
  68. Xversion 3.5 release which is no longer supported.  Please read the file
  69. X'readme/release' which accompanies this distribution and describes details
  70. Xof this release (This note is found in readme/cover).
  71. X
  72. Xdmake is available for anonymous ftp from watmsg.uwaterloo.ca address is
  73. X129.97.129.9.  It is in the pub/src directory, set your mode to binary,
  74. Xand copy either:
  75. X
  76. X    dmake-3.6.tar.Z        - compressed tar format
  77. X    dmake-3.6.zoo        - zoo archive
  78. X
  79. Xdmake is different from other versions of make in that it supports significant
  80. Xenhancements (See the man page).  A short summary of the more important
  81. Xones follows:
  82. X
  83. X    . support for portable makefiles
  84. X    . runs on many platforms (DOS, generic unix [sysv and bsd4.3],
  85. X      apollo, and others)
  86. X    . significantly enhanced macro facilities
  87. X    . transitive closure on inference graph
  88. X    . sophisticated inference algorithm
  89. X    . support for traversing the file sytem both during making of targets
  90. X      and during inference
  91. X    . %-meta rules for specifying rules to be used for inferring
  92. X      prerequisites
  93. X    . highly configurable
  94. X    . support for libraries
  95. X    . parallel making of targets on architectures that support it
  96. X    . attributed targets
  97. X    . text diversions
  98. X    . group recipes
  99. X    . swapping itself to DISK under MSDOS
  100. X    . supports MKS extended argument passing convention
  101. X
  102. XAll code found in this distribution is original and written by me except where
  103. Xnoted in the source and the following:
  104. X
  105. X- dbug package from Fred Fish  (dmake DEBUG=1, to make a debugging version
  106. X  of dmake)
  107. X
  108. X- malloc.c package, came from the net originally, author name wasn't
  109. X  on it when I found it, I can't even remember where I got it.
  110. X
  111. X-dennis
  112. SHAR_EOF
  113. chmod 0640 readme/cover || echo "restore of readme/cover fails"
  114. echo "x - extracting quit.c (Text)"
  115. sed 's/^X//' << 'SHAR_EOF' > quit.c &&
  116. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/quit.c,v 1.1 90/10/06 12:04:06 dvadura Exp $
  117. X-- SYNOPSIS -- end the dmake session.
  118. X-- 
  119. X-- DESCRIPTION
  120. X--     Handles dmake termination.
  121. X--
  122. X-- AUTHOR
  123. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  124. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  125. X--
  126. X-- COPYRIGHT
  127. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  128. X-- 
  129. X--      This program is free software; you can redistribute it and/or
  130. X--      modify it under the terms of the GNU General Public License
  131. X--      (version 1), as published by the Free Software Foundation, and
  132. X--      found in the file 'LICENSE' included with this distribution.
  133. X-- 
  134. X--      This program is distributed in the hope that it will be useful,
  135. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  136. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  137. X--      GNU General Public License for more details.
  138. X-- 
  139. X--      You should have received a copy of the GNU General Public License
  140. X--      along with this program;  if not, write to the Free Software
  141. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  142. X--
  143. X-- LOG
  144. X--     $Log:    quit.c,v $
  145. X * Revision 1.1  90/10/06  12:04:06  dvadura
  146. X * dmake Release, Version 3.6
  147. X * 
  148. X*/
  149. X
  150. X#include "extern.h"
  151. X
  152. Xstatic    void    _handle_quit ANSI((char*));
  153. Xstatic    int    _dont_quit = 0;
  154. X
  155. X
  156. Xvoid
  157. XQuit()/*
  158. X======== Error or quit */
  159. X{
  160. X   if( _dont_quit ) return;
  161. X
  162. X   while( Closefile() != NIL( FILE ) );
  163. X   Clean_up_processes();
  164. X
  165. X   if( Current_target != NIL(HOW) )
  166. X      Unlink_temp_files(Current_target);
  167. X
  168. X   if( _dont_quit == 0 ) _handle_quit( ".ERROR" );
  169. X
  170. X   Set_dir( Makedir );        /* No Error message if we can't do it */
  171. X   Epilog( ERROR_EXIT_VALUE );
  172. X}
  173. X
  174. X
  175. Xstatic void
  176. X_handle_quit( err_target )/*
  177. X============================
  178. X   Called by quit and the others to handle the execution of termination code
  179. X   from within make */
  180. Xchar *err_target;
  181. X{
  182. X   HASHPTR hp;
  183. X   CELLPTR cp;
  184. X
  185. X   if( (hp = Get_name(err_target, Defs, FALSE, NIL(CELL))) != NIL(HASH) ) {
  186. X      cp = hp->CP_OWNR;
  187. X      Glob_attr |= A_IGNORE;
  188. X
  189. X      _dont_quit = 1;
  190. X      cp->ce_flag |= F_TARGET;
  191. X      Make( cp, cp->CE_HOW, NIL(CELL) );
  192. X   }
  193. X}
  194. SHAR_EOF
  195. chmod 0440 quit.c || echo "restore of quit.c fails"
  196. echo "x - extracting percent.c (Text)"
  197. sed 's/^X//' << 'SHAR_EOF' > percent.c &&
  198. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/percent.c,v 1.1 90/10/06 12:04:04 dvadura Exp $
  199. X-- SYNOPSIS -- handle building or %-rule meta-target nfa.
  200. X-- 
  201. X-- DESCRIPTION
  202. X--    Builds the NFA used by dmake to match targets against %-meta
  203. X--    rule constructs.  The NFA is built as a set of DFA's.
  204. X-- 
  205. X-- AUTHOR
  206. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  207. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  208. X--
  209. X-- COPYRIGHT
  210. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  211. X-- 
  212. X--      This program is free software; you can redistribute it and/or
  213. X--      modify it under the terms of the GNU General Public License
  214. X--      (version 1), as published by the Free Software Foundation, and
  215. X--      found in the file 'LICENSE' included with this distribution.
  216. X-- 
  217. X--      This program is distributed in the hope that it will be useful,
  218. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  219. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  220. X--      GNU General Public License for more details.
  221. X-- 
  222. X--      You should have received a copy of the GNU General Public License
  223. X--      along with this program;  if not, write to the Free Software
  224. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  225. X--
  226. X-- LOG
  227. X--     $Log:    percent.c,v $
  228. X * Revision 1.1  90/10/06  12:04:04  dvadura
  229. X * dmake Release, Version 3.6
  230. X * 
  231. X*/
  232. X
  233. X#include "extern.h"
  234. X#include "alloc.h"
  235. X#include "db.h"
  236. X
  237. Xstatic DFAPTR _build_dfa ANSI((char *));
  238. Xstatic char   _shift_dfa ANSI((DFAPTR, char *));
  239. X
  240. X
  241. X#define NO_ACTION    0
  242. X#define START_PERCENT    1
  243. X#define END_PERCENT    2
  244. X#define ACCEPT        4
  245. X#define FAIL           -1
  246. X
  247. Xstatic  NFAPTR _nfa = NIL( NFA );
  248. X
  249. X
  250. XDFALINKPTR
  251. XMatch_dfa( buf )/*
  252. X==================
  253. X   This routines runs all DFA's in parrallel and selects the one that best
  254. X   matches the string.  If no match then it returns NIL( DFA ) */
  255. Xchar *buf;
  256. X{
  257. X   register NFAPTR nfa;
  258. X   int         adv;
  259. X   DFALINKPTR       dfa_list = NIL(DFALINK);
  260. X
  261. X   DB_ENTER( "Match_dfa" );
  262. X   DB_PRINT( "dfa", ("Matching %s", buf) );
  263. X
  264. X   /* Run each of the DFA's on the input string in parallel, we terminate
  265. X    * when all DFA's have either failed or ACCEPTED, if more than one DFA
  266. X    * accepts we build a list of all accepting DFA's sorted on states with
  267. X    * those matching in a higher numbered state heading the list. */
  268. X
  269. X   do {
  270. X      adv = FALSE;
  271. X
  272. X      for( nfa = _nfa; nfa != NIL( NFA ); nfa = nfa->next )
  273. X     if( nfa->status != (char) FAIL && nfa->status != (char) ACCEPT ) {
  274. X        adv++;
  275. X        nfa->status = _shift_dfa( nfa->dfa, buf );
  276. X
  277. X        /* Construct the list of matching DFA's */
  278. X        if( nfa->status == (char) ACCEPT ) {
  279. X           DFALINKPTR dl;
  280. X
  281. X           TALLOC( dl, 1, DFALINK );
  282. X           dl->dl_meta  = nfa->dfa->node;
  283. X           dl->dl_per   = _substr( nfa->dfa->pstart, nfa->dfa->pend );
  284. X           dl->dl_state = nfa->dfa->states - nfa->dfa->c_state;
  285. X
  286. X           if( dfa_list == NIL(DFALINK) )
  287. X              dfa_list = dl;
  288. X           else {
  289. X          DFALINKPTR tdli = dfa_list;
  290. X          DFALINKPTR tdlp = NIL(DFALINK);
  291. X
  292. X          for( ; tdli != NIL(DFALINK); tdli = tdli->dl_next ) {
  293. X             if( dl->dl_state >= tdli->dl_state )
  294. X            break;
  295. X             tdlp = tdli;
  296. X          }
  297. X
  298. X          if( tdli != NIL(DFALINK) ) {
  299. X             tdli->dl_prev = dl;
  300. X             dl->dl_next   = tdli;
  301. X          }
  302. X
  303. X          if( tdlp != NIL(DFALINK) ) {
  304. X             tdlp->dl_next = dl;
  305. X             dl->dl_prev   = tdlp;
  306. X          }
  307. X          else
  308. X             dfa_list = dl;
  309. X           }
  310. X
  311. X           DB_PRINT( "dfa", ("Matched [%s]", dl->dl_meta->CE_NAME) );
  312. X        }
  313. X     }
  314. X
  315. X      buf++;
  316. X   }
  317. X   while ( adv );
  318. X
  319. X   for( nfa = _nfa; nfa != NIL( NFA ); nfa = nfa->next ) {
  320. X      nfa->status = 0;
  321. X      nfa->dfa->c_state = nfa->dfa->states;
  322. X   }
  323. X
  324. X   DB_RETURN( dfa_list );
  325. X}
  326. X
  327. X
  328. Xvoid
  329. XCheck_circle_dfa()/*
  330. X====================
  331. X   This function is called to test for circularities in the DFA lists
  332. X   constructed from %-meta targets. */
  333. X{
  334. X   register NFAPTR nfa;
  335. X
  336. X   for( nfa = _nfa; nfa != NIL(NFA); nfa = nfa->next )
  337. X      if( Test_circle( nfa->dfa->node, TRUE ) )
  338. X     Fatal( "Detected circular dependency in inference graph at [%s]",
  339. X        nfa->dfa->node->CE_NAME );
  340. X}
  341. X
  342. X
  343. Xvoid
  344. XAdd_nfa( name )/*
  345. X=================
  346. X   Given name, build a DFA and add it to the NFA.  The NFA is maintained as
  347. X   a singly linked list of DFA's. */
  348. Xchar *name;
  349. X{
  350. X   NFAPTR nfa;
  351. X
  352. X   TALLOC(nfa, 1, NFA);
  353. X   nfa->dfa = _build_dfa(name);
  354. X
  355. X   if( _nfa != NIL(NFA) ) nfa->next = _nfa;
  356. X
  357. X   _nfa = nfa;
  358. X}
  359. X
  360. X
  361. Xstatic DFAPTR
  362. X_build_dfa( name )/*
  363. X====================
  364. X   Construct a dfa for the passed in cell name.  The routine returns a struct
  365. X   that represents a finite state machine that can recognize a regular
  366. X   expression with exactly one '%' sign in it.  The '%' symbol is used as a
  367. X   wildcard character that will match anything except the character that
  368. X   immediately follows it or NUL.
  369. X
  370. X   The Construction of DFA's is well know and can be found in Hopcroft and
  371. X   Ullman or any other book discussing formal language theory.
  372. X   A more practical treatise can be found in Compilers, Aho, Sethi and Ullman.
  373. X*/
  374. Xchar *name;
  375. X{
  376. X   register int i;
  377. X   DFAPTR   dfa;
  378. X   int      nstates;
  379. X   char     c;
  380. X   STATEPTR sp, per_state;
  381. X   int      pcount=0;
  382. X   int      end_percent=FALSE;
  383. X
  384. X   nstates = strlen(name)+2;
  385. X
  386. X   /* Allocate a DFA node and the right number of states. */
  387. X   TALLOC(dfa, 1, DFA);
  388. X   TALLOC(sp=dfa->c_state=dfa->states, nstates, STATE);
  389. X   dfa->node = Def_cell( name, NIL(CELL) );
  390. X
  391. X   /* Now construct the state table for the DFA */
  392. X   for(i=0,per_state=NIL(STATE); i<nstates; i++, sp++) {
  393. X      if( (c = *name++) == '%' ) {
  394. X     if( pcount++ > 0 )
  395. X        Error( "Only one %% allowed within a %%-meta target" );
  396. X
  397. X     sp->symbol   = 0;
  398. X     sp->action   = START_PERCENT;
  399. X     sp->no_match = sp->match = per_state = sp+1;
  400. X     end_percent  = TRUE;
  401. X      }
  402. X      else {
  403. X     sp->symbol   = c;
  404. X     sp->no_match = per_state;
  405. X
  406. X     if( c == '\0' ) {
  407. X        sp->action = ACCEPT;
  408. X        sp->match  = dfa->states;
  409. X     }
  410. X     else {
  411. X        sp->action = NO_ACTION;
  412. X        sp->match  = sp+1;
  413. X     }
  414. X
  415. X     if( end_percent ) {
  416. X        sp->action |= END_PERCENT;
  417. X        end_percent = FALSE;
  418. X     }
  419. X      }
  420. X   }
  421. X
  422. X   return(dfa);
  423. X}
  424. X
  425. X
  426. Xstatic char
  427. X_shift_dfa( dfa, data )/*
  428. X=========================
  429. X   Take a given dfa and advance it based on the current state, the shift
  430. X   action in that state, and the current data value. */
  431. XDFAPTR dfa;
  432. Xchar   *data;
  433. X{
  434. X   register STATEPTR sp = dfa->c_state;
  435. X   char c = *data;
  436. X
  437. X   /* Check if it is a START_PERCENT action if so then we need to save
  438. X    * a pointer to the start of the string and advance to the next state. */
  439. X   if( sp->action & START_PERCENT ) {
  440. X      dfa->pstart = data;
  441. X      sp++;
  442. X   }
  443. X
  444. X   /* Now check if the current char matches the character expected in the
  445. X    * current state.  If it does then perform the specified action, otherwise
  446. X    * either shift it or fail.  We fail if the next state on no-match is
  447. X    * NIL. */
  448. X   if( sp->symbol == c ) {
  449. X      if( sp->action & END_PERCENT ) dfa->pend = data;
  450. X      if( sp->action & ACCEPT ) return(ACCEPT);
  451. X      dfa->c_state = sp->match;
  452. X   }
  453. X   else if( (dfa->c_state = sp->no_match) == NIL(STATE) || !c )
  454. X      return(FAIL);
  455. X
  456. X   return(NO_ACTION);
  457. X}
  458. SHAR_EOF
  459. chmod 0440 percent.c || echo "restore of percent.c fails"
  460. echo "x - extracting path.c (Text)"
  461. sed 's/^X//' << 'SHAR_EOF' > path.c &&
  462. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/path.c,v 1.1 90/10/06 12:04:02 dvadura Exp $
  463. X-- SYNOPSIS -- pathname manipulation code
  464. X-- 
  465. X-- DESCRIPTION
  466. X--    Pathname routines to handle building and pulling appart
  467. X--    pathnames.
  468. X-- 
  469. X-- AUTHOR
  470. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  471. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  472. X--
  473. X-- COPYRIGHT
  474. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  475. X-- 
  476. X--      This program is free software; you can redistribute it and/or
  477. X--      modify it under the terms of the GNU General Public License
  478. X--      (version 1), as published by the Free Software Foundation, and
  479. X--      found in the file 'LICENSE' included with this distribution.
  480. X-- 
  481. X--      This program is distributed in the hope that it will be useful,
  482. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  483. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  484. X--      GNU General Public License for more details.
  485. X-- 
  486. X--      You should have received a copy of the GNU General Public License
  487. X--      along with this program;  if not, write to the Free Software
  488. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  489. X--
  490. X-- LOG
  491. X--     $Log:    path.c,v $
  492. X * Revision 1.1  90/10/06  12:04:02  dvadura
  493. X * dmake Release, Version 3.6
  494. X * 
  495. X*/
  496. X
  497. X#include "extern.h"
  498. X#include "alloc.h"
  499. X#include <string.h>
  500. X
  501. X/*
  502. X** Return the suffix portion of a filename, assumed to begin with a `.'.
  503. X*/
  504. Xchar *
  505. XGet_suffix(name)
  506. Xchar *name;
  507. X{
  508. X   char *suff;
  509. X
  510. X   if(name == NIL(char)  || (suff = strrchr(name, '.')) == NIL(char))
  511. X      suff = ".NULL";
  512. X
  513. X   return (suff);
  514. X}
  515. X
  516. X
  517. X
  518. X/*
  519. X** Take dir and name, and return a path which has dir as the directory
  520. X** and name afterwards.
  521. X**
  522. X** N.B. Assumes that the dir separator string is in DirSepStr.
  523. X**      Return path is built in a static buffer, if you need to use it
  524. X**      again you must _strdup the result returned by Build_path.
  525. X*/
  526. Xchar *
  527. XBuild_path(dir, name)
  528. Xchar *dir;
  529. Xchar *name;
  530. X{
  531. X   static char     *path  = NIL(char);
  532. X   static unsigned buflen = 0;
  533. X   int  plen = 0;
  534. X   int  dlen = 0;
  535. X   int  len;
  536. X
  537. X   if( dir  != NIL(char) ) dlen = strlen( dir  );
  538. X   if( name != NIL(char) ) plen = strlen( name );
  539. X   len = plen+dlen+strlen(DirSepStr)+1;
  540. X
  541. X   if( len > buflen ) {
  542. X      buflen = (len+16) & ~0xf;        /* buf is always multiple of 16 */
  543. X
  544. X      if( path == NIL(char) )
  545. X         path = MALLOC( buflen, char );
  546. X      else
  547. X         path = realloc( path, (unsigned) (buflen*sizeof(char)) );
  548. X   }
  549. X   
  550. X   *path = '\0';
  551. X
  552. X   if( dlen ) {
  553. X      strcpy( path, dir );
  554. X
  555. X      if( strchr(DirSepStr, dir[dlen-1]) == NIL(char) )
  556. X     strcat( path, DirSepStr );
  557. X   }
  558. X
  559. X   strcat( path, name );
  560. X   return( path );
  561. X}
  562. SHAR_EOF
  563. chmod 0440 path.c || echo "restore of path.c fails"
  564. echo "x - extracting patchlvl.h (Text)"
  565. sed 's/^X//' << 'SHAR_EOF' > patchlvl.h &&
  566. X/* dmake patch level, reset to 1 for each new version release. */
  567. X
  568. X#define PATCHLEVEL 1
  569. SHAR_EOF
  570. chmod 0440 patchlvl.h || echo "restore of patchlvl.h fails"
  571. echo "x - extracting parse.c (Text)"
  572. sed 's/^X//' << 'SHAR_EOF' > parse.c &&
  573. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/parse.c,v 1.1 90/10/06 12:04:01 dvadura Exp $
  574. X-- SYNOPSIS -- parse the input, and perform semantic analysis
  575. X-- 
  576. X-- DESCRIPTION
  577. X--     This file contains the routines that parse the input makefile and
  578. X--    call the appropriate routines to perform the semantic analysis and
  579. X--    build the internal dag.
  580. X--
  581. X-- AUTHOR
  582. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  583. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  584. X--
  585. X-- COPYRIGHT
  586. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  587. X-- 
  588. X--      This program is free software; you can redistribute it and/or
  589. X--      modify it under the terms of the GNU General Public License
  590. X--      (version 1), as published by the Free Software Foundation, and
  591. X--      found in the file 'LICENSE' included with this distribution.
  592. X-- 
  593. X--      This program is distributed in the hope that it will be useful,
  594. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  595. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  596. X--      GNU General Public License for more details.
  597. X-- 
  598. X--      You should have received a copy of the GNU General Public License
  599. X--      along with this program;  if not, write to the Free Software
  600. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  601. X--
  602. X-- LOG
  603. X--     $Log:    parse.c,v $
  604. X * Revision 1.1  90/10/06  12:04:01  dvadura
  605. X * dmake Release, Version 3.6
  606. X * 
  607. X*/
  608. X
  609. X#include <ctype.h>
  610. X#include "extern.h"
  611. X#include "alloc.h"
  612. X#include "db.h"
  613. X
  614. X
  615. Xvoid
  616. XParse( fil )/*
  617. X==============  Parse the makefile input */
  618. XFILE *fil;
  619. X{
  620. X   int    state = NORMAL_SCAN;           /* indicates current parser state */
  621. X   int  group = FALSE;                 /* true if scanning a group rcpe  */
  622. X   int  rule  = FALSE;                 /* have seen a recipe line        */
  623. X   char *p;                   /* termporary pointer into Buffer */
  624. X
  625. X   DB_ENTER( "Parse" );
  626. X
  627. X   while( TRUE ) {
  628. X      if( Get_line( Buffer, fil ) ) {
  629. X     if( fil != NIL( FILE ) )               /* end of parsable input */
  630. X        Closefile();
  631. X
  632. X     Bind_rules_to_targets( F_DEFAULT );
  633. X         if( group )  Fatal( "Incomplete rule recipe group detected" );
  634. X
  635. X     DB_VOID_RETURN;
  636. X      }
  637. X      else
  638. X         switch( state ) {
  639. X        case RULE_SCAN:
  640. X
  641. X           /* Check for the `[' that starts off a group rule definition.  It
  642. X            * must appear as the first non-white space
  643. X        * character in the line. */
  644. X
  645. X           p = _strspn( Buffer, " \t" );
  646. X               if( Set_group_attributes( p ) ) {
  647. X                  if( rule  && group )
  648. X                     Fatal( "Cannot mix single and group recipe lines" );
  649. X                  else
  650. X                     group = TRUE;
  651. X
  652. X                  rule = TRUE;
  653. X
  654. X                  break;                     /* ignore the group start  */
  655. X               }
  656. X
  657. X               if( group ) {
  658. X                  if( *p != ']' ) {
  659. X                     Add_recipe_to_list( Buffer, TRUE, TRUE );
  660. X                     rule = TRUE;
  661. X                  }
  662. X                  else
  663. X                     state = NORMAL_SCAN;
  664. X               }
  665. X               else {
  666. X                  if( *Buffer == '\t' ) {
  667. X                     Add_recipe_to_list( Buffer, FALSE, FALSE );
  668. X                     rule = TRUE;
  669. X                  }
  670. X                  else if( *p == ']' )
  671. X                     Fatal( "Found unmatched ']'" );
  672. X                  else if( *Buffer )
  673. X             state = NORMAL_SCAN;
  674. X               }
  675. X               if( state == RULE_SCAN ) break;     /* ie. keep going    */
  676. X               
  677. X           Bind_rules_to_targets( (group) ? F_GROUP: F_DEFAULT );
  678. X
  679. X               rule = FALSE;
  680. X               if( group ) {
  681. X                  group = FALSE;
  682. X                  break;
  683. X               }
  684. X           /*FALLTRHOUGH*/
  685. X
  686. X               /* In this case we broke out of the rule scan because we do not
  687. X                * have a recipe line that begins with a <TAB>, so lets
  688. X        * try to scan the thing as a macro or rule definition. */
  689. X               
  690. X
  691. X        case NORMAL_SCAN:
  692. X           if( !*Buffer ) continue;         /* we have null input line */
  693. X
  694. X           /* STUPID AUGMAKE uses "include" at the start of a line as
  695. X            * a signal to include a new file, so let's look for it.
  696. X        * if we see it replace it by .INCLUDE: and stick this back
  697. X        * into the buffer. */
  698. X           if( !strncmp( "include", Buffer, 7 ) &&
  699. X           (Buffer[7] == ' ' || Buffer[7] == '\t') )
  700. X           {
  701. X          char *tmp;
  702. X
  703. X          tmp = _strjoin( ".INCLUDE:", Buffer+7, -1, FALSE );
  704. X          strcpy( Buffer, tmp );
  705. X          FREE( tmp );
  706. X           }
  707. X
  708. X               /* look for a macro definition, they all contain an = sign
  709. X            * if we fail to recognize it as a legal macro op then try to
  710. X        * parse the same line as a rule definition, it's one or the
  711. X        * other */
  712. X        
  713. X           if( Parse_macro(Buffer, M_DEFAULT) ) break;/* it's a macro def */
  714. X           if( Parse_rule_def( &state ) )         break;/* it's a rule def  */
  715. X
  716. X           /* if just blank line then ignore it */
  717. X           if( *_strspn( Buffer, " \t" ) == '\0' ) break;
  718. X           
  719. X           /* otherwise assume it was a line of unrecognized input, or a
  720. X            * recipe line out of place so print a message */
  721. X        
  722. X           Fatal( "Expecting macro or rule defn, found neither" );
  723. X           break;
  724. X
  725. X        default:
  726. X           Fatal( "Internal -- UNKNOWN Parser state %d", state );
  727. X     }
  728. X   }
  729. X}
  730. X
  731. SHAR_EOF
  732. chmod 0440 parse.c || echo "restore of parse.c fails"
  733. echo mkdir - msdos
  734. mkdir msdos
  735. echo mkdir - msdos/tccdos
  736. mkdir msdos/tccdos
  737. echo "x - extracting msdos/tccdos/utime.c (Text)"
  738. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/utime.c &&
  739. X/*
  740. X** change access and modify times of file
  741. X*/
  742. X#include <sys/stat.h>
  743. X#include <fcntl.h>
  744. X#include <time.h>
  745. X
  746. Xint
  747. Xutime(name, timep)/*
  748. X====================
  749. X    Broken for turbo C it only sets the file time to the current time by
  750. X    touching a character in the file */
  751. Xchar*    name;
  752. Xtime_t    timep[2];
  753. X{
  754. X    struct  stat buf;
  755. X    int    fil;
  756. X    char    data;
  757. X
  758. X    if (stat(name, &buf) != 0)
  759. X        return (-1);
  760. X    if (buf.st_size != 0)  {
  761. X        if ((fil = open(name, O_RDWR, S_IWRITE)) < 0)
  762. X            return (-1);
  763. X        if (read(fil, &data, 1) < 1) {
  764. X            close(fil);
  765. X            return (-1);
  766. X        }
  767. X        lseek(fil, 0L, 0);
  768. X        if (write(fil, &data, 1) < 1) {
  769. X            close(fil);
  770. X            return (-1);
  771. X        }
  772. X        close(fil);
  773. X        return (0);
  774. X    } else     if ((fil = creat(name, S_IWRITE)) < 0) {
  775. X        return (-1);
  776. X    } else {
  777. X        close(fil);
  778. X        return (0);
  779. X    }
  780. X}
  781. SHAR_EOF
  782. chmod 0440 msdos/tccdos/utime.c || echo "restore of msdos/tccdos/utime.c fails"
  783. echo "x - extracting msdos/tccdos/tempnam.c (Text)"
  784. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/tempnam.c &&
  785. X/*LINTLIBRARY*/
  786. X#include <stdio.h>
  787. X#include <string.h>
  788. X#include <stdlib.h>
  789. X#include <time.h>
  790. X
  791. X#if defined(max)
  792. X#   undef  max
  793. X#endif
  794. X#define max(A,B) (((A)<(B))?(B):(A))
  795. X
  796. Xextern char *mktemp();
  797. Xextern int access();
  798. Xint _access();
  799. X
  800. X/* Turbo C stdio.h doesn't define P_tmpdir, so let's do it here */
  801. X/* Under DOS leave the default tmpdir pointing here!        */
  802. Xstatic char *P_tmpdir = "";
  803. X
  804. Xchar *
  805. Xtempnam(dir, prefix)
  806. Xchar *dir;        /* use this directory please (if non-NULL) */
  807. Xchar *prefix;        /* use this (if non-NULL) as filename prefix */
  808. X{
  809. X   static         int count = 0;
  810. X   register char *p, *q, *tmpdir;
  811. X   int            tl=0, dl=0, pl;
  812. X   char          buf[30];
  813. X
  814. X   pl = strlen(P_tmpdir);
  815. X
  816. X   if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
  817. X   if( dir != NULL ) dl = strlen(dir);
  818. X
  819. X   if( (p = malloc((unsigned)(max(max(dl,tl),pl)+12))) == NULL )
  820. X     return(NULL);
  821. X
  822. X   *p = '\0';
  823. X
  824. X   if( (tl == 0) || (_access( strcpy(p, tmpdir), 0) != 0) )
  825. X     if( (dl == 0) || (_access( strcpy(p, dir), 0) != 0) )
  826. X    if( _access( strcpy(p, P_tmpdir), 0) != 0 )
  827. X       if( !prefix )
  828. X          prefix = "tp";
  829. X
  830. X   if(prefix)
  831. X   {
  832. X      *(p+strlen(p)+2) = '\0';
  833. X      (void)strncat(p, prefix, 2);
  834. X   }
  835. X
  836. X   sprintf( buf, "%ld", (long) time((time_t *)0) );
  837. X   (void)strcat(p, buf+strlen(buf)-6 );
  838. X   sprintf( buf, "%03d", count++ );
  839. X   q=p+strlen(p)-6;
  840. X   *q++ = buf[0];
  841. X   *q++ = buf[1];
  842. X   *q++ = buf[2];
  843. X
  844. X   if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
  845. X
  846. X   return(p);
  847. X}
  848. X
  849. X
  850. X
  851. X_access( name, flag )
  852. Xchar *name;
  853. Xint  flag;
  854. X{
  855. X   char *p;
  856. X   int r;
  857. X
  858. X   if( name == NULL || !*name ) return(1);  /* NULL dir means current dir */
  859. X   r = access( name, flag );
  860. X   p = name+strlen(name)-1;
  861. X   if(*p != '/' && *p != '\\') strcat( p, "/" );
  862. X
  863. X   return( r );
  864. X}
  865. SHAR_EOF
  866. chmod 0440 msdos/tccdos/tempnam.c || echo "restore of msdos/tccdos/tempnam.c fails"
  867. echo "x - extracting msdos/tccdos/startup.mk (Text)"
  868. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/startup.mk &&
  869. X# MSDOS DMAKE startup file.  Customize to suit your needs.
  870. X# Assumes MKS toolkit for the tool commands, and Turbo-C.  Change as req'd.
  871. X# See the documentation for a description of internally defined macros.
  872. X#
  873. X# Disable warnings for macros redefined here that were given
  874. X# on the command line.
  875. X__.SILENT := $(.SILENT)
  876. X.SILENT   := yes
  877. X
  878. X# Configuration parameters for DMAKE startup.mk file
  879. X# Set these to NON-NULL if you wish to turn the parameter on.
  880. X_HAVE_RCS    := yes        # yes => RCS  is installed.
  881. X_HAVE_SCCS    :=         # yes => SCCS is installed.
  882. X
  883. X# Applicable suffix definitions
  884. XA := .lib    # Libraries
  885. XE := .exe    # Executables
  886. XF := .for    # Fortran
  887. XO := .obj    # Objects
  888. XP := .pas    # Pascal
  889. XS := .asm    # Assembler sources
  890. XV :=         # RCS suffix
  891. X
  892. X# See if these are defined
  893. XTMPDIR := $(ROOTDIR)/tmp
  894. X.IMPORT .IGNORE : TMPDIR SHELL COMSPEC
  895. X
  896. X# Recipe execution configurations
  897. X# First set SHELL, If it is not defined, use COMSPEC, otherwise
  898. X# it is assumed to be MKS Korn SHELL.
  899. X.IF $(SHELL) == $(NULL)
  900. X.IF $(COMSPEC) == $(NULL)
  901. X   SHELL := $(ROOTDIR)/bin/sh$E
  902. X.ELSE
  903. X   SHELL := $(COMSPEC)
  904. X.END
  905. X.END
  906. XGROUPSHELL := $(SHELL)
  907. X
  908. X# Now set remaining arguments depending on which SHELL we
  909. X# are going to use.  COMSPEC (assumed to be command.com) or
  910. X# MKS Korn Shell.
  911. X.IF $(SHELL)==$(COMSPEC)
  912. X   SHELLFLAGS  := $(SWITCHAR)c
  913. X   GROUPFLAGS  := $(SHELLFLAGS)
  914. X   SHELLMETAS  := *"?<>
  915. X   GROUPSUFFIX := .bat
  916. X   DIRSEPSTR   := \\
  917. X   DIVFILE      = $(TMPFILE:s,/,\)
  918. X.ELSE
  919. X   SHELLFLAGS  := -c
  920. X   GROUPFLAGS  := 
  921. X   SHELLMETAS  := *"?<>|()&][$$\#`'
  922. X   GROUPSUFFIX := .ksh
  923. X   .MKSARGS    := yes
  924. X   DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${DIVSHELL}})
  925. X   DIVSEP_shell_yes := \\\
  926. X   DIVSEP_shell_no  := \\
  927. X.END
  928. X
  929. X# Standard C-language command names and flags
  930. X   CC      := tcc        # C-compiler and flags
  931. X   CFLAGS  +=
  932. X
  933. X   AS      := tasm        # Assembler and flags
  934. X   ASFLAGS += 
  935. X
  936. X   LD       = tlink        # Loader and flags
  937. X   LDFLAGS +=
  938. X   LDLIBS   =
  939. X
  940. X# Definition of $(MAKE) macro for recursive makes.
  941. X   MAKE = $(MAKECMD) $(MFLAGS)
  942. X
  943. X# Language and Parser generation Tools and their flags
  944. X   YACC      := yacc        # standard yacc
  945. X   YFLAGS +=
  946. X   YTAB      := ytab        # yacc output files name stem.
  947. X
  948. X   LEX      := lex        # standard lex
  949. X   LFLAGS +=
  950. X   LEXYY  := lex_yy        # lex output file
  951. X
  952. X# Other Compilers, Tools and their flags
  953. X   PC    := tpc            # pascal compiler
  954. X   RC    := anyf77        # ratfor compiler
  955. X   FC    := anyf77        # fortran compiler
  956. X
  957. X   CO       := co        # check out for RCS
  958. X   COFLAGS += -q
  959. X
  960. X   AR     := ar            # archiver
  961. X   ARFLAGS+= ruv
  962. X
  963. X   RM       := rm        # remove a file command
  964. X   RMFLAGS +=
  965. X
  966. X# Implicit generation rules for making inferences.
  967. X# We don't provide .yr or .ye rules here.  They're obsolete.
  968. X# Rules for making *$O
  969. X   %$O : %.c ; $(CC) $(CFLAGS) -c $<
  970. X   %$O : %$P ; $(PC) $(PFLAGS) -c $<
  971. X   %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
  972. X   %$O : %.cl ; class -c $<
  973. X   %$O : %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  974. X
  975. X# Executables
  976. X   %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
  977. X
  978. X# lex and yacc rules
  979. X   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  980. X   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  981. X
  982. X# RCS support
  983. X.IF $(_HAVE_RCS)
  984. X   % : $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  985. X   .NOINFER : $$(@:d)RCS/$$(@:f)$V
  986. X.END
  987. X
  988. X# SCCS support
  989. X.IF $(_HAVE_SCCS)
  990. X   % : s.% ; get $@
  991. X   .NOINFER : s.%
  992. X.END
  993. X
  994. X# Recipe to make archive files.
  995. X%$A :
  996. X[
  997. X   $(AR) $(ARFLAGS) $@ $?
  998. X   $(RM) $(RMFLAGS) $?
  999. X]
  1000. X
  1001. X# DMAKE uses this recipe to remove intermediate targets
  1002. X.REMOVE :; $(RM) -f $<
  1003. X
  1004. X# AUGMAKE extensions for SYSV compatibility
  1005. X@B = $(@:b)
  1006. X@D = $(@:d)
  1007. X@F = $(@:f)
  1008. X*B = $(*:b)
  1009. X*D = $(*:d)
  1010. X*F = $(*:f)
  1011. X<B = $(<:b)
  1012. X<D = $(<:d)
  1013. X<F = $(<:f)
  1014. X?B = $(?:b)
  1015. X?F = $(?:f)
  1016. X?D = $(?:d)
  1017. X
  1018. X# Turn warnings back to previous setting.
  1019. X.SILENT := $(__.SILENT)
  1020. X
  1021. X# Local init file if any, gets parsed before user makefile
  1022. X.INCLUDE .IGNORE: "_startup.mk"
  1023. SHAR_EOF
  1024. chmod 0640 msdos/tccdos/startup.mk || echo "restore of msdos/tccdos/startup.mk fails"
  1025. echo "x - extracting msdos/tccdos/objswp.rsp (Text)"
  1026. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/objswp.rsp &&
  1027. Xc:\lib.tcc\c0c.obj+
  1028. Xobjects\exec.obj+
  1029. Xobjects\infer.obj+
  1030. Xobjects\make.obj+
  1031. Xobjects\stat.obj+
  1032. Xobjects\expand.obj+
  1033. Xobjects\string.obj+
  1034. Xobjects\hash.obj+
  1035. Xobjects\dag.obj+
  1036. Xobjects\dmake.obj+
  1037. Xobjects\path.obj+
  1038. Xobjects\imacs.obj+
  1039. Xobjects\sysintf.obj+
  1040. Xobjects\parse.obj+
  1041. Xobjects\getinp.obj+
  1042. Xobjects\quit.obj+
  1043. Xobjects\basename.obj+
  1044. Xobjects\dump.obj+
  1045. Xobjects\macparse.obj+
  1046. Xobjects\rulparse.obj+
  1047. Xobjects\percent.obj+
  1048. Xobjects\function.obj+
  1049. Xobjects\ruletab.obj+
  1050. Xobjects\dirbrk.obj+
  1051. Xobjects\runargv.obj+
  1052. Xobjects\arlib.obj+
  1053. Xobjects\_chdir.obj+
  1054. Xobjects\switchar.obj+
  1055. Xobjects\rmprq.obj+
  1056. Xobjects\find.obj+
  1057. Xobjects\spawn.obj+
  1058. Xobjects\tempnam.obj+
  1059. Xobjects\utime.obj
  1060. SHAR_EOF
  1061. chmod 0640 msdos/tccdos/objswp.rsp || echo "restore of msdos/tccdos/objswp.rsp fails"
  1062. echo "x - extracting msdos/tccdos/obj.rsp (Text)"
  1063. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/obj.rsp &&
  1064. Xc:\lib.tcc\c0c.obj+
  1065. Xobjects\infer.obj+
  1066. Xobjects\make.obj+
  1067. Xobjects\stat.obj+
  1068. Xobjects\expand.obj+
  1069. Xobjects\string.obj+
  1070. Xobjects\hash.obj+
  1071. Xobjects\dag.obj+
  1072. Xobjects\dmake.obj+
  1073. Xobjects\path.obj+
  1074. Xobjects\imacs.obj+
  1075. Xobjects\sysintf.obj+
  1076. Xobjects\parse.obj+
  1077. Xobjects\getinp.obj+
  1078. Xobjects\quit.obj+
  1079. Xobjects\basename.obj+
  1080. Xobjects\dump.obj+
  1081. Xobjects\macparse.obj+
  1082. Xobjects\rulparse.obj+
  1083. Xobjects\percent.obj+
  1084. Xobjects\function.obj+
  1085. Xobjects\ruletab.obj+
  1086. Xobjects\dirbrk.obj+
  1087. Xobjects\runargv.obj+
  1088. Xobjects\arlib.obj+
  1089. Xobjects\_chdir.obj+
  1090. Xobjects\switchar.obj+
  1091. Xobjects\rmprq.obj+
  1092. Xobjects\tempnam.obj+
  1093. Xobjects\utime.obj
  1094. SHAR_EOF
  1095. chmod 0640 msdos/tccdos/obj.rsp || echo "restore of msdos/tccdos/obj.rsp fails"
  1096. echo "x - extracting msdos/tccdos/mkswp.bat (Text)"
  1097. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/mkswp.bat &&
  1098. Xmkdir objects
  1099. Xtasm -t -mx -dmcompact msdos\exec.asm;
  1100. Xmv exec.obj objects
  1101. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  infer.c
  1102. Xmv infer.obj objects
  1103. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  make.c
  1104. Xmv make.obj objects
  1105. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  stat.c
  1106. Xmv stat.obj objects
  1107. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  expand.c
  1108. Xmv expand.obj objects
  1109. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  string.c
  1110. Xmv string.obj objects
  1111. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  hash.c
  1112. Xmv hash.obj objects
  1113. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  dag.c
  1114. Xmv dag.obj objects
  1115. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  dmake.c
  1116. Xmv dmake.obj objects
  1117. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  path.c
  1118. Xmv path.obj objects
  1119. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  imacs.c
  1120. Xmv imacs.obj objects
  1121. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  sysintf.c
  1122. Xmv sysintf.obj objects
  1123. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  parse.c
  1124. Xmv parse.obj objects
  1125. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  getinp.c
  1126. Xmv getinp.obj objects
  1127. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  quit.c
  1128. Xmv quit.obj objects
  1129. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  basename.c
  1130. Xmv basename.obj objects
  1131. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  dump.c
  1132. Xmv dump.obj objects
  1133. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  macparse.c
  1134. Xmv macparse.obj objects
  1135. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  rulparse.c
  1136. Xmv rulparse.obj objects
  1137. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  percent.c
  1138. Xmv percent.obj objects
  1139. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  function.c
  1140. Xmv function.obj objects
  1141. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\ruletab.c
  1142. Xmv ruletab.obj objects
  1143. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\dirbrk.c
  1144. Xmv dirbrk.obj objects
  1145. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\runargv.c
  1146. Xmv runargv.obj objects
  1147. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\arlib.c
  1148. Xmv arlib.obj objects
  1149. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\_chdir.c
  1150. Xmv _chdir.obj objects
  1151. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\switchar.c
  1152. Xmv switchar.obj objects
  1153. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\rmprq.c
  1154. Xmv rmprq.obj objects
  1155. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\find.c
  1156. Xmv find.obj objects
  1157. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\spawn.c
  1158. Xmv spawn.obj objects
  1159. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\tccdos\tempnam.c
  1160. Xmv tempnam.obj objects
  1161. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\tccdos\utime.c
  1162. Xmv utime.obj objects
  1163. Xtlink @msdos\tccdos\objswp.rsp,dmake.exe,NUL.MAP,@msdos\tccdos\libswp.rsp NUL.DEF
  1164. SHAR_EOF
  1165. chmod 0640 msdos/tccdos/mkswp.bat || echo "restore of msdos/tccdos/mkswp.bat fails"
  1166. echo "x - extracting msdos/tccdos/mk.bat (Text)"
  1167. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/mk.bat &&
  1168. Xmkdir objects
  1169. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  infer.c
  1170. Xmv infer.obj objects
  1171. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  make.c
  1172. Xmv make.obj objects
  1173. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  stat.c
  1174. Xmv stat.obj objects
  1175. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  expand.c
  1176. Xmv expand.obj objects
  1177. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  string.c
  1178. Xmv string.obj objects
  1179. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  hash.c
  1180. Xmv hash.obj objects
  1181. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  dag.c
  1182. Xmv dag.obj objects
  1183. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  dmake.c
  1184. Xmv dmake.obj objects
  1185. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  path.c
  1186. Xmv path.obj objects
  1187. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  imacs.c
  1188. Xmv imacs.obj objects
  1189. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  sysintf.c
  1190. Xmv sysintf.obj objects
  1191. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  parse.c
  1192. Xmv parse.obj objects
  1193. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  getinp.c
  1194. Xmv getinp.obj objects
  1195. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  quit.c
  1196. Xmv quit.obj objects
  1197. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  basename.c
  1198. Xmv basename.obj objects
  1199. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  dump.c
  1200. Xmv dump.obj objects
  1201. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  macparse.c
  1202. Xmv macparse.obj objects
  1203. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  rulparse.c
  1204. Xmv rulparse.obj objects
  1205. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  percent.c
  1206. Xmv percent.obj objects
  1207. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  function.c
  1208. Xmv function.obj objects
  1209. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\ruletab.c
  1210. Xmv ruletab.obj objects
  1211. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\dirbrk.c
  1212. Xmv dirbrk.obj objects
  1213. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\runargv.c
  1214. Xmv runargv.obj objects
  1215. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\arlib.c
  1216. Xmv arlib.obj objects
  1217. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\_chdir.c
  1218. Xmv _chdir.obj objects
  1219. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\switchar.c
  1220. Xmv switchar.obj objects
  1221. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\rmprq.c
  1222. Xmv rmprq.obj objects
  1223. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\tccdos\tempnam.c
  1224. Xmv tempnam.obj objects
  1225. Xtcc -c -DHELP -I. -Icommon -Imsdos -Imsdos\tccdos -f- -d -O -N- -w-nod -mc  msdos\tccdos\utime.c
  1226. Xmv utime.obj objects
  1227. Xtlink @msdos\tccdos\obj.rsp,dmake.exe,NUL.MAP,@msdos\tccdos\lib.rsp NUL.DEF
  1228. SHAR_EOF
  1229. chmod 0640 msdos/tccdos/mk.bat || echo "restore of msdos/tccdos/mk.bat fails"
  1230. echo "x - extracting msdos/tccdos/libswp.rsp (Text)"
  1231. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/libswp.rsp &&
  1232. Xc:\lib.tcc\cc
  1233. SHAR_EOF
  1234. chmod 0640 msdos/tccdos/libswp.rsp || echo "restore of msdos/tccdos/libswp.rsp fails"
  1235. echo "x - extracting msdos/tccdos/lib.rsp (Text)"
  1236. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/lib.rsp &&
  1237. Xc:\lib.tcc\cc
  1238. SHAR_EOF
  1239. chmod 0640 msdos/tccdos/lib.rsp || echo "restore of msdos/tccdos/lib.rsp fails"
  1240. echo "x - extracting msdos/tccdos/config.mk (Text)"
  1241. sed 's/^X//' << 'SHAR_EOF' > msdos/tccdos/config.mk &&
  1242. X# This is the Turbo C 2.0 DOS configuration file for DMAKE
  1243. X#    It simply modifies the values of SRC, and checks to see if
  1244. X#    OSENVIRONMENT is defined.  If so it includes the appropriate
  1245. X#    config.mk file.
  1246. X#
  1247. X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
  1248. SHAR_EOF
  1249. echo "End of part 7"
  1250. echo "File msdos/tccdos/config.mk is continued in part 8"
  1251. echo "8" > s2_seq_.tmp
  1252. exit 0
  1253.  
  1254.