From: <jt...@us...> - 2007-04-24 22:50:28
|
Revision: 251 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=251&view=rev Author: jtytgat Date: 2007-04-24 15:50:26 -0700 (Tue, 24 Apr 2007) Log Message: ----------- First step in new Tools building Modified Paths: -------------- branches/simplified-build/!OsLib/Tools/BindHelp/BindHelp.c branches/simplified-build/!OsLib/Tools/oslib/unix/osfile.c Added Paths: ----------- branches/simplified-build/!OsLib/Tools/BindHelp/Makefile branches/simplified-build/!OsLib/Tools/BindHelp/oslibsupport.c branches/simplified-build/!OsLib/Tools/DefMod2/Makefile branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.c branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.h branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c branches/simplified-build/!OsLib/Tools/DefMod2/cheader.h branches/simplified-build/!OsLib/Tools/DefMod2/chelp.c branches/simplified-build/!OsLib/Tools/DefMod2/chelp.h branches/simplified-build/!OsLib/Tools/DefMod2/cstrong.c branches/simplified-build/!OsLib/Tools/DefMod2/cstrong.h branches/simplified-build/!OsLib/Tools/DefMod2/def.c branches/simplified-build/!OsLib/Tools/DefMod2/def.h branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y branches/simplified-build/!OsLib/Tools/DefMod2/hdr.c branches/simplified-build/!OsLib/Tools/DefMod2/hdr.h branches/simplified-build/!OsLib/Tools/DefMod2/main.h branches/simplified-build/!OsLib/Tools/DefMod2/objasm.c branches/simplified-build/!OsLib/Tools/DefMod2/objasm.h branches/simplified-build/!OsLib/Tools/DefMod2/oslibsupport.c branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile branches/simplified-build/!OsLib/Tools/IndexHelp/oslibsupport.c branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/BindHelp/!Release,fd7 branches/simplified-build/!OsLib/Tools/BindHelp/AMUmakefile branches/simplified-build/!OsLib/Tools/BindHelp/GNUmakefile branches/simplified-build/!OsLib/Tools/DefMod2/AMUmakefile branches/simplified-build/!OsLib/Tools/DefMod2/GNUmakefile branches/simplified-build/!OsLib/Tools/IndexHelp/AMUmakefile branches/simplified-build/!OsLib/Tools/IndexHelp/GNUmakefile branches/simplified-build/!OsLib/Tools/ReduceAOF/AMUmakefile branches/simplified-build/!OsLib/Tools/ReduceAOF/GNUmakefile Deleted: branches/simplified-build/!OsLib/Tools/BindHelp/!Release,fd7 =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/!Release,fd7 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/BindHelp/!Release,fd7 2007-04-24 22:50:26 UTC (rev 251) @@ -1,5 +0,0 @@ -Echo <Sys$Time> Releasing <Obey$Dir> ... -WIMPSlot -min 1024K -max 1024K -if "<C$MODE>" = "32" then Do AMU -f <Obey$Dir>.Makefile -desktop -D release APCS=32 OSLIB=32 -if "<C$MODE>"<> "32" then Do AMU -f <Obey$Dir>.Makefile -desktop -D release APCS=26 -Echo <Sys$Time> Done. Deleted: branches/simplified-build/!OsLib/Tools/BindHelp/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/BindHelp/AMUmakefile 2007-04-24 22:50:26 UTC (rev 251) @@ -1,17 +0,0 @@ -# -# Makefile for BindHelp under RISC OS. -# -#------------------------------------------------------------------------ -#target-specific macros - -TARGET = BindHelp -ALL = ${TARGET} -VPATH = -INCLUDES = OSLibSupport: OSLib: C: -DEFINES = -LIBS = OSLibSupport:o.${SUPPORT} OSLib:o.${OSLib} C:o.Stubs - -MODULES = ${TARGET} - -# all the general rules are in ^.AMUmakefile/source -include ${MAKEFILEDIR}.^.AMUmakefile/source Modified: branches/simplified-build/!OsLib/Tools/BindHelp/BindHelp.c =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/BindHelp.c 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/BindHelp/BindHelp.c 2007-04-24 22:50:26 UTC (rev 251) @@ -105,18 +105,18 @@ #define DATA 0x41544144u #define HELP 0x504c4548u -#define ERRNO(x) ( 1<<30 | x ) +#define ERRNO(x) ( (1<<30) | x ) -#define FREE(x) x_FREE( ( x ) ); \ - ( x ) = 0 +#define FREE(x) do { x_FREE( x ); \ + ( x ) = 0; } while (0) #define RO_DIR_SEP "." #define UNIX_DIR_SEP "/" #ifdef EXECUTE_ON_UNIX - #define DIR_SEP UNIX_DIR_SEP +# define DIR_SEP UNIX_DIR_SEP #else - #define DIR_SEP RO_DIR_SEP +# define DIR_SEP RO_DIR_SEP #endif /* data structures */ @@ -827,7 +827,7 @@ "#Wrap Off\n" "#Align Centre\n" "OSLib by {*}Jonathan Coxhead{*}\n" - "Copyright \xA9 Jonathan Coxhead and OSLib Maintainers " + "Copyright � Jonathan Coxhead and OSLib Maintainers " "1995 - %s\n" "StrongHelp Manual created %s by BindHelp\n" "<http://ro-oslib.sourceforge.net=>#url>\n" @@ -1078,7 +1078,7 @@ if( verbose ) { - fprintf( stdout, "BindHelp " VERSION " "__DATE__ " \xA9 Tony van der Hoff\n" ); + fprintf( stdout, "BindHelp " VERSION " "__DATE__ " � Tony van der Hoff\n" ); #if USE_STRONGHELP fprintf( stdout, "Using StrongHelp calls\n" ); #endif Deleted: branches/simplified-build/!OsLib/Tools/BindHelp/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/BindHelp/GNUmakefile 2007-04-24 22:50:26 UTC (rev 251) @@ -1,18 +0,0 @@ -# -# Makefile for BindHelp for UNIX. -# -#------------------------------------------------------------------------ -#target-specific macros - -TARGET = BindHelp -MODULES = ${TARGET} os osgbpb osfile osargs osfind x kernel unix -INCLUDES = -I.. -I../support -DEFINES = -DUNIX -DEXECUTE_ON_UNIX -D__swi -VPATH = ../support ../oslib/unix - -# additional modules required if tracing -TRACEMODULES = trace m - - -# all the general rules are in ../GNUmakefile.source -include ../GNUmakefile.source Added: branches/simplified-build/!OsLib/Tools/BindHelp/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Tools/BindHelp/Makefile 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,40 @@ +# Targets: all install clean +# Using: CC CFLAGS LD LDFLAGS RM INSTALL INSTALL_PROGRAM bindir + +.PHONY: all install clean +OBJS = \ + BindHelp.o \ + oslibsupport.o + +# In case they are not defined, use default values. +CC ?= /usr/bin/gcc +CFLAGS ?= -g -DUNIX -DEXECUTE_ON_UNIX -D__swi +LD ?= /usr/bin/gcc +LDFLAGS ?= +RM ?= rm +INSTALL ?= cp +INSTALL_PROGRAM ?= $(INSTALL) +bindir ?= ../../Bin + +# No user options from here on: +ALL_CFLAGS = -Wall -funsigned-char -I.. -I../support $(CFLAGS) +ALL_LDFLAGS = $(LDFLAGS) + +TARGET = bindhelp + +all: $(TARGET) + +install: $(TARGET) + $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) + +clean: + -$(RM) $(TARGET) *.o + +$(TARGET): $(OBJS) + $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) + +# Rules: +.SUFFIXES: +.SUFFIXES: .o .c + +.c.o: ;$(CC) $(ALL_CFLAGS) -o $@ -c $< Added: branches/simplified-build/!OsLib/Tools/BindHelp/oslibsupport.c =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/oslibsupport.c (rev 0) +++ branches/simplified-build/!OsLib/Tools/BindHelp/oslibsupport.c 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,12 @@ +/* Pull in the sources from Tools/support we need here. */ +#include "kernel.c" +#include "lookup.c" +#include "x.c" +#ifdef EXECUTE_ON_UNIX +# include "oslib/unix/os.c" +# include "oslib/unix/osargs.c" +# include "oslib/unix/osfile.c" +# include "oslib/unix/osfind.c" +# include "oslib/unix/osgbpb.c" +# include "unix.c" +#endif Deleted: branches/simplified-build/!OsLib/Tools/DefMod2/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/DefMod2/AMUmakefile 2007-04-24 22:50:26 UTC (rev 251) @@ -1,15 +0,0 @@ -# -# AMUmakefile for defmod under RISC OS -# -MAKE = amu -desktop - -#------------------------------------------------------------------------ -#targets -.PHONY: all clean distclean tree - -all: ;${MAKE} -f ${MAKEFILEDIR}.defmod.Build_RISCOS.AMUmakefile all APCS=${APCS} -clean: ;${MAKE} -f ${MAKEFILEDIR}.defmod.Build_RISCOS.AMUmakefile clean -distclean: ;${MAKE} -f ${MAKEFILEDIR}.defmod.Build_RISCOS.AMUmakefile distclean -tree: ;${MAKE} -f ${MAKEFILEDIR}.defmod.Build_RISCOS.AMUmakefile tree - - Deleted: branches/simplified-build/!OsLib/Tools/DefMod2/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) +++ branches/simplified-build/!OsLib/Tools/DefMod2/GNUmakefile 2007-04-24 22:50:26 UTC (rev 251) @@ -1,13 +0,0 @@ -# -# Makefile for defmod for UNIX. -# - -#------------------------------------------------------------------------ -#targets -.PHONY: all clean - -all: ;${MAKE} -C defmod/Build_GNU all -clean: ;${MAKE} -C defmod/Build_GNU clean - - - Added: branches/simplified-build/!OsLib/Tools/DefMod2/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/Makefile 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,55 @@ +# Targets: all install clean +# Using: CC CFLAGS LD LDFLAGS YACC YFLAGS RM INSTALL INSTALL_PROGRAM bindir + +# Which assembler DefMod should use (set this using CFLAGS): +# USE_GCC for GCCSDK +# USE_ARMASM for PACE/solaris +# USE_OBJASM for RISC OS native build using Norcroft + +.PHONY: all install clean +OBJS = \ + asmhelp.o \ + cheader.o \ + chelp.o \ + cstrong.o \ + def.o \ + defmod.o \ + hdr.o \ + objasm.o \ + oslibsupport.o + +# In case they are not defined, use default values. +CC ?= /usr/bin/gcc +CFLAGS ?= -g -DUSE_GCC -DUNIX -DEXECUTE_ON_UNIX -D__swi +LD ?= /usr/bin/gcc +LDFLAGS ?= +YACC ?= bison +YFLAGS ?= +RM ?= rm +INSTALL ?= cp +INSTALL_PROGRAM ?= $(INSTALL) +bindir ?= ../../Bin + +# No user options from here on: +ALL_CFLAGS = -Wall -funsigned-char -I.. -I../support $(CFLAGS) +ALL_LDFLAGS = $(LDFLAGS) + +TARGET = defmod + +all: $(TARGET) + +install: $(TARGET) + $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) + +clean: + -$(RM) $(TARGET) *.o defmod.c + +$(TARGET): $(OBJS) + $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) + +# Rules: +.SUFFIXES: +.SUFFIXES: .o .c .y + +.c.o: ;$(CC) $(ALL_CFLAGS) -o $@ -c $< +.y.c: ;$(YACC) -y -o $@ $< Copied: branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.c (from rev 246, branches/simplified-build/!OsLib/Tools/DefMod2/defmod/sources/asmhelp.c) =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.c (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.c 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,128 @@ +/*asmhelp.c - output a help file given a module defn*/ + +/*OSLib---efficient, type-safe, transparent, extensible,\n" + register-safe A P I coverage of RISC O S*/ +/*Copyright \xA9 1994 Jonathan Coxhead*/ + +/* + OSLib is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + OSLib is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this programme; if not, write to the Free Software + Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. +*/ + +#include <ctype.h> +#include <stdio.h> +#include <string.h> +#include <kernel.h> /* TV 980115 */ + +#include "oslib/os.h" + +#include "lookup.h" + +#include "def.h" +#include "asmhelp.h" + +os_error *asmhelp_output +( + FILE *file, + char *title, + char *author, + lookup_t needses, + lookup_t needsatends, + lookup_t consts, + lookup_t types, + lookup_t swis +) +{ + os_error *error = NULL; + int rc = 0; + char *cnst, *type, *swi; + def_c c; + def_t t; + def_s s; + void *context; + + NOT_USED (author) + NOT_USED (needses) + NOT_USED (needsatends) + + /*Emit the CONST declarations.*/ + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (consts, &cnst, (void **) &c, &context)) + != NULL) + goto finish; + + if (context == 0) break; + + if ((rc = fprintf + ( file, + "%%%s\n" + "Defined in: oslib/Hdr.%s\n" + "Symbol for a constant value\n\n", + cnst, title)) < 0) + goto finish; + } + + /*Emit the TYPE declarations.*/ + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (types, &type, (void **) &t, &context)) + != NULL) + goto finish; + + if (context == 0) break; + + if ((rc = fprintf (file, + "%%%s\n" + "Defined in: oslib/Hdr.%s.h\n" + "Symbol for the size of a data structure\n\n", + type, title)) < 0) + goto finish; + } + + /*Emit the SWI declarations.*/ + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (swis, &swi, (void **) &s, &context)) != + NULL) + goto finish; + + if (context == 0) break; + + if (s->starred_swi) + { + if ((rc = fprintf (file, + "%%%s\n" + "Defined in: oslib/Hdr.%s\n" + "Symbol for a SWI number\n\n", + swi, title)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "%%%s\n" + "Defined in: oslib/Hdr.%s\n" + "Symbol for a SWI reason code\n\n", + swi, title)) < 0) + goto finish; + } } + +finish: + if (rc < 0) error = (os_error*)_kernel_last_oserror (); /* TV 980115 */ + return error; +} Copied: branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.h (from rev 246, branches/simplified-build/!OsLib/Tools/DefMod2/defmod/sources/asmhelp.h) =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.h (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/asmhelp.h 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,19 @@ +/*asmhelp.h - output an help file given a module defn*/ +#ifndef asmhelp_H +#define asmhelp_H + +#include <stdio.h> + +#ifndef os_H + #include "oslib/os.h" +#endif + +/* from support */ +#ifndef lookup_H + #include "lookup.h" +#endif + +extern os_error *asmhelp_output (FILE *, char *title, char *author, + lookup_t, lookup_t, lookup_t, lookup_t, lookup_t); + +#endif Copied: branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c (from rev 246, branches/simplified-build/!OsLib/Tools/DefMod2/defmod/sources/cheader.c) =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/cheader.c 2007-04-24 22:50:26 UTC (rev 251) @@ -0,0 +1,1710 @@ +/*cheader.c - output a cheader file given a module defn*/ + +/*OSLib---efficient, type-safe, transparent, extensible,\n" + register-safe A P I coverage of RISC O S*/ +/*Copyright � 1994 Jonathan Coxhead*/ + +/* + OSLib is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + OSLib is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this programme; if not, write to the Free Software + Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. +*/ + +#include <ctype.h> +#include <stdio.h> +#include <string.h> +#include <time.h> +#include <kernel.h> /* TV 980115 */ + +#include "oslib/os.h" +#include "oslib/types.h" +#include "oslib/macros.h" + +#include "lookup.h" + +#include "def.h" +#include "cheader.h" + +static int strsplen +( + char *s +) +{ + char *p = s; + + while (*p != '\0' && *p != ' ') p++; + + return p - s; +} +/*-----------------------------------------------------------------------*/ + +static char *Op +( + def_op op +) +{ + switch (op) + { + case def_OP_DISJOINS: + return "|="; + break; + + case def_OP_CONJOINS: + return "&="; + break; + + case def_OP_ADDS: + return "+="; + break; + + case def_OP_EXCLUSIVELY_DISJOINS: + return "^="; + break; + } + + return SKIP; +} +/*-----------------------------------------------------------------------*/ + +/*Prints a declaration of |v| as an object of type |t|, using |tag| as the + structure tag. If |var|, emit 'N' instead of 'UNKNOWN' and escape + newlines.*/ + +static int Print_Decl +( + FILE *file, + def_t t, + char *tag, + char *v, + osbool var, + int nest +) +{ + int rc = 0; + + switch (t->tag) + { + case def_TYPE_INT: + if ((rc = fprintf (file, v == NULL? "int": "int %s", v)) < 0) + goto finish; + break; + + case def_TYPE_SHORT: + if ((rc = fprintf (file, v == NULL? "short": "short %s", v)) < 0) + goto finish; + break; + + case def_TYPE_BYTE: + if ((rc = fprintf (file, v == NULL? "byte": "byte %s", v)) < 0) + goto finish; + break; + + case def_TYPE_CHAR: + if ((rc = fprintf (file, v == NULL? "char": "char %s", v)) < 0) + goto finish; + break; + + case def_TYPE_BITS: + if ((rc = fprintf (file, v == NULL? "bits": "bits %s", v)) < 0) + goto finish; + break; + + case def_TYPE_BYTES: + if ((rc = fprintf (file, v == NULL? "bytes": "bytes %s", v)) < 0) + goto finish; + break; + + case def_TYPE_BOOL: + if ((rc = fprintf (file, v == NULL? "osbool": "osbool %s", v)) < 0) + goto finish; + break; + + case def_TYPE_REF: + { + char v1 [def_ID_LIMIT + 1]; + + if (v == NULL || v [0] == '/') + { + if (v != NULL) + { + if ((rc = sprintf (v1, "*%s", v)) < 0) + goto finish; + } + else + { + if ((rc = sprintf (v1, "*")) < 0) + goto finish; + } + } + else + { + if ((rc = sprintf (v1, "*%s", v)) < 0) /*was (%s) 2nd Mar + 1994*/ + goto finish; + } + + if ((rc = Print_Decl (file, t->data AS ref, NULL, v1, var, + nest + 1)) < 0) + goto finish; + } + break; + + case def_TYPE_STRING: + if ((rc = fprintf (file, "char %s", v)) < 0) + goto finish; /*v != NULL*/ + break; + + case def_TYPE_ASM: + if ((rc = fprintf (file, "void %s", v)) < 0) + goto finish; /*v != NULL*/ + break; + + case def_TYPE_DATA: + if ((rc = fprintf (file, "byte %s", v)) < 0) + goto finish; /*v != NULL*/ + break; + + case def_TYPE_STRUCT: + case def_TYPE_UNION: + { + int i; + + if + ( ( rc = + tag != NULL? + fprintf + ( + file, + "%s %s%s\n%*s{ ", + t->tag == def_TYPE_STRUCT? "struct": + t->tag == def_TYPE_UNION? "union": "list", + var? " \\": "", + tag, + 3*(nest + 1), "" + ): + fprintf + ( + file, + "%s%s\n%*s{ ", + t->tag == def_TYPE_STRUCT? "struct": + t->tag == def_TYPE_UNION? "union": "list", + var? " \\": "", + 3*(nest + 1), "" + ) + ) + < 0 + ) + goto finish; + + // variable-size data structure ending in ellipsis + if (t->tag == def_TYPE_STRUCT && t->data AS list.base) + { + char base [def_ID_LIMIT + 1]; + def_as_macro (base, t->data AS list.base->data AS id); + if ((rc = fprintf (file, "%s_MEMBERS%s\n%*s ", + base, var? " \\": "", 3*(nest + 1), "")) < 0) + goto finish; + } + for (i = 0; i < t->data AS list.count; i++) + { + if (i == t->data AS list.count - 1 && + t->tag == def_TYPE_STRUCT && + t->data AS list.ellipsis) + { + char v1 [def_ID_LIMIT + 1]; + + if ((rc = sprintf (v1, t->data AS list.members [i]->name [0] + == '*'? "(%s) [%s]": "%s [%s]", + t->data AS list.members [i]->name, + !var? "UNKNOWN": "N")) < 0) + goto finish; + + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, v1, var, nest + 1)) < 0) + goto finish; + } + else + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, t->data AS list.members [i]->name, var, + nest + 1)) < 0) + goto finish; + + if ((rc = fprintf (file, ";%s\n%*s", var? " \\": "", + 3*(nest + 1), "")) < 0) + goto finish; + + if (i != t->data AS list.count - 1) + if ((rc = fprintf (file, " ")) < 0) + goto finish; + } + + if (v != NULL) + { + if ((rc = fprintf (file, "}%s\n%*s%s", var? " \\": "", + 3*(nest + 1), "", v)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "}")) < 0) + goto finish; + } + } + break; + + case def_TYPE_ROW: + { + char v1 [def_ID_LIMIT + 1], v2 [MAX (DEC_WIDTH + 1, 8)]; + + if (t->data AS row.count == 1) + strcpy (v2, "UNKNOWN"); + else + if ((rc = sprintf (v2, "%d", t->data AS row.count)) < 0) + goto finish; + + if (v == NULL || v [0] == '/') + { + if (v != NULL) + { + if ((rc = sprintf (v1, "%s [%s]", v, v2)) < 0) + goto finish; + } + else + { + if ((rc = sprintf (v1, "[%s]", v2)) < 0) + goto finish; + } + } + else + { + if ((rc = sprintf (v1, v [0] == '*'? "(%s) [%s]": "%s [%s]", + v, v2)) < 0) + goto finish; + } + + if ((rc = Print_Decl (file, t->data AS row.base, NULL, v1, var, + nest + 1)) < 0) + goto finish; + } + break; + + case def_TYPE_VOID: + if ((rc = fprintf (file, v == NULL? "void": "void %s", v)) < 0) + goto finish; + break; + + case def_TYPE_ID: + { + char c_name [def_ID_LIMIT + 1]; + + def_as_extern (c_name, t->data AS id); + + if ((rc = fprintf (file, v == NULL? "%s": "%s %s", c_name, v)) < + 0) + goto finish; + } + break; + + default: + break; + } + +finish: + return rc; +} +/*-----------------------------------------------------------------------*/ +os_error *cheader_output +( + FILE *file, + char *title, + char *author, + lookup_t needses, + lookup_t needsatends, + lookup_t consts, + lookup_t types, + lookup_t swis, + osbool c_plus_plus +) +{ + os_error *error = NULL; + char *needs, *needsatend, *cnst, *type, *swi, *comment; + def_c c; + def_t t; + def_s s; + char c_name [def_ID_LIMIT + 1]; + void *context; + int i, rc = 0; + time_t now; + osbool start; + + comment = !c_plus_plus? " *": "//"; + + /*Emit the TITLE and AUTHOR declarations.*/ + def_as_extern (c_name, title); + if (!c_plus_plus) + { + if + ( + ( rc = + fprintf + ( + file, + "#ifndef %s_H\n" + "#define %s_H\n\n" + "/* C header file for %s\n" + " * written by DefMod (%s) on %s" + " * %s\n" + " */\n\n", + c_name, + c_name, + title, + __DATE__, + ctime ((time (&now), &now)), + author + ) + ) + < 0 + ) + goto finish; + } + else // c_plus_plus + { + if + ( + ( + rc = + fprintf + ( + file, + "#ifndef %s_H\n" + "#define %s_H\n\n" + "// C++ header file for %s\n" + "// written by DefMod (%s) on %s" + "// %s\n\n", + c_name, + c_name, + title, + __DATE__, + ctime ((time (&now), &now)), + author + ) + ) + < 0 + ) + goto finish; + } + + /*Emit the G P L.*/ + if ((rc = fprintf (file, + "/*OSLib---efficient, type-safe, transparent, extensible,\n" + " register-safe A P I coverage of RISC O S*/\n" + "/*Copyright � 1994 Jonathan Coxhead*/\n" + "\n" + "/*\n" + " OSLib is free software; you can redistribute it and/or modify\n" + " it under the terms of the GNU General Public License as published by\n" + " the Free Software Foundation; either version 1, or (at your option)\n" + " any later version.\n" + "\n" + " OSLib is distributed in the hope that it will be useful,\n" + " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + " GNU General Public License for more details.\n" + "\n" + " You should have received a copy of the GNU General Public License\n" + " along with this programme; if not, write to the Free Software\n" + " Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A.\n" + "*/\n" + "\n")) < 0) + goto finish; + + /*Make sure we have "types.h".*/ + if ((rc = fprintf (file, + "#ifndef types_H\n" + "#include \"oslib/types.h\"\n" /*no spaces for GCC etc. 30th Jan 1995*/ + /* OsLib path: 4 May 2000 */ + /* oslib subdirectory TV 20000930 */ + "#endif\n\n")) < 0) + goto finish; + +#if 0 /* not everything needs os.h */ + /*Make sure we have "os.h".*/ + if ((rc = fprintf (file, + "#ifndef os_H\n" + "#include \"oslib/os.h\"\n" + "#endif\n\n")) < 0) + goto finish; +#endif + + /*Emit the NEEDS declarations.*/ + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (needses, &needs, NULL, &context)) != + NULL) + goto finish; + + if (context == 0) break; + + def_as_extern (c_name, needs); + if ((rc = fprintf (file, + "#ifndef %s_H\n" + "#include \"oslib/%s.h\"\n" /*no spaces for GCC etc. 30th Jan 1995*/ + /* OsLib path: 4 May 2000 */ + /* oslib subdirectory TV 20000930 */ + "#endif\n\n", + c_name, c_name)) < 0) + goto finish; + } + + /* Emit the C++ namespace declaration */ + /* TV 20000529 */ + if ( + ( rc = fprintf( file, + "#if defined NAMESPACE_OSLIB\n" + " namespace OSLib {\n" + "#endif\n\n" + ) + ) < 0 + ) + goto finish; + + /*Emit the constant declarations derived from the starred-swi parts.*/ + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (swis, &swi, (void **) &s, &context)) + != NULL) + goto finish; + if (context == 0) break; + + if (s->starred_swi) + { + if (start) + { if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/**********************************\n" + " * SWI names and SWI reason codes *\n" + " **********************************/\n")) + < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// **********************************\n" + "// * SWI names and SWI reason codes *\n" + "// **********************************\n")) < + 0) + goto finish; + } + start = FALSE; + } + + if ((rc = fprintf (file, "#undef %s\n#define %-39s 0x%X\n", swi, + swi, s->swi)) < 0 || + (rc = fprintf (file, "#undef X%s\n#define X%-38s 0x%X\n", + swi, swi, s->swi | 1 << 17)) < 0) + goto finish; + } + else + for (i = 0; i < 10; i++) + if (s->starred_constants [i]) + { + if (start) + { + if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/**********************************\n" + " * SWI names and SWI reason codes *\n" + " **********************************/\n")) + < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// **********************************\n" + "// * SWI names and SWI reason codes *\n" + "// **********************************\n")) < + 0) + goto finish; + } + start = FALSE; + } + + if ((rc = fprintf (file, "#undef %s\n#define %-39s 0x%X\n", + swi, swi, s->constants [i])) < 0) + goto finish; + break; + } + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + + /*Emit the TYPE declarations. First, do |struct| forward references, so + that we can refer to these things before they are defined fully.*/ + if (!c_plus_plus) + { + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (types, &type, (void **) &t, + &context)) != NULL) + goto finish; + if (context == 0) break; + + if (t == NULL || t->tag == def_TYPE_STRUCT || + t->tag == def_TYPE_UNION || t->tag == def_TYPE_ABSTRACT) + { + if (start) + { + if ((rc = fprintf (file, + "/************************************\n" + " * Structure and union declarations *\n" + " ************************************/\n")) < 0) + goto finish; + start = FALSE; + } + + def_as_extern (c_name, type); + + if (t == NULL || t->tag == def_TYPE_ABSTRACT) + /* typedef abstract struct */ + { + char c_name_ [def_ID_LIMIT + 1]; + + sprintf (c_name_, "%s_", c_name); + + if ((rc = fprintf (file, "typedef struct %-32s *%s;\n", + c_name_, c_name)) < 0) + goto finish; + + if (t != NULL && t->description != NULL) + if ((rc = fprintf (file, " /*%s*/\n", + t->description)) < 0) + goto finish; + } + else // typdef struct, union, or list + { + if ((rc = fprintf (file, "typedef %s %-32s %s;\n", + t->tag == def_TYPE_STRUCT? "struct": + t->tag == def_TYPE_UNION? "union ": "list", + c_name, c_name)) < 0) + goto finish; + + if ( t -> tag == def_TYPE_STRUCT + && t -> data AS list.ellipsis + ) + { + def_as_extern (c_name, type); + strcat( c_name, "_base" ); + + if ( ( rc = fprintf( file, + "typedef %s %-32s %s;\n", + t->tag == def_TYPE_STRUCT? + "struct": + t->tag == def_TYPE_UNION? + "union ": + "list", + c_name, + c_name + ) + ) < 0 + ) + goto finish; + } + } + } + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + else /* c_plus_plus */ + { + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (types, &type, (void **) &t, + &context)) != NULL) + goto finish; + if (context == 0) break; + + if (t == NULL || t->tag == def_TYPE_STRUCT || + t->tag == def_TYPE_UNION || t->tag == def_TYPE_ABSTRACT) + { + if (start) + { + if ((rc = fprintf (file, + "// ************************************\n" + "// * Structure and union declarations *\n" + "// ************************************\n")) < 0) + goto finish; + start = FALSE; + } + + def_as_extern (c_name, type); + + if (t == NULL || t->tag == def_TYPE_ABSTRACT) + { + if ((rc = fprintf (file, "typedef struct %s_ *%s;\n", + c_name, c_name)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "%s %s;\n", + t->tag == def_TYPE_STRUCT? "struct": + t->tag == def_TYPE_UNION? "union ": "list", + c_name)) < 0) + goto finish; + } + + if (t != NULL && t->tag == def_TYPE_ABSTRACT && + t->description != NULL) + if ((rc = fprintf (file, " /*%s*/\n", + t->description)) < 0) + goto finish; + } + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } /* end c_plus_plus */ + + /* Emit non-abstract Type definitions */ + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (types, &type, (void **) &t, &context)) + != NULL) + goto finish; + if (context == 0) break; + + if (!(t == NULL || t->tag == def_TYPE_ABSTRACT)) + /* valid type definition */ + { + if (start) /* header */ + { + if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/********************\n" + " * Type definitions *\n" + " ********************/\n")) < 0) + goto finish; + } + else /* c_plus_plus */ + { + if ((rc = fprintf (file, + "// ********************\n" + "// * Type definitions *\n" + "// ********************\n")) < 0) + goto finish; + } /* end c_plus_plus */ + start = FALSE; + } /* end header */ + + if (t->tag == def_TYPE_STRUCT || t->tag == def_TYPE_UNION) + /* structure or union definition */ + { + def_as_extern (c_name, type); + + if (t->description != NULL) + { + /*Start the description part.*/ + osbool first; + + if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/* -----------------------------------" + "-------------------------------------\n")) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// -----------------------------------" + "-------------------------------------\n")) < 0) + goto finish; + } + + if ((rc = fprintf (file, + "%s Type: %s\n" + "%s\n" + "%s Description: %s\n", + comment, c_name, + comment, + comment, t->description)) < 0) + goto finish; + + first = TRUE; + for (i = 0; i < t->data AS list.count; i++) + if (t->data AS list.members [i]->description != NULL) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if ((rc = fprintf (file, "%s %-14s %s - %s\n", + comment, first? "Fields:": "", + t->data AS list.members [i]->name, + t->data AS list.members [i]->description)) + < 0) + goto finish; + + first = FALSE; + } + + /*Finish it off.*/ + if (!c_plus_plus) + { + if ((rc = fprintf (file, " */\n\n")) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + } /* End Description */ + + if (t->tag == def_TYPE_STRUCT && t->data AS list.ellipsis && + t->data AS list.count > 1) + /* variable-size structure definition containing ellipsis */ + { + char macro_name [def_ID_LIMIT + 1]; + int i; + + // create the macro name + def_as_macro (macro_name, type); + + /* start the macro definition line */ + if ((rc = fprintf (file, "#define %s_MEMBERS", + macro_name)) < 0) + goto finish; + + if (t->data AS list.base) + { + /* the macro is based upon another macro */ + char base [def_ID_LIMIT + 1]; + def_as_macro (base, t->data AS list.base->data AS id); + if ((rc = fprintf (file, " \\\n %s_MEMBERS", base)) < 0) + goto finish; + } + + /* write each structure member to the macro */ + for (i = 0; i < t->data AS list.count - 1; i++) + { + if ((rc = fprintf (file, " \\\n ")) < 0) + goto finish; + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, t->data AS list.members [i]->name, TRUE, 0)) < 0) + goto finish; + if ((rc = fprintf (file, ";")) < 0) + goto finish; + } + + /* emit a definition of the base structure (TV 20001021) */ + if ( (rc = fprintf( file, + "\n\n/* Base %s structure without variable part */" + "\nstruct %s_base\n { %s_MEMBERS\n };", + c_name, c_name, macro_name + ) + ) < 0 + ) + goto finish; + + /* emit a structure definition consisting of the macro + ** followed by an UNKNOWN array of the repeated member */ + if ((rc = fprintf (file, + "\n\n/* legacy structure */" + "\nstruct %s\n { %s_MEMBERS\n ", + c_name, macro_name)) < 0) + goto finish; + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, t->data AS list.members [i]->name, TRUE, 0)) < 0) + goto finish; + if ((rc = fprintf (file, " [UNKNOWN];\n }")) < 0) + goto finish; + + } /* end variable-size structure definition */ + else + if ((rc = Print_Decl (file, t, c_name, NULL, FALSE, 0)) < 0) + goto finish; + if ((rc = fprintf (file, ";\n\n")) < 0) + goto finish; + + /*Emit a macro to define a type of arbitrarily many of the + repeating field, iff the repeating field is of fixed width + (i e, def_VALUE_REGISTER or def_VALUE_FIXED).*/ + if (t->tag == def_TYPE_STRUCT && t->data AS list.ellipsis && + t->data AS list.members + [t->data AS list.count - 1]->value != def_VALUE_VARIABLE) + { + char macro_name [def_ID_LIMIT + 1]; + int i = t->data AS list.count - 1; + char *suffix; + + def_as_macro (macro_name, type); + + if ((rc = fprintf (file, "#define %s(N) \\\n ", + macro_name)) < 0) + goto finish; + + if ((rc = fprintf (file, "struct \\\n { ")) < 0) + goto finish; + if (t->data AS list.count > 1) + if ((rc = fprintf (file, "%s_MEMBERS \\\n ", + macro_name)) < 0) + goto finish; + if ((rc = Print_Decl (file, t->data AS list.members [i], + NULL, t->data AS list.members [i]->name, TRUE, 0)) < 0) + goto finish; + if ((rc = fprintf (file, " [N]; \\\n }")) < 0) + goto finish; + + if ((rc = fprintf (file, "\n\n")) < 0) + goto finish; + + /*Also emit a macro to calculate the size of such a type.*/ + if ((suffix = strchr (macro_name, '_')) != NULL) + { + if ((rc = fprintf (file, + "#define %.*s_SIZEOF%s(N) \\\n (", + (int)(suffix - macro_name), macro_name, suffix)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "#define %s_SIZEOF(N) (", + macro_name)) < 0) + goto finish; + } + + /*This calculates an offset (using |offsetof|).*/ + if ((i = t->data AS list.count) > 1) + { + if ((rc = fprintf (file, + "offsetof (%s, %s) + \\\n" + " (N)*sizeof ((%s *) NULL)->%s", + c_name, t->data AS list.members [i - 1]->name, + c_name, t->data AS list.members [i - 1]->name)) < + 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "(N)*sizeof ((%s *) NULL)->%s", + c_name, t->data AS list.members [0]->name)) < 0) + goto finish; + } + + if ((rc = fprintf (file, ")\n\n")) < 0) + goto finish; + } + } + else + { + def_as_extern (c_name, type); + + if ((rc = fprintf (file, "typedef ")) < 0) + goto finish; + + if ((rc = Print_Decl (file, t, NULL, c_name, FALSE, 0)) < 0) + goto finish; + + if ((rc = fprintf (file, ";\n")) < 0) + goto finish; + + if (t->description != NULL) + if ((rc = fprintf (file, " /*%s*/\n", + t->description)) < 0) + goto finish; + + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + } /* end valid type definition */ + } + + /*Emit the CONST declarations.*/ + if (!c_plus_plus) + { + start = TRUE; + context = 0; + while (TRUE) + { + if ((error = lookup_enumerate (consts, &cnst, (void **) &c, + &context)) != NULL) + goto finish; + if (context == 0) break; + + if (start) + { + if ((rc = fprintf (file, + "/************************\n" + " * Constant definitions *\n" + " ************************/\n")) < 0) + goto finish; + start = FALSE; + } + + def_as_macro (c_name, cnst); + if ((rc = fprintf (file, "#define %-39s ", c_name)) < 0) + goto finish; + + switch (c->type->tag) + { + case def_TYPE_INT: + if ((rc = fprintf (file, "%s%d%s", c->value < 0? "(": "", + c->value, c->value < 0? ")": "")) < 0) + goto finish; + break; + + case def_TYPE_SHORT: + if ((rc = fprintf (file, "((short) %d)", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BYTE: + if ((rc = fprintf (file, "((byte) %d)", c->value)) < 0) + goto finish; + break; + + case def_TYPE_CHAR: + if (isprint (c->value)) + { + if ((rc = fprintf (file, "((char) '%c')", c->value)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "((char) '\\x%.2X')", c->value)) + < 0) + goto finish; + } + break; + + case def_TYPE_BITS: + if ((rc = fprintf (file, "0x%Xu", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BYTES: + if ((rc = fprintf (file, "((bytes) 0x%Xu)", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BOOL: + if ((rc = fprintf (file, "%s", WHETHER (c->value))) < 0) + goto finish; + break; + + default: + if ((rc = fprintf (file, "((")) < 0) + goto finish; + + if ((rc = Print_Decl (file, c->type, NULL, NULL, FALSE, + 0)) < 0) + goto finish; + + if ((rc = fprintf (file, ") 0x%Xu)", c->value)) < 0) + /*was %d in either case 19th Apr 1995*/ + goto finish; + break; + } + + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + + if (c->description != NULL) + if ((rc = fprintf (file, " /*%s*/\n", + c->description)) < 0) + goto finish; + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + else + { + start = TRUE; + context = 0; + while (TRUE) + { + char v [def_ID_LIMIT + 1]; + + if ((error = lookup_enumerate (consts, &cnst, (void **) &c, + &context)) != NULL) + goto finish; + if (context == 0) break; + + if (start) + { + if ((rc = fprintf (file, + "// ************************\n" + "// * Constant definitions *\n" + "// ************************\n")) < 0) + goto finish; + start = FALSE; + } + + def_as_macro (c_name, cnst); + if ((rc = sprintf (v, "const %s", c_name)) < 0) + goto finish; + + if ((rc = Print_Decl (file, c->type, NULL, v, FALSE, 0)) < 0) + goto finish; + + if ((rc = fprintf (file, " = ")) < 0) + goto finish; + + switch (c->type->tag) + { + case def_TYPE_INT: + if ((rc = fprintf (file, "%d", c->value)) < 0) + goto finish; + break; + + case def_TYPE_SHORT: + if ((rc = fprintf (file, "%d", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BYTE: + if ((rc = fprintf (file, "%d", c->value)) < 0) + goto finish; + break; + + case def_TYPE_CHAR: + if (isprint (c->value)) + { + if ((rc = fprintf (file, "'%c'", c->value)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, "'\\x%.2X'", c->value)) < 0) + goto finish; + } + break; + + case def_TYPE_BITS: + if ((rc = fprintf (file, "0x%Xu", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BYTES: + if ((rc = fprintf (file, "0x%Xu", c->value)) < 0) + goto finish; + break; + + case def_TYPE_BOOL: + if ((rc = fprintf (file, "%s", WHETHER (c->value))) < 0) + goto finish; + break; + + default: + if ((rc = fprintf (file, "(")) < 0) + goto finish; + + if ((rc = Print_Decl (file, c->type, NULL, NULL, FALSE, + 0)) < 0) + goto finish; + + if ((rc = fprintf (file, ") %d", c->value)) < 0) + goto finish; + break; + } + + if ((rc = fprintf (file, ";\n")) < 0) + goto finish; + + if (c->description != NULL) + if ((rc = fprintf (file, " //%s\n", + c->description)) < 0) + goto finish; + } + + if (!start) + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + + /*Emit the SWI declarations.*/ + start = TRUE; + context = 0; + while (TRUE) + { + osbool nonx, first; + + if ((error = lookup_enumerate (swis, &swi, (void **) &s, &context)) + != NULL) + goto finish; + if (context == 0) break; + + if (!s->absent) + { + int result = s->value != NONE? def_bit_index (s->value, 0): -1; + /*number of register returned as result*/ + + if (start) + { + if (!c_plus_plus) + { if ((rc = fprintf (file, + "/*************************\n" + " * Function declarations *\n" + " *************************/\n\n")) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// *************************\n" + "// * Function declarations *\n" + "// *************************\n" + "\n")) < 0) + goto finish; + } + + /*Allow this C header file to be used from C++.*/ + if (!c_plus_plus) + if ((rc = fprintf (file, + "#ifdef __cplusplus\n extern \"C\" {\n#endif\n\n")) + < 0) + goto finish; + + start = FALSE; + } + + def_as_extern (c_name, swi); + + /*Start the description part.*/ + if (!c_plus_plus) + { + if ((rc = fprintf (file, + "/* -----------------------------------" + "-------------------------------------\n" + " * Function: %s()\n" + " *\n", c_name)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "// -----------------------------------" + "-------------------------------------\n" + "// Function: %s()\n" + "//\n", c_name)) < 0) + goto finish; + } + + if (s->description != NULL && strlen (s->description) != 0) + { + int L, col; + char *p = s->description; + + L = strsplen (p); + + if ((rc = fprintf (file, "%s %-14s", comment, + "Description:")) < 0) + goto finish; + col = 17; + + do + { + if ((rc = fprintf (file, " %.*s", L, p)) < 0) + goto finish; + col += L + 1, p += L; /*p -> null or space*/ + + if (*p == ' ') + { + p++; /*p -> next word to print, and there is one*/ + L = strsplen (p); + if (col + 1 + L > 75) + { + if ((rc = fprintf (file, "\n%s ", + comment)) < 0) + goto finish; + col = 17; + } + } + } + while (*p != '\0'); + + if ((rc = fprintf (file, "\n")) < 0) + goto finish; + } + else if (s->starred_swi) + { + if ((rc = fprintf (file, "%s %-14s Calls SWI 0x%X\n", + comment, "Description:", s->swi)) < 0) + goto finish; + } + else + for (i = 0; i < 10; i++) + if (s->starred_constants [i]) + { + if ((rc = fprintf (file, + "%s %-14s Calls reason code %d of SWI 0x%X\n", + comment, "Description:", s->constants [i], + s->swi)) < 0) + goto finish; + break; + } + + if (!def_using_block (s)) + { + first = TRUE; + for (i = 0; i < 10; i++) + if ((s->i & 1 << i) != NONE) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if (s->inputs [i]->description != NULL) + { + if ((rc = fprintf (file, "%s %-14s %s - %s\n", + comment, first? "Input:": "", + s->inputs [i]->name, + s->inputs [i]->description)) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "%s %-14s %s - value of R%d on entry\n", + comment, first? "Input:": "", + s->inputs [i]->name, i)) < 0) + goto finish; + } + + first = FALSE; + } + + first = TRUE; + for (i = 0; i < 10; i++) + if ((s->o & 1 << i) != NONE) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if (s->outputs [i]->description != NULL) + { + if ((rc = fprintf (file, "%s %-14s %s - %s%s\n", + comment, first? "Output:": "", + s->outputs [i]->name, + s->outputs [i]->description, + i == result? " (X version only)": "")) < 0) + goto finish; + } + else + { + if ((rc = fprintf (file, + "%s %-14s %s - value of R%d on exit%s\n", + comment, first? "Output:": "", + s->outputs [i]->name, i, + i == result? " (X version only)": "")) < 0) + goto finish; + } + + first = FALSE; + } + + if (s->f_out) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if ((rc = fprintf (file, + "%s %-14s %s - processor status register on exit%s\n", + comment, first? "Output:": "", "psr", + def_FLAGS == result? " (X version only)": "")) < 0) + goto finish; + } + } + else + { + /*First locate the register pointing to the block.*/ + first = TRUE; + for (i = 0; i < 10; i++) + if ((s->i & 1 << i) != NONE) + { + int cpt; + + for (cpt = 0; cpt < s->inputs [i]->data AS list.count; + cpt++) + { + if (first) + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if ((rc = fprintf (file, + "%s %-14s %s - component %d\n", comment, + first? "Input:": "", s->inputs [i]->data AS + list.members [cpt]->name, cpt)) < 0) + goto finish; + + first = FALSE; + } + + break; + } + } + + if (s->value != NONE) + { + char name [10]; + + if ((rc = fprintf (file, "%s\n", comment)) < 0) + goto finish; + + if ((rc = sprintf (name, result != def_FLAGS? "R%d": "psr", + result)) < 0) + ... [truncated message content] |
From: <jt...@us...> - 2007-04-29 22:03:35
|
Revision: 256 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=256&view=rev Author: jtytgat Date: 2007-04-29 15:03:34 -0700 (Sun, 29 Apr 2007) Log Message: ----------- Tools Makefile cleanup including working 'clean' target. Modified Paths: -------------- branches/simplified-build/!OsLib/Tools/BindHelp/Makefile branches/simplified-build/!OsLib/Tools/DefMod2/Makefile branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile Added Paths: ----------- branches/simplified-build/!OsLib/Tools/Makefile Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/AMUmakefile branches/simplified-build/!OsLib/Tools/AMUmakefile.source branches/simplified-build/!OsLib/Tools/GNUmakefile branches/simplified-build/!OsLib/Tools/GNUmakefile.source branches/simplified-build/!OsLib/Tools/Make,fd7 branches/simplified-build/!OsLib/Tools/Makefile,fe1 Deleted: branches/simplified-build/!OsLib/Tools/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/AMUmakefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/AMUmakefile 2007-04-29 22:03:34 UTC (rev 256) @@ -1,53 +0,0 @@ -# Index: OSLib/!OsLib/Tools/AMUmakefile 20040225 -#=================================================================== -# -DIR = ${MAKEFILEDIR} -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -RM = rm -nq -MAKE = amu -desktop - -# build all tools -all: stage2 stage1 - @echo - - -# build tools which don't depend on OSLib -stage1: -ifndef APCS - $(error APCS mode is undefined) -endif - ${MAKE} -f ${DIR}.bison.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.DefMod2.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.ReduceAOF.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.Rm.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.ToLower.AMUmakefile all APCS=${APCS} - -# build tools which depend on OSLib -stage2: -ifndef APCS - $(error APCS mode is undefined) -endif - ${MAKE} -f ${DIR}.BindHelp.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.IndexHelp.AMUmakefile all APCS=${APCS} - ${MAKE} -f ${DIR}.StripDepends.AMUmakefile all APCS=${APCS} - -clean: - ${MAKE} -f ${DIR}.BindHelp.AMUmakefile clean - ${MAKE} -f ${DIR}.DefMod2.AMUmakefile clean - ${MAKE} -f ${DIR}.IndexHelp.AMUmakefile clean - ${MAKE} -f ${DIR}.ReduceAOF.AMUmakefile clean - ${MAKE} -f ${DIR}.Rm.AMUmakefile clean - ${MAKE} -f ${DIR}.StripDepends.AMUmakefile clean - ${MAKE} -f ${DIR}.bison.AMUmakefile clean - ${MAKE} -f ${DIR}.ToLower.AMUmakefile clean - -distclean: - ${MAKE} -f ${DIR}.BindHelp.AMUmakefile distclean - ${MAKE} -f ${DIR}.DefMod2.AMUmakefile distclean - ${MAKE} -f ${DIR}.IndexHelp.AMUmakefile distclean - ${MAKE} -f ${DIR}.ReduceAOF.AMUmakefile distclean - ${MAKE} -f ${DIR}.Rm.AMUmakefile distclean - ${MAKE} -f ${DIR}.StripDepends.AMUmakefile distclean - ${MAKE} -f ${DIR}.bison.AMUmakefile distclean - ${MAKE} -f ${DIR}.ToLower.AMUmakefile distclean Deleted: branches/simplified-build/!OsLib/Tools/AMUmakefile.source =================================================================== --- branches/simplified-build/!OsLib/Tools/AMUmakefile.source 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/AMUmakefile.source 2007-04-29 22:03:34 UTC (rev 256) @@ -1,113 +0,0 @@ -# -# Include Makefile for Tools under RISC OS. -# -# caller must define TARGET, MODULES, INCLUDES -# caller may define DEFINES, VPATH - -#TARGET = -#MODULES = -#INCLUDES = -#DEFINES = -#VPATH = -#LIBS = -#CLIST ?= -list - -DEBUG ?= 0 -TRACE ?= 0 - -ALL ?= ${TARGET} -BINDIR ?= <OSLib$BinDir> -#------------------------------------------------------------------------ -#tools - -MAKE = amu -desktop -D -CC = \ -cc -c ${THROWBACK} \ -$(addprefix -f, ${CFLAGS}) \ -$(addprefix -W, ${CWARN} ) \ -$(addprefix -I, ${INCLUDES}) \ -$(addprefix -D, ${DEFINES} ) \ -${DEPEND} \ -${CLIST} \ --apcs 3/${APCS} - -CFLAGS = af -CWARN = cp -#DEPEND = -depend !Depend -THROWBACK = -throwback - -ifeq (${APCS},32) -OSLIB =OSLib32 -SUPPORT = OSLibSupport32 -else -OSLIB =OSLib -SUPPORT = OSLibSupport -endif - -ifneq (${DEBUG},0) -DEFINES += DEBUG=${DEBUG} -endif - -ifneq (${TRACE},0) -DEFINES += TRACE=${TRACE} -endif - -ASM = \ -OBJASM $(addprefix -I, ${ASMINCLUDES}) \ -${ASMOPTIONS} ${DEPEND} -stamp -quit -throwback - -LD = link -LDFLAGS = - -CP = copy -copyflags = A~C~DFLN~P~QR~S~T~V - -MD = cdir -RM = rm -nq -STRIP = StripDepends - -#------------------------------------------------------------------------ -#macros -OBJS = $(addprefix o.,${MODULES}) -TRACEOBJS = $(addprefix o.,${TRACEMODULES}) - -ifneq (${TRACE},0) -OBJS += ${TRACEOBJS} -endif - -#------------------------------------------------------------------------ -#rules - -.PHONY: all clean distclean strip - -#all: ${ALL} -# ${MAKE} -f ${MAKEFILEDIR}.AMUmakefile ${BINDIR}.${TARGET} - -all: ${BINDIR}.${TARGET} ${ALL} - -${TARGET}: ${OBJS} - ${LD} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} - SetType $@ Absolute - Access $@ WR/R - -${BINDIR}.${TARGET}: ${TARGET} - ${MD} ${BINDIR} - ${CP} ${TARGET} $@ ${COPYFLAGS} - -clean: ;-${RM} ${OBJS} ${TRACEOBJS} ${TARGET} ${EXTRAOBJS} - -distclean: clean strip - ${RM} o l - -strip: ;${STRIP} AMUmakefile - -#------------------------------------------------------------------------ -.SUFFIXES: .o .c .s .y - -.c.o: ;${MD} o - ${CC} -o $@ -c $< - -.s.o: ;${MD} o - ${ASM} -apcs 3/${APCS}bit $< $@ - -#------------------------------------------------------------------------ Modified: branches/simplified-build/!OsLib/Tools/BindHelp/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/BindHelp/Makefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/BindHelp/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -28,7 +28,7 @@ $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) clean: - -$(RM) $(TARGET) *.o + -$(RM) $(TARGET) *.o $(bindir)/$(TARGET) $(TARGET): $(OBJS) $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) Modified: branches/simplified-build/!OsLib/Tools/DefMod2/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/Makefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/DefMod2/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -37,7 +37,7 @@ $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) clean: - -$(RM) $(TARGET) *.o defmod.c + -$(RM) $(TARGET) *.o defmod.c $(bindir)/$(TARGET) $(TARGET): $(OBJS) $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) Deleted: branches/simplified-build/!OsLib/Tools/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Tools/GNUmakefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/GNUmakefile 2007-04-29 22:03:34 UTC (rev 256) @@ -1,27 +0,0 @@ -# -# Makefile for OSLib Tools for UNIX. -# - -#------------------------------------------------------------------------ -#targets -ALL = BindHelp DefMod2 IndexHelp ReduceAOF - -.PHONY: ${ALL} clean - -all: ${ALL} - -BindHelp: - ${MAKE} -C BindHelp - -DefMod2: - ${MAKE} -C DefMod2 - -IndexHelp: - ${MAKE} -C IndexHelp - -ReduceAOF: - ${MAKE} -C ReduceAOF - -clean: ;$(foreach TARGET, ${ALL}, ${MAKE} -C ${TARGET} clean; ) - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Tools/GNUmakefile.source =================================================================== --- branches/simplified-build/!OsLib/Tools/GNUmakefile.source 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/GNUmakefile.source 2007-04-29 22:03:34 UTC (rev 256) @@ -1,56 +0,0 @@ -# -# Include Makefile for Tools under UNIX. -# -# caller must define TARGET, MODULES, INCLUDES -# caller may define DEFINES, VPATH - -#TARGET = reduceaof -#OBJS = ${TARGET}.o -#INCLUDES = -#VPATH = - -BINDIR ?= ../../Bin -TRACE ?= 0 -DEBUG ?= 0 - -#------------------------------------------------------------------------ -#tools - -CC = /usr/bin/gcc -LD = /usr/bin/gcc -CP = cp -f -RM = rm -f - -#------------------------------------------------------------------------ -#macros -DEFINES ?= -DUNIX -DEXECUTE_ON_UNIX -D__swi -CFLAGS = -Wall -funsigned-char -OBJS = $(patsubst %,%.o,${MODULES}) -TRACEOBJS = $(patsubst %,%.o,${TRACEMODULES}) - -ifneq (${TRACE},0) - OBJS += ${TRACEOBJS} -endif - -#------------------------------------------------------------------------ -#rules - -.PHONY: all clean install - -all: ${TARGET} - -${TARGET}: ${OBJS} - ${LD} ${LDFLAGS} -o $@ ${OBJS} - if [ ! -d ${BINDIR} ]; then mkdir ${BINDIR}; fi - ${CP} $@ ${BINDIR}/ - -clean: ;-${RM} ${OBJS} ${TRACEOBJS} ${TARGET} - - -#------------------------------------------------------------------------ -.SUFFIXES: .o .c - -.c.o: ;${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -DTRACE=${TRACE} \ - -DDEBUG=${DEBUG} -o $@ -c $< - -#------------------------------------------------------------------------ Modified: branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/IndexHelp/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -27,7 +27,7 @@ $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) clean: - -$(RM) $(TARGET) *.o + -$(RM) $(TARGET) *.o $(bindir)/$(TARGET) $(TARGET): $(OBJS) $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) Deleted: branches/simplified-build/!OsLib/Tools/Make,fd7 =================================================================== --- branches/simplified-build/!OsLib/Tools/Make,fd7 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/Make,fd7 2007-04-29 22:03:34 UTC (rev 256) @@ -1,5 +0,0 @@ -| Tools.Make 20040306 -set Make$Dir <Obey$Dir> -if "<C$MODE>" = "32" then Do AMU -f <Make$Dir>.AMUmakefile -desktop %0 APCS=32 -if "<C$MODE>" <>"32" then Do AMU -f <Make$Dir>.AMUmakefile -desktop %0 APCS=26 -Echo <Sys$Time> Done... \ No newline at end of file Copied: branches/simplified-build/!OsLib/Tools/Makefile (from rev 246, branches/simplified-build/!OsLib/Tools/GNUmakefile) =================================================================== --- branches/simplified-build/!OsLib/Tools/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Tools/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -0,0 +1,25 @@ +# ... + +ALL = BindHelp DefMod2 IndexHelp ReduceAOF + +.PHONY: ${ALL} install clean + +all: ${ALL} + +BindHelp: + ${MAKE} -C BindHelp + +DefMod2: + ${MAKE} -C DefMod2 + +IndexHelp: + ${MAKE} -C IndexHelp + +ReduceAOF: + ${MAKE} -C ReduceAOF + +install: + $(foreach TARGET, ${ALL}, ${MAKE} -C ${TARGET} install; ) + +clean: + $(foreach TARGET, ${ALL}, ${MAKE} -C ${TARGET} clean; ) Deleted: branches/simplified-build/!OsLib/Tools/Makefile,fe1 =================================================================== --- branches/simplified-build/!OsLib/Tools/Makefile,fe1 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/Makefile,fe1 2007-04-29 22:03:34 UTC (rev 256) @@ -1,69 +0,0 @@ -# Index: OSLib/!OsLib/Tools/Makefile,fe1 20031230 -#=================================================================== -# -DIR = <OSLib$ToolsDir> -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -RM = OSLibBin:rm -MAKE = amu -desktop - -# build all tools -all: stage2 stage1 - @echo - -# build tools which don't depend on OSLib -stage1: - ${MAKE} -f ${DIR}.bison.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.ReduceAOF.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.Rm.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.ToLower.Makefile all APCS=${APCS} OSLIB=${OSLIB} - -# build tools which depend on OSLib -stage2: - ${MAKE} -f ${DIR}.BindHelp.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.IndexHelp.Makefile all APCS=${APCS} OSLIB=${OSLIB} - ${MAKE} -f ${DIR}.StripDepends.Makefile all APCS=${APCS} OSLIB=${OSLIB} - -# build the directory tree -tree: - ${MAKE} -f ${DIR}.BindHelp.Makefile tree - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile tree - ${MAKE} -f ${DIR}.IndexHelp.Makefile tree - ${MAKE} -f ${DIR}.ReduceAOF.Makefile tree - ${MAKE} -f ${DIR}.Rm.Makefile tree - ${MAKE} -f ${DIR}.StripDepends.Makefile tree - ${MAKE} -f ${DIR}.bison.Makefile tree - ${MAKE} -f ${DIR}.ToLower.Makefile tree - @ifthere ${DIR}.tree then stamp ${DIR}.tree else create ${DIR}.tree - -clean: - ${MAKE} -f ${DIR}.BindHelp.Makefile clean - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile clean - ${MAKE} -f ${DIR}.IndexHelp.Makefile clean - ${MAKE} -f ${DIR}.ReduceAOF.Makefile clean - ${MAKE} -f ${DIR}.Rm.Makefile clean - ${MAKE} -f ${DIR}.StripDepends.Makefile clean - ${MAKE} -f ${DIR}.bison.Makefile clean - ${MAKE} -f ${DIR}.ToLower.Makefile clean - -stripdepends: - ${MAKE} -f ${DIR}.BindHelp.Makefile stripdepends - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile stripdepends - ${MAKE} -f ${DIR}.IndexHelp.Makefile stripdepends - ${MAKE} -f ${DIR}.ReduceAOF.Makefile stripdepends - ${MAKE} -f ${DIR}.Rm.Makefile stripdepends - ${MAKE} -f ${DIR}.StripDepends.Makefile stripdepends - ${MAKE} -f ${DIR}.bison.Makefile stripdepends - ${MAKE} -f ${DIR}.ToLower.Makefile stripdepends - -archive_source: - cdir ${ARCHIVE} - copy * ${ARCHIVE}.* ${COPYFLAGS} - ${MAKE} -f ${DIR}.BindHelp.Makefile archive_source ARCHIVE=${ARCHIVE}.BindHelp - ${MAKE} -f ${DIR}.DefMod2.defmod.Build_RISCOS.Makefile archive_source ARCHIVE=${ARCHIVE}.DefMod2 - ${MAKE} -f ${DIR}.IndexHelp.Makefile archive_source ARCHIVE=${ARCHIVE}.IndexHelp - ${MAKE} -f ${DIR}.ReduceAOF.Makefile archive_source ARCHIVE=${ARCHIVE}.ReduceAOF - ${MAKE} -f ${DIR}.Rm.Makefile archive_source ARCHIVE=${ARCHIVE}.Rm - ${MAKE} -f ${DIR}.StripDepends.Makefile archive_source ARCHIVE=${ARCHIVE}.StripDepends - ${MAKE} -f ${DIR}.bison.Makefile archive_source ARCHIVE=${ARCHIVE}.bison Modified: branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile 2007-04-29 21:55:38 UTC (rev 255) +++ branches/simplified-build/!OsLib/Tools/ReduceAOF/Makefile 2007-04-29 22:03:34 UTC (rev 256) @@ -27,7 +27,7 @@ $(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(TARGET) clean: - -$(RM) $(TARGET) *.o + -$(RM) $(TARGET) *.o $(bindir)/$(TARGET) $(TARGET): $(OBJS) $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-06-19 22:03:45
|
Revision: 274 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=274&view=rev Author: jtytgat Date: 2007-06-19 15:03:42 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Finishing touches Modified Paths: -------------- branches/simplified-build/!OsLib/Tools/DefMod2/CHANGES branches/simplified-build/!OsLib/Tools/DefMod2/README branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y branches/simplified-build/!OsLib/Tools/Makefile Added Paths: ----------- branches/simplified-build/!OsLib/Tools/DefMod2/COPYING Removed Paths: ------------- branches/simplified-build/!OsLib/Tools/DefMod2/Copying Property Changed: ---------------- branches/simplified-build/!OsLib/Tools/BindHelp/ branches/simplified-build/!OsLib/Tools/DefMod2/ branches/simplified-build/!OsLib/Tools/IndexHelp/ branches/simplified-build/!OsLib/Tools/ReduceAOF/ Property changes on: branches/simplified-build/!OsLib/Tools/BindHelp ___________________________________________________________________ Name: svn:ignore - BindHelp o + bindhelp o Property changes on: branches/simplified-build/!OsLib/Tools/DefMod2 ___________________________________________________________________ Name: svn:ignore + defmod Modified: branches/simplified-build/!OsLib/Tools/DefMod2/CHANGES =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/CHANGES 2007-06-19 00:34:28 UTC (rev 273) +++ branches/simplified-build/!OsLib/Tools/DefMod2/CHANGES 2007-06-19 22:03:42 UTC (rev 274) @@ -1,4 +1,9 @@ +CHANGES (Mid 2007) +================== +GCCSDK 4 ELF support (-asmtype option) +Made APCS-32 output default. + CHANGES ======= Copied: branches/simplified-build/!OsLib/Tools/DefMod2/COPYING (from rev 246, branches/simplified-build/!OsLib/Tools/DefMod2/Copying) =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/COPYING (rev 0) +++ branches/simplified-build/!OsLib/Tools/DefMod2/COPYING 2007-06-19 22:03:42 UTC (rev 274) @@ -0,0 +1,248 @@ + GNU GENERAL PUBLIC LICENCE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, U S A + Everyone is permitted to copy and distribute verbatim copies + of this licence document, but changing it is not allowed. + + Preamble + + The licence agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +Licence is intended to guarantee your freedom to share and change free +software---to make sure the software is free for all its users. The +General Public Licence applies to the Free Software Foundation's +software and to any other programme whose authors commit to using it. +You can use it for your programmes, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public Licence is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programmes; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a programme, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this licence which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENCE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This Licence Agreement applies to any programme or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public Licence. The +"Programme", below, refers to any such programme or work, and a "work based +on the Programme" means either the Programme or any work containing the +Programme or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Programme's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public Licence and to the absence of any warranty; and give any +other recipients of the Programme a copy of this General Public Licence +along with the Programme. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Programme or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Programme or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public Licence (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified programme normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the programme under these + conditions, and telling the user how to view a copy of this General + Public Licence. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Programme (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Programme (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the programme in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Programme except as expressly provided under this General Public Licence. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Programme is void, and will automatically terminate your rights to use +the Programme under this Licence. However, parties who have received +copies, or rights to use copies, from you under this General Public +Licence will not have their licences terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Programme (or any work based +on the Programme) you indicate your acceptance of this licence to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Programme (or any work based on the +Programme), the recipient automatically receives a licence from the original +licensor to copy, distribute or modify the Programme subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public Licence from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Programme +specifies a version number of the licence which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Programme does not specify a version number of +the licence, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Programme into other free +programmes whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAMME IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAMME, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAMME "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAMME IS WITH YOU. SHOULD THE +PROGRAMME PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAMME AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAMME (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAMME TO OPERATE WITH ANY OTHER +PROGRAMMES), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programmes + + If you develop a new programme, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the programme. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the programme's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This programme is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public Licence as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This programme is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public Licence for more details. + + You should have received a copy of the GNU General Public Licence + along with this programme; if not, write to the Free Software + Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the programme is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public Licence. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +programme. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the programme, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + programme `Gnomovision' (a programme to direct compilers to make passes + at assemblers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! Deleted: branches/simplified-build/!OsLib/Tools/DefMod2/Copying =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/Copying 2007-06-19 00:34:28 UTC (rev 273) +++ branches/simplified-build/!OsLib/Tools/DefMod2/Copying 2007-06-19 22:03:42 UTC (rev 274) @@ -1,248 +0,0 @@ - GNU GENERAL PUBLIC LICENCE - Version 1, February 1989 - - Copyright (C) 1989 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, U S A - Everyone is permitted to copy and distribute verbatim copies - of this licence document, but changing it is not allowed. - - Preamble - - The licence agreements of most software companies try to keep users -at the mercy of those companies. By contrast, our General Public -Licence is intended to guarantee your freedom to share and change free -software---to make sure the software is free for all its users. The -General Public Licence applies to the Free Software Foundation's -software and to any other programme whose authors commit to using it. -You can use it for your programmes, too. - - When we speak of free software, we are referring to freedom, not -price. Specifically, the General Public Licence is designed to make -sure that you have the freedom to give away or sell copies of free -software, that you receive source code or can get it if you want it, -that you can change the software or use pieces of it in new free -programmes; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of a such a programme, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must tell them their rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this licence which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENCE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This Licence Agreement applies to any programme or other work which -contains a notice placed by the copyright holder saying it may be -distributed under the terms of this General Public Licence. The -"Programme", below, refers to any such programme or work, and a "work based -on the Programme" means either the Programme or any work containing the -Programme or a portion of it, either verbatim or with modifications. Each -licensee is addressed as "you". - - 1. You may copy and distribute verbatim copies of the Programme's source -code as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this -General Public Licence and to the absence of any warranty; and give any -other recipients of the Programme a copy of this General Public Licence -along with the Programme. You may charge a fee for the physical act of -transferring a copy. - - 2. You may modify your copy or copies of the Programme or any portion of -it, and copy and distribute such modifications under the terms of Paragraph -1 above, provided that you also do the following: - - a) cause the modified files to carry prominent notices stating that - you changed the files and the date of any change; and - - b) cause the whole of any work that you distribute or publish, that - in whole or in part contains the Programme or any part thereof, either - with or without modifications, to be licensed at no charge to all - third parties under the terms of this General Public Licence (except - that you may choose to grant warranty protection to some or all - third parties, at your option). - - c) If the modified programme normally reads commands interactively when - run, you must cause it, when started running for such interactive use - in the simplest and most usual way, to print or display an - announcement including an appropriate copyright notice and a notice - that there is no warranty (or else, saying that you provide a - warranty) and that users may redistribute the programme under these - conditions, and telling the user how to view a copy of this General - Public Licence. - - d) You may charge a fee for the physical act of transferring a - copy, and you may at your option offer warranty protection in - exchange for a fee. - -Mere aggregation of another independent work with the Programme (or its -derivative) on a volume of a storage or distribution medium does not bring -the other work under the scope of these terms. - - 3. You may copy and distribute the Programme (or a portion or derivative of -it, under Paragraph 2) in object code or executable form under the terms of -Paragraphs 1 and 2 above provided that you also do one of the following: - - a) accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Paragraphs 1 and 2 above; or, - - b) accompany it with a written offer, valid for at least three - years, to give any third party free (except for a nominal charge - for the cost of distribution) a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of - Paragraphs 1 and 2 above; or, - - c) accompany it with the information you received as to where the - corresponding source code may be obtained. (This alternative is - allowed only for noncommercial distribution and only if you - received the programme in object code or executable form alone.) - -Source code for a work means the preferred form of the work for making -modifications to it. For an executable file, complete source code means -all the source code for all modules it contains; but, as a special -exception, it need not include source code for modules which are standard -libraries that accompany the operating system on which the executable -file runs, or for standard header files or definitions files that -accompany that operating system. - - 4. You may not copy, modify, sublicense, distribute or transfer the -Programme except as expressly provided under this General Public Licence. -Any attempt otherwise to copy, modify, sublicense, distribute or transfer -the Programme is void, and will automatically terminate your rights to use -the Programme under this Licence. However, parties who have received -copies, or rights to use copies, from you under this General Public -Licence will not have their licences terminated so long as such parties -remain in full compliance. - - 5. By copying, distributing or modifying the Programme (or any work based -on the Programme) you indicate your acceptance of this licence to do so, -and all its terms and conditions. - - 6. Each time you redistribute the Programme (or any work based on the -Programme), the recipient automatically receives a licence from the original -licensor to copy, distribute or modify the Programme subject to these -terms and conditions. You may not impose any further restrictions on the -recipients' exercise of the rights granted herein. - - 7. The Free Software Foundation may publish revised and/or new versions -of the General Public Licence from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Programme -specifies a version number of the licence which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Programme does not specify a version number of -the licence, you may choose any version ever published by the Free Software -Foundation. - - 8. If you wish to incorporate parts of the Programme into other free -programmes whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 9. BECAUSE THE PROGRAMME IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAMME, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAMME "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAMME IS WITH YOU. SHOULD THE -PROGRAMME PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAMME AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAMME (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAMME TO OPERATE WITH ANY OTHER -PROGRAMMES), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programmes - - If you develop a new programme, and you want it to be of the greatest -possible use to humanity, the best way to achieve this is to make it -free software which everyone can redistribute and change under these -terms. - - To do so, attach the following notices to the programme. It is safest to -attach them to the start of each source file to most effectively convey -the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the programme's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This programme is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public Licence as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - This programme is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public Licence for more details. - - You should have received a copy of the GNU General Public Licence - along with this programme; if not, write to the Free Software - Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the programme is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19xx name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the -appropriate parts of the General Public Licence. Of course, the -commands you use may be called something other than `show w' and `show -c'; they could even be mouse-clicks or menu items--whatever suits your -programme. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the programme, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - programme `Gnomovision' (a programme to direct compilers to make passes - at assemblers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -That's all there is to it! Modified: branches/simplified-build/!OsLib/Tools/DefMod2/README =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/README 2007-06-19 00:34:28 UTC (rev 273) +++ branches/simplified-build/!OsLib/Tools/DefMod2/README 2007-06-19 22:03:42 UTC (rev 274) @@ -1,83 +1,41 @@ - README ====== This distribution contains a patched defmod that can be built on UNIX systems -as well as RISC OS systems. +as well as RISC OS systems (although the latter hasn't recently been tested). -The sources to defmod are in the defmod directory. An example UNIX -environment for building OSLib itself is in unix_eg +AUTHORS +======= -Please have a go with this software and see if it works for you. +Original defmod development was done by Jonathan Coxhead. After making the +OSLib sources available under GPL, the development continued by several of +the SourceForge OSLib (ro-oslib) developers. Stewart Brodie (st...@eh...) +contributed the changes to build and run defmod on UNIX systems. - - -Stewart Brodie (st...@eh...) -October 18th 2001 - - - - REQUIREMENTS ============ bison 1.28 must be installed on your UNIX system. You must have GNU make (gmake on FreeBSD systems). You must have bash. +You must either have GCCSDK 3.4.6 R2 (http://gccsdk.riscos.info/) or AsmAsm +for AOF output or GCCSDK 4 (http://gccsdk.riscos.info/) for ELF output. -To perform the demonstration build, you will need an "armasm" on -your path that is an ARM assembler compatible with RISC OS objasm. -You will also require "armlib" on your path that is compatible -with RISC OS libfile (see note at end too) +LICENSE +======= +This programme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public Licence as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. +This programme is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public Licence for more details. -HOWTO -===== +You should have received a copy of the GNU General Public Licence +along with this programme; if not, write to the Free Software +Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA. -Copy all the contents of this archive to a UNIX system. - -In defmod/ports/solaris, do: - -$ make links -$ make - -Construct a build directory from the top-level of the unpacked archive: - -$ cd unix_eg -$ mkdir defs # if it wasn't already there - -Copy all the defmod definition files from OSLib into this directory. -There's around 150 in total - just copy them all in here. - -Rename the files to have a .swi suffix (example in /bin/sh): - -$ for i in defs/* -> do -> mv $i $i.swi -> done - -Then you should be able to build it: - -$ make # or gmake on FreeBSD - -This will build all the .h, all the .hdr and the OSLib.a file. Depending on -your machine, this could take anything from a few seconds to a few minutes -(compared with over an hour on a Risc PC ;-) - -Depending on your UNIX, the armlib call may fail with "Too many arguments" -because I'm allowing the shell to expand the parameters instead of OSLib. -If this happens, sorry - you'll need to do: - -$ find tmp -name "*.o" > ViaFile -$ armlib -c -o OSLib.a -via ViaFile - - -NOTES -===== - -Please see the CHANGES file for notes on what I've changed for both the -generic defmod software and to support execution on UNIX systems. - - #END# Modified: branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y =================================================================== --- branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y 2007-06-19 00:34:28 UTC (rev 273) +++ branches/simplified-build/!OsLib/Tools/DefMod2/defmod.y 2007-06-19 22:03:42 UTC (rev 274) @@ -1154,7 +1154,7 @@ { const char* helptext = "DefMod" VERSION_INFO ". Copyright � Jonathan Coxhead, 1994.\r" "DefMod comes with ABSOLUTELY NO WARRANTY.\r" "This is free software, and you are welcome to redistribute it " - "under certain conditions. See the file Copying for details.\r" + "under certain conditions. See the file COPYING for details.\r" "Usage: DefMod <type> [-v] [-help] " "[-o <output-dir> | > <output-file>] " "[-byte_wide <byte-wide-file>] " Property changes on: branches/simplified-build/!OsLib/Tools/IndexHelp ___________________________________________________________________ Name: svn:ignore - IndexHelp o + indexhelp o Modified: branches/simplified-build/!OsLib/Tools/Makefile =================================================================== --- branches/simplified-build/!OsLib/Tools/Makefile 2007-06-19 00:34:28 UTC (rev 273) +++ branches/simplified-build/!OsLib/Tools/Makefile 2007-06-19 22:03:42 UTC (rev 274) @@ -1,4 +1,5 @@ -# ... +# Top makefile for building all the tools used for OSLib build. +# Only the tools needed during the cross-compile build are built. ALL = BindHelp DefMod2 IndexHelp ReduceAOF Property changes on: branches/simplified-build/!OsLib/Tools/ReduceAOF ___________________________________________________________________ Name: svn:ignore - reduceaof o + reduceaof o This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |