From 808def96aa4589fba9c2d0ea55837754a3b7a4f7 Mon Sep 17 00:00:00 2001 From: lhauch Date: Wed, 31 Dec 2008 16:26:40 +0000 Subject: Retiring the ANT/JAVA build and removing the older EDK II packages that required ANT/JAVA. Last Ant/Java build was r7166 Developers requiring the Java/Ant packages should checkout the branch from: https://edk2.tianocore.org/svn/edk2/branches/AntJava git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7168 6f19259b-4bc3-4df7-8a09-765794883524 --- Tools/CCode/Source/Pccts/support/genmk/genmk_old.c | 762 --------------------- 1 file changed, 762 deletions(-) delete mode 100644 Tools/CCode/Source/Pccts/support/genmk/genmk_old.c (limited to 'Tools/CCode/Source/Pccts/support/genmk/genmk_old.c') diff --git a/Tools/CCode/Source/Pccts/support/genmk/genmk_old.c b/Tools/CCode/Source/Pccts/support/genmk/genmk_old.c deleted file mode 100644 index 2cf9fad727..0000000000 --- a/Tools/CCode/Source/Pccts/support/genmk/genmk_old.c +++ /dev/null @@ -1,762 +0,0 @@ -/* - * genmk -- a program to make makefiles for PCCTS - * - * ANTLR 1.33MR10 - * Terence John Parr 1989 - 1998 - * Purdue University - * U of MN - */ - -#include -#include "pcctscfg.h" /* be sensitive to what ANTLR/DLG call the files */ - -#ifdef VAXC -#define DIE return 0; -#define DONE return 1; -#else -#define DIE return 1; -#define DONE return 0; -#endif - -#ifndef require -#define require(expr, err) {if ( !(expr) ) fatal(err);} -#endif - -#define MAX_FILES 50 -#define MAX_CLASSES 50 - -char *RENAME_OBJ_FLAG="-o", - *RENAME_EXE_FLAG="-o"; - -char *dlg = "parser.dlg"; -char *err = "err.c"; -char *hdr = "stdpccts.h"; -char *tok = "tokens.h"; -char *mode = "mode.h"; -char *scan = "scan"; - -char ATOKENBUFFER_O[100]; -char APARSER_O[100]; -char ASTBASE_O[100]; -char PCCTSAST_O[100]; -char LIST_O[100]; -char DLEXERBASE_O[100]; - -/* Option flags */ -static char *project="t", *files[MAX_FILES], *classes[MAX_CLASSES]; -static int num_files = 0; -static int num_classes = 0; -static int user_lexer = 0; -static char *user_token_types = NULL; -static int gen_CPP = 0; -static char *outdir="."; -static char *dlg_class = "DLGLexer"; -static int gen_trees = 0; -static int gen_hoist = 0; -static char cfiles[1600]=""; -static char *compilerCCC="CC"; -static char *compilerCC="cc"; -static char *pccts_path="/usr/local/pccts"; - -void help(); -void mk(); -void pfiles(); -void pclasses(); -void fatal(); -void warn(); - -typedef struct _Opt { - char *option; - int arg; -#ifdef __cplusplus - void (*process)(...); -#else - void (*process)(); -#endif - char *descr; - } Opt; - -#ifdef __STDC__ -static void ProcessArgs(int, char **, Opt *); -#else -static void ProcessArgs(); -#endif - -static void -pProj( s, t ) -char *s; -char *t; -{ - project = t; -} - -static void -pUL( s ) -char *s; -{ - user_lexer = 1; -} - -static void -pCPP( s ) -char *s; -{ - gen_CPP = 1; -} - -static void -pUT( s, t ) -char *s; -char *t; -{ - user_token_types = t; -} - -static void -pTrees( s ) -char *s; -{ - gen_trees = 1; -} - -static void -pHoist( s ) -char *s; -{ - gen_hoist = 1; -} - -static void -#ifdef __STDC__ -pFile( char *s ) -#else -pFile( s ) -char *s; -#endif -{ - if ( *s=='-' ) - { - fprintf(stderr, "invalid option: '%s'; ignored...",s); - return; - } - - require(num_files0 ) { - warn("can't define classes w/o C++ mode; turning on C++ mode...\n"); - gen_CPP=1; - } - if ( gen_CPP && num_classes==0 ) { - fatal("must define classes >0 grammar classes in C++ mode\n"); - } - - mk(project, files, num_files, argc, argv); - DONE; -} - -void help() -{ - Opt *p = options; - static char buf[1000+1]; - - fprintf(stderr, "genmk [options] f1.g ... fn.g\n"); - while ( p->option!=NULL && *(p->option) != '*' ) - { - buf[0]='\0'; - if ( p->arg ) sprintf(buf, "%s ___", p->option); - else strcpy(buf, p->option); - fprintf(stderr, "\t%-16s %s\n", buf, p->descr); - p++; - } -} - -void mk(project, files, n, argc, argv) -char *project; -char **files; -int n; -int argc; -char **argv; -{ - int i; - - printf("#\n"); - printf("# PCCTS makefile for: "); - pfiles(files, n, NULL); - printf("\n"); - printf("#\n"); - printf("# Created from:"); - for (i=0; i0 ) - { - char *p = &(*files)[strlen(*files)-1]; - if ( !first ) putchar(' '); - first=0; - while ( p > *files && *p != '.' ) --p; - if ( p == *files ) - { - fprintf(stderr, - "genmk: filenames must be file.suffix format: %s\n", - *files); - exit(-1); - } - if ( suffix == NULL ) printf("%s", *files); - else - { - *p = '\0'; - printf("%s", DIR()); - if ( strcmp(suffix, "o")==0 ) printf("%s%s", *files, OBJ_FILE_SUFFIX); - else printf("%s.%s", *files, suffix); - *p = '.'; - } - files++; - --n; - } -} - -void pclasses(classes, n, suffix) -char **classes; -int n; -char *suffix; -{ - int first=1; - - while ( n>0 ) - { - if ( !first ) putchar(' '); - first=0; - if ( suffix == NULL ) printf("%s", *classes); - else { - printf("%s", DIR()); - if ( strcmp(suffix, "o")==0 ) printf("%s%s", *classes, OBJ_FILE_SUFFIX); - else printf("%s.%s", *classes, suffix); - } - classes++; - --n; - } -} - -static void -#ifdef __STDC__ -ProcessArgs( int argc, char **argv, Opt *options ) -#else -ProcessArgs( argc, argv, options ) -int argc; -char **argv; -Opt *options; -#endif -{ - Opt *p; - require(argv!=NULL, "ProcessArgs: command line NULL"); - - while ( argc-- > 0 ) - { - p = options; - while ( p->option != NULL ) - { - if ( strcmp(p->option, "*") == 0 || - strcmp(p->option, *argv) == 0 ) - { - if ( p->arg ) - { - (*p->process)( *argv, *(argv+1) ); - argv++; - argc--; - } - else - (*p->process)( *argv ); - break; - } - p++; - } - argv++; - } -} - -void fatal( err_) -char *err_; -{ - fprintf(stderr, "genmk: %s\n", err_); - exit(1); -} - -void warn( err_) -char *err_; -{ - fprintf(stderr, "genmk: %s\n", err_); -} - -char *DIR() -{ - static char buf[200+1]; - - if ( strcmp(outdir,TopDirectory)==0 ) return ""; - sprintf(buf, "%s%s", outdir, DirectorySymbol); - return buf; -} -- cgit v1.2.3