Added verbose exec feature.
authormichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 17 Jan 2000 06:09:52 +0000 (06:09 +0000)
committermichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 17 Jan 2000 06:09:52 +0000 (06:09 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@12 4a8a32a2-be11-0410-ad9d-d568d2c75423

debugger/mcs51/Makefile [deleted file]
src/SDCCmain.c
src/SDCCy.h [deleted file]
src/config.h [new file with mode: 0644]
support/gc/base_lib [deleted file]

diff --git a/debugger/mcs51/Makefile b/debugger/mcs51/Makefile
deleted file mode 100644 (file)
index eab2e77..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-#
-#
-#
-
-VERSION         = 2.1.9Ga
-VERSIONHI       = 2
-VERSIONLO       = 1
-VERSIONP        = 9Ga
-
-SHELL          = /bin/sh
-CC             = gcc
-CPP            = gcc -E
-INSTALL                = /usr/bin/install -c
-
-PRJDIR         = ../..
-
-srcdir         = .
-prefix         = /usr/local
-exec_prefix     = ${prefix}
-bindir          = ${exec_prefix}/bin
-libdir          = ${exec_prefix}/lib
-datadir         = ${prefix}/share
-includedir      = ${prefix}/include
-mandir          = ${prefix}/man
-man1dir         = $(mandir)/man1
-man2dir         = $(mandir)/man2
-infodir         = ${prefix}/info
-
-STD_INC                = @sdcc_include_dir@
-CPPFLAGS       =  -I. -I$(PRJDIR) -I$(PRJDIR)/support
-CFLAGS         = -ggdb -O2 -pipe
-M_OR_MM                = -MM
-LDFLAGS                = 
-LIBS            = -lgc 
-LIBDIRS         = -L$(PRJDIR)/support/gc
-
-
-OBJECTS                = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
-                 break.o cmd.o $(PRJDIR)/src/SDCChasht.o
-SOURCES                = $(patsubst %.o,%.c,$(OBJECTS))
-
-TARGET         = $(PRJDIR)/bin/sdcdb
-
-
-# Compiling entire program or any subproject
-# ------------------------------------------
-all: checkconf $(TARGET)
-
-$(PRJDIR)/support/gc/libgc.a:
-       cd $(PRJDIR)/support/gc && $(MAKE)
-
-# Compiling and installing everything and runing test
-# ---------------------------------------------------
-install: all installdirs
-       $(INSTALL) -s $(TARGET) $(bindir)/sdcdb
-       cp $(PRJDIR)/sdcdb/sdcdb.el $(bindir)/sdcdb.el
-       cp $(PRJDIR)/sdcdb/sdcdbsrc.el $(bindir)/sdcdbsrc.el
-
-
-# Deleting all the installed files
-# --------------------------------
-uninstall:
-       rm -f $(bindir)/sdcdb
-
-
-# Performing self-test
-# --------------------
-check:
-
-
-# Performing installation test
-# ----------------------------
-installcheck:
-
-
-# Creating installation directories
-# ---------------------------------
-installdirs:
-       $(INSTALL) -d $(bindir)
-
-
-# Creating dependencies
-# ---------------------
-dep: Makefile.dep
-
-Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
-       $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
-
-include Makefile.dep
-include clean.mk
-
-# My rules
-# --------
-$(TARGET): $(OBJECTS)
-       $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBDIRS) $(LIBS)
-
-.c.o:
-       $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
-
-# Remaking configuration
-# ----------------------
-checkconf:
-       @if [ -f $(PRJDIR)/devel ]; then\
-          $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
-        fi
-
-# End of cpp/Makefile
index f971cc401540aa7928c900b745c67d9bd4208e17..8ebfa26c9991001428ae22a83086c1cb5d245648 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "spawn.h"
 #include "SDCCglobl.h"
+#include "config.h"
 
 extern void            initSymt                ();
 extern void            initMem                 ();
@@ -62,6 +63,7 @@ char *libPaths[128] ;
 int nlibPaths = 0;
 char *relFiles[128];
 int nrelFiles = 0;
+bool verboseExec = FALSE;
 //extern int wait (int *);
 char    *preOutName;
 
@@ -749,8 +751,12 @@ int   parseCmdLine ( int argc, char **argv )
                break;
 
            case 'v':
+#if FEATURE_VERBOSE_EXEC
+               verboseExec = TRUE;
+#else
                printVersionInfo();
                exit(0);
+#endif
                break;
 
                /* preprocessor options */              
@@ -837,6 +843,16 @@ int my_system (const char *cmd, char **cmd_argv)
        free(dir);
        i++;
     }
+#if FEATURE_VERBOSE_EXEC
+    if (verboseExec) {
+       char **pCmd = cmd_argv;
+       while (*pCmd) {
+           printf("%s ", *pCmd);
+           pCmd++;
+       }
+       printf("\n");
+    }
+#endif
     if (got)
       i= spawnv(P_WAIT,got,cmd_argv) == -1;
     else
diff --git a/src/SDCCy.h b/src/SDCCy.h
deleted file mode 100644 (file)
index 631737f..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-typedef union {
-    symbol     *sym ;      /* symbol table pointer       */
-    structdef  *sdef;      /* structure definition       */
-    char       yychar[SDCC_NAME_MAX+1];
-    link       *lnk ;      /* declarator  or specifier   */
-    int        yyint;      /* integer value returned     */
-    value      *val ;      /* for integer constant       */
-    initList   *ilist;     /* initial list               */
-    char       yyinline[MAX_INLINEASM]; /* inlined assembler code */
-    ast       *asts;     /* expression tree            */
-} YYSTYPE;
-#define        IDENTIFIER      257
-#define        TYPE_NAME       258
-#define        CONSTANT        259
-#define        STRING_LITERAL  260
-#define        SIZEOF  261
-#define        PTR_OP  262
-#define        INC_OP  263
-#define        DEC_OP  264
-#define        LEFT_OP 265
-#define        RIGHT_OP        266
-#define        LE_OP   267
-#define        GE_OP   268
-#define        EQ_OP   269
-#define        NE_OP   270
-#define        AND_OP  271
-#define        OR_OP   272
-#define        MUL_ASSIGN      273
-#define        DIV_ASSIGN      274
-#define        MOD_ASSIGN      275
-#define        ADD_ASSIGN      276
-#define        SUB_ASSIGN      277
-#define        LEFT_ASSIGN     278
-#define        RIGHT_ASSIGN    279
-#define        AND_ASSIGN      280
-#define        XOR_ASSIGN      281
-#define        OR_ASSIGN       282
-#define        TYPEDEF 283
-#define        EXTERN  284
-#define        STATIC  285
-#define        AUTO    286
-#define        REGISTER        287
-#define        CODE    288
-#define        INTERRUPT       289
-#define        SFR     290
-#define        AT      291
-#define        SBIT    292
-#define        REENTRANT       293
-#define        USING   294
-#define        XDATA   295
-#define        DATA    296
-#define        IDATA   297
-#define        PDATA   298
-#define        VAR_ARGS        299
-#define        CRITICAL        300
-#define        CHAR    301
-#define        SHORT   302
-#define        INT     303
-#define        LONG    304
-#define        SIGNED  305
-#define        UNSIGNED        306
-#define        FLOAT   307
-#define        DOUBLE  308
-#define        CONST   309
-#define        VOLATILE        310
-#define        VOID    311
-#define        BIT     312
-#define        STRUCT  313
-#define        UNION   314
-#define        ENUM    315
-#define        ELIPSIS 316
-#define        RANGE   317
-#define        FAR     318
-#define        _XDATA  319
-#define        _CODE   320
-#define        _GENERIC        321
-#define        _NEAR   322
-#define        _PDATA  323
-#define        _IDATA  324
-#define        CASE    325
-#define        DEFAULT 326
-#define        IF      327
-#define        ELSE    328
-#define        SWITCH  329
-#define        WHILE   330
-#define        DO      331
-#define        FOR     332
-#define        GOTO    333
-#define        CONTINUE        334
-#define        BREAK   335
-#define        RETURN  336
-#define        INLINEASM       337
-#define        IFX     338
-#define        ADDRESS_OF      339
-#define        GET_VALUE_AT_ADDRESS    340
-#define        SPIL    341
-#define        UNSPIL  342
-#define        GETHBIT 343
-#define        BITWISEAND      344
-#define        UNARYMINUS      345
-#define        IPUSH   346
-#define        IPOP    347
-#define        PCALL   348
-#define        ENDFUNCTION     349
-#define        JUMPTABLE       350
-#define        RRC     351
-#define        RLC     352
-#define        CAST    353
-#define        CALL    354
-#define        PARAM   355
-#define        NULLOP  356
-#define        BLOCK   357
-#define        LABEL   358
-#define        RECEIVE 359
-#define        SEND    360
-
-
-extern YYSTYPE yylval;
diff --git a/src/config.h b/src/config.h
new file mode 100644 (file)
index 0000000..eaf2e58
--- /dev/null
@@ -0,0 +1,27 @@
+/** @name Global configuration file
+ */
+#ifndef CONFIG_INCLUDE
+#define CONFIG_INCLUDE
+
+#if 0
+/** Options specific to this port */
+#include "port.h"
+
+/** Set to the name of the C pre-processor.
+    Alternatives: sdcpp
+ */
+#define CPP_NAME "cpp"
+
+/** Set to the option which puts cpp into C++ mode */
+#if __GNUC__ > 1 && __GNUC_MINOR__>=95
+/* PENDING: Strictly -xc++ */
+#define CPP_CPP_LANG_SELECT_OPTION "-xc"
+#else
+#define CPP_CPP_LANG_SELECT_OPTION "-lang-c++"
+#endif
+#endif
+
+/** Set to allow '-v' to be used to print out the command being executed */
+#define FEATURE_VERBOSE_EXEC   1
+
+#endif
diff --git a/support/gc/base_lib b/support/gc/base_lib
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-