From da817ebbe50a78af12910b949efa7992e87bccce Mon Sep 17 00:00:00 2001 From: vsc Date: Mon, 16 Apr 2001 16:41:04 +0000 Subject: [PATCH] First patches for 4.3.19: new Makefiles for documentation; user_{input,output,error} streams are now aliases; restore YapLibDir support $(DESTDIR) fix call_residue/2 git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@8 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/corout.c | 3 +- C/errors.c | 21 ++ C/init.c | 6 + C/iopreds.c | 264 +++++++++++++++-------- C/save.c | 4 + H/Heap.h | 8 +- H/yapio.h | 8 +- Makefile.in | 123 +++++++---- changes4.3.html | 19 ++ docs/yap.tex | 440 ++++++++++++++++++++++++-------------- library/regex/Makefile.in | 2 +- m4/Yap.h.m4 | 3 +- pl/boot.yap | 39 +--- pl/corout.yap | 8 +- pl/directives.yap | 28 ++- pl/errors.yap | 3 + pl/yio.yap | 14 +- 17 files changed, 642 insertions(+), 351 deletions(-) diff --git a/C/corout.c b/C/corout.c index 44906b4d1..553e1d443 100644 --- a/C/corout.c +++ b/C/corout.c @@ -894,7 +894,8 @@ can_unify(Term t1, Term t2, Term *Vars) if (IsVarTerm(t1)) { /* we know for sure they can't be different */ if (IsVarTerm(t2)) { - /* we need to suspend on both variables ! */ + /* we need to suspend on both variables because otherwise + Y = susp(_) would not wakeup susp ! */ *Vars = MkPairTerm(t1,MkPairTerm(t2,TermNil)); return(TRUE); } else { diff --git a/C/errors.c b/C/errors.c index d9e3f72a1..1b648f373 100644 --- a/C/errors.c +++ b/C/errors.c @@ -1155,6 +1155,27 @@ Error (yap_error_number type, Term where, char *format,...) serious = TRUE; } break; + case PERMISSION_ERROR_NEW_ALIAS_FOR_STREAM: + { + int i; + Term ti[3]; + +#if HAVE_STRNCAT + strncat(p, " in ", psize); +#else + strcat(p, " in "); +#endif + i = strlen(p); + ti[0] = MkAtomTerm(LookupAtom("new")); + ti[1] = MkAtomTerm(LookupAtom("alias")); + ti[2] = where; + nt[0] = MkApplTerm(MkFunctor(LookupAtom("permission_error"),3), 3, ti); + tp = p+i; + psize -= i; + fun = MkFunctor(LookupAtom("error"),2); + serious = TRUE; + } + break; case PERMISSION_ERROR_OPEN_SOURCE_SINK: { int i; diff --git a/C/init.c b/C/init.c index d279ce7b7..9d9852e7d 100644 --- a/C/init.c +++ b/C/init.c @@ -690,7 +690,11 @@ InitFlags(void) { /* note that heap_regs must be set first */ +#if USE_GMP + yap_flags[YAP_INT_BOUNDED_FLAG] = 0; +#else yap_flags[YAP_INT_BOUNDED_FLAG] = 1; +#endif yap_flags[MAX_ARITY_FLAG] = -1; yap_flags[INTEGER_ROUNDING_FLAG] = 0; yap_flags[YAP_MAX_INTEGER_FLAG] = (Int)(~((CELL)1 << (sizeof(Int)*8-1))); @@ -946,6 +950,8 @@ InitCodes(void) heap_regs->term_dollar_u = MkAtomTerm(LookupAtom("$u")); #endif heap_regs->term_refound_var = MkAtomTerm(LookupAtom("$I_FOUND_THE_VARIABLE_AGAIN")); + heap_regs->n_of_file_aliases = 0; + heap_regs->file_aliases = NULL; heap_regs->foreign_code_loaded = NULL; heap_regs->yap_lib_dir = NULL; heap_regs->size_of_overflow = 0; diff --git a/C/iopreds.c b/C/iopreds.c index d3f5133b8..11920568c 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -98,14 +98,6 @@ typedef struct } StreamDesc; -typedef struct AliasDescS - { - Atom name; - int my_stream; - struct AliasDescS *next; - } -* AliasDesc; - STATIC_PROTO (void InitStdStream, (int, SMALLUNSGN, YP_File, Atom)); STATIC_PROTO (Int PlIOError, (yap_error_number, Term, char *)); STATIC_PROTO (int FilePutc, (int, int)); @@ -136,7 +128,8 @@ STATIC_PROTO (Term MkStream, (int)); STATIC_PROTO (Int p_stream_flags, (void)); STATIC_PROTO (int find_csult_file, (char *, char *, StreamDesc *, char *)); STATIC_PROTO (Int p_open, (void)); -STATIC_PROTO (void AddAlias, (Atom, int)); +STATIC_PROTO (int AddAlias, (Atom, int)); +STATIC_PROTO (void SetAlias, (Atom, int)); STATIC_PROTO (void PurgeAlias, (int)); STATIC_PROTO (int CheckAlias, (Atom)); STATIC_PROTO (Atom FetchAlias, (int)); @@ -177,6 +170,7 @@ STATIC_PROTO (Int p_show_stream_flags, (void)); STATIC_PROTO (Int p_show_stream_position, (void)); STATIC_PROTO (Int p_set_stream_position, (void)); STATIC_PROTO (Int p_add_alias_to_stream, (void)); +STATIC_PROTO (Int p_change_alias_to_stream, (void)); STATIC_PROTO (Int p_check_if_valid_new_alias, (void)); STATIC_PROTO (Int p_fetch_stream_alias, (void)); STATIC_PROTO (Int GetArgSizeFromThirdArg, (char **, Term *)); @@ -234,13 +228,12 @@ static int parser_error_style = FAIL_ON_PARSER_ERROR; #define StdOutStream 1 #define StdErrStream 2 +#define ALIASES_BLOCK_SIZE 8 #if USE_SOCKET extern int YP_sockets_io; #endif -static AliasDesc AliasList = NULL; - static void unix_upd_stream_info (StreamDesc * s) { @@ -360,8 +353,7 @@ InitStdStream (int sno, SMALLUNSGN flags, YP_File file, Atom name) s->stream_putc = FilePutc; s->stream_getc = PlGetc; } - s->u.file.name = name; - s->u.file.user_name = MkAtomTerm (name); + s->u.file.user_name = MkAtomTerm (s->u.file.name); } if (CharConversionTable != NULL) s->stream_getc_for_read = ISOGetc; @@ -391,7 +383,17 @@ InitPlIO (void) InitStdStream (StdErrStream, Output_Stream_f, YP_stderr, AtomUsrErr); c_input_stream = StdInStream; c_output_stream = StdOutStream; - AliasList = NULL; + /* alloca alias array */ + FileAliases = (AliasDesc)AllocCodeSpace(sizeof(struct AliasDescS)*ALIASES_BLOCK_SIZE); + /* init standard aliases */ + FileAliases[0].name = AtomUsrIn; + FileAliases[0].alias_stream = 0; + FileAliases[1].name = AtomUsrOut; + FileAliases[1].alias_stream = 1; + FileAliases[2].name = AtomUsrErr; + FileAliases[2].alias_stream = 2; + NOfFileAliases = 3; + SzOfFileAliases = ALIASES_BLOCK_SIZE; } static Int @@ -673,11 +675,16 @@ ReadlineGetc(int sno) if (newline) { char *cptr = Prompt, ch; - /* don't just output the prompt */ - while ((ch = *cptr++) != '\0') { - console_count_output_char(ch,Stream+StdErrStream,StdErrStream); + if ((Stream[FileAliases[2].alias_stream].status & Tty_Stream_f) && + Stream[FileAliases[2].alias_stream].u.file.name == Stream[sno].u.file.name) { + /* don't just output the prompt */ + while ((ch = *cptr++) != '\0') { + console_count_output_char(ch,Stream+StdErrStream,StdErrStream); + } + _line = readline (Prompt); + } else { + _line = readline (""); } - _line = readline (Prompt); } else { _line = readline (""); } @@ -1199,8 +1206,11 @@ p_open (void) } open_mode = AtomOfTerm (t2); if (open_mode == AtomRead || open_mode == AtomCsult) { + if (open_mode == AtomCsult && AtomOfTerm(file_name) == AtomUsrIn) { + return(unify(MkStream(FileAliases[0].alias_stream), ARG3)); + } strncpy(io_mode,"rb", 8); - s = Input_Stream_f; + s = Input_Stream_f; } else if (open_mode == AtomWrite) { strncpy(io_mode,"w",8); s = Output_Stream_f; @@ -1340,7 +1350,33 @@ static Int p_add_alias_to_stream (void) } at = AtomOfTerm(tname); sno = (int)IntOfTerm(ArgOfTerm(1,tstream)); - AddAlias(at, sno); + if (AddAlias(at, sno)) + return(TRUE); + /* we could not create the alias, time to close the stream */ + CloseStream(sno); + Error(PERMISSION_ERROR_NEW_ALIAS_FOR_STREAM, tname, "open/3"); + return (FALSE); +} + +static Int p_change_alias_to_stream (void) +{ + Term tname = Deref(ARG1); + Term tstream = Deref(ARG2); + Atom at; + Int sno; + + if (IsVarTerm(tname)) { + Error(INSTANTIATION_ERROR, tname, "$change_alias_to_stream/2"); + return (FALSE); + } else if (!IsAtomTerm (tname)) { + Error(TYPE_ERROR_ATOM, tname, "$change_alias_to_stream/2"); + return (FALSE); + } + at = AtomOfTerm(tname); + if ((sno = CheckStream (tstream, Input_Stream_f | Output_Stream_f | Append_Stream_f | Socket_Stream_f, "change_stream_alias/2")) + == -1) + return(FALSE); + SetAlias(at, sno); return(TRUE); } @@ -1380,7 +1416,7 @@ p_fetch_stream_alias (void) default: if (IsVarTerm(t2)) { Atom at = FetchAlias(sno); - if (at == AtomUsrIn) + if (at == AtomFoundVar) return(FALSE); else return(unify_constant(t2, MkAtomTerm(at))); @@ -1524,83 +1560,134 @@ p_open_mem_write_stream (void) /* $open_mem_write_stream(-Stream) */ return (unify (ARG1, t)); } -/* create a new alias arg for stream sno */ static void +ExtendAliasArray(void) +{ + AliasDesc new; + UInt new_size = SzOfFileAliases+ALIASES_BLOCK_SIZE; + + new = (AliasDesc)AllocCodeSpace(sizeof(AliasDesc *)*new_size); + memcpy((void *)new, (void *)FileAliases, sizeof(AliasDesc *)*SzOfFileAliases); + FreeCodeSpace((ADDR)FileAliases); + FileAliases = new; + SzOfFileAliases = new_size; +} + +/* create a new alias arg for stream sno */ +static int AddAlias (Atom arg, int sno) { - AliasDesc aliasp = AliasList; + AliasDesc aliasp = FileAliases, aliasp_max = FileAliases+NOfFileAliases; - while (aliasp != NULL) { + while (aliasp < aliasp_max) { if (aliasp->name == arg) { - aliasp->my_stream = sno; + if (aliasp->alias_stream != sno) { + return(FALSE); + } + return(TRUE); + } + aliasp++; + } + /* we have not found an alias neither a hole */ + if (aliasp == FileAliases+SzOfFileAliases) + ExtendAliasArray(); + NOfFileAliases++; + aliasp->name = arg; + aliasp->alias_stream = sno; + return(TRUE); +} + +/* create a new alias arg for stream sno */ +static void +SetAlias (Atom arg, int sno) +{ + + AliasDesc aliasp = FileAliases, aliasp_max = FileAliases+NOfFileAliases; + + while (aliasp < aliasp_max) { + if (aliasp->name == arg) { + aliasp->alias_stream = sno; return; } - else aliasp = aliasp->next; + aliasp++; } - aliasp = (AliasDesc)AllocAtomSpace(sizeof(struct AliasDescS)); + /* we have not found an alias, create one */ + if (aliasp == FileAliases+SzOfFileAliases) + ExtendAliasArray(); + NOfFileAliases++; aliasp->name = arg; - aliasp->my_stream = sno; - aliasp->next = AliasList; - AliasList = aliasp; + aliasp->alias_stream = sno; } /* purge all aliases for stream sno */ static void PurgeAlias (int sno) { - - AliasDesc aliasp = AliasList, - prev = NULL; - - while (aliasp != NULL) { - if (aliasp->my_stream == sno) { - if (prev == NULL) - AliasList = aliasp->next; - else - prev->next = aliasp->next; - FreeAtomSpace((char *)aliasp); - } else - prev = aliasp; - aliasp = aliasp->next; + AliasDesc aliasp = FileAliases, aliasp_max = FileAliases+NOfFileAliases, new_aliasp = aliasp; + + while (aliasp < aliasp_max) { + if (aliasp->alias_stream == sno) { + if (aliasp - FileAliases < 3) { + /* get back to std streams, but keep alias around */ + new_aliasp->alias_stream = aliasp-FileAliases; + new_aliasp++; + } else { + NOfFileAliases--; + } + } else { + /* avoid holes in alias array */ + if (new_aliasp != aliasp) { + new_aliasp->alias_stream = aliasp->alias_stream; + new_aliasp->name = aliasp->name; + } + new_aliasp++; + } + aliasp++; } } -/* check if arg is an alias */ +/* check if name is an alias */ static int CheckAlias (Atom arg) { - AliasDesc aliasp = AliasList; - while (aliasp != NULL) { - if (aliasp->name == arg) - return(aliasp->my_stream); - else aliasp = aliasp->next; + AliasDesc aliasp = FileAliases, aliasp_max = FileAliases+NOfFileAliases; + + while (aliasp < aliasp_max) { + if (aliasp->name == arg) { + return(aliasp->alias_stream); + } + aliasp++; } return(-1); } -/* check if arg is an alias */ +/* check if stream has an alias */ static Atom FetchAlias (int sno) { - AliasDesc aliasp = AliasList; - while (aliasp != NULL) { - if (aliasp->my_stream == sno) + AliasDesc aliasp = FileAliases, aliasp_max = FileAliases+NOfFileAliases; + + while (aliasp < aliasp_max) { + if (aliasp->alias_stream == sno) { return(aliasp->name); - else aliasp = aliasp->next; + } + aliasp++; } - return(AtomUsrIn); + return(AtomFoundVar); } /* check if arg is an alias */ static int FindAliasForStream (int sno, Atom al) { - AliasDesc aliasp = AliasList; - while (aliasp != NULL) { - if (aliasp->my_stream == sno && aliasp->name == al) + AliasDesc aliasp = FileAliases, aliasp_max = FileAliases+NOfFileAliases; + + while (aliasp < aliasp_max) { + if (aliasp->alias_stream == sno && aliasp->name == al) { return(TRUE); - else aliasp = aliasp->next; + } + aliasp++; } return(FALSE); } @@ -1614,44 +1701,30 @@ CheckStream (Term arg, int kind, char *msg) Error(INSTANTIATION_ERROR, arg, msg); return (-1); } - else if (IsAtomTerm (arg)) - { - Atom sname = AtomOfTerm (arg); - if (sname == AtomUsrIn) - sno = StdInStream; - else if (sname == AtomUsrOut) - sno = StdOutStream; - else if (sname == AtomUsrErr) - sno = StdErrStream; - else if (sname == AtomUser) - { - if (kind & Input_Stream_f) - sno = StdInStream; - if (kind & Output_Stream_f) { - if (sno >= 0) - { - Error(PERMISSION_ERROR_INPUT_STREAM, arg, - "ambiguous use of 'user' as a stream"); - return (-1); - } - else { - sno = StdOutStream; - } - } - } - else { - if ((sno = CheckAlias(sname)) == -1) { - Error(EXISTENCE_ERROR_STREAM, arg, msg); - return(-1); + else if (IsAtomTerm (arg)) { + Atom sname = AtomOfTerm (arg); + + if (sname == AtomUser) { + if (kind & Input_Stream_f) { + if (kind & (Output_Stream_f|Append_Stream_f)) { + Error(PERMISSION_ERROR_INPUT_STREAM, arg, + "ambiguous use of 'user' as a stream"); + return (-1); } + sname = AtomUsrIn; + } else { + sname = AtomUsrOut; } } - else if (IsApplTerm (arg) && FunctorOfTerm (arg) == FunctorStream) - { - arg = ArgOfTerm (1, arg); - if (!IsVarTerm (arg) && IsIntTerm (arg)) - sno = IntOfTerm (arg); + if ((sno = CheckAlias(sname)) == -1) { + Error(EXISTENCE_ERROR_STREAM, arg, msg); + return(-1); } + } else if (IsApplTerm (arg) && FunctorOfTerm (arg) == FunctorStream) { + arg = ArgOfTerm (1, arg); + if (!IsVarTerm (arg) && IsIntTerm (arg)) + sno = IntOfTerm (arg); + } if (sno < 0) { Error(DOMAIN_ERROR_STREAM_OR_ALIAS, arg, msg); @@ -1685,7 +1758,7 @@ p_check_stream (void) static Int p_check_if_stream (void) { /* '$check_stream'(Stream) */ - return (CheckStream (ARG1, Input_Stream_f | Output_Stream_f | Socket_Stream_f, "check_stream/1") + return (CheckStream (ARG1, Input_Stream_f | Output_Stream_f | Append_Stream_f | Socket_Stream_f, "check_stream/1") != -1); } @@ -4159,6 +4232,7 @@ InitIOPreds(void) InitCPred ("$force_char_conversion", 0, p_force_char_conversion, SyncPredFlag); InitCPred ("$disable_char_conversion", 0, p_disable_char_conversion, SyncPredFlag); InitCPred ("$add_alias_to_stream", 2, p_add_alias_to_stream, SafePredFlag|SyncPredFlag); + InitCPred ("$change_alias_to_stream", 2, p_change_alias_to_stream, SafePredFlag|SyncPredFlag); InitCPred ("$check_if_valid_new_alias", 1, p_check_if_valid_new_alias, TestPredFlag|SafePredFlag|SyncPredFlag); InitCPred ("$fetch_stream_alias", 2, p_fetch_stream_alias, SafePredFlag|SyncPredFlag); #if HAVE_SELECT diff --git a/C/save.c b/C/save.c index 0ce30a79e..9c01d44a0 100644 --- a/C/save.c +++ b/C/save.c @@ -1084,6 +1084,10 @@ restore_codes(void) heap_regs->term_dollar_u = AtomTermAdjust(heap_regs->term_dollar_u); #endif heap_regs->term_refound_var = AtomTermAdjust(heap_regs->term_refound_var); + heap_regs->file_aliases = + (void *)AddrAdjust((ADDR)heap_regs->file_aliases); + heap_regs->yap_lib_dir = + (char *)AddrAdjust((ADDR)heap_regs->yap_lib_dir); heap_regs->pred_goal_expansion = (PredEntry *)AddrAdjust((ADDR)heap_regs->pred_goal_expansion); heap_regs->pred_meta_call = diff --git a/H/Heap.h b/H/Heap.h index b45de974f..9a1cee26c 100644 --- a/H/Heap.h +++ b/H/Heap.h @@ -10,7 +10,7 @@ * File: Heap.h * * mods: * * comments: Heap Init Structure * -* version: $Id: Heap.h,v 1.1.1.1 2001-04-09 19:53:39 vsc Exp $ * +* version: $Id: Heap.h,v 1.2 2001-04-16 16:41:04 vsc Exp $ * *************************************************************************/ /* information that can be stored in Code Space */ @@ -247,6 +247,9 @@ typedef struct various_codes { void *last_wtime; PredEntry *pred_goal_expansion; PredEntry *pred_meta_call; + UInt n_of_file_aliases; + UInt sz_of_file_aliases; + void * file_aliases; void *foreign_code_loaded; char *yap_lib_dir; #if defined(YAPOR) || defined(TABLING) @@ -418,6 +421,9 @@ typedef struct various_codes { #define TermReFoundVar heap_regs->term_refound_var #define PredGoalExpansion heap_regs->pred_goal_expansion #define PredMetaCall heap_regs->pred_meta_call +#define NOfFileAliases heap_regs->n_of_file_aliases +#define SzOfFileAliases heap_regs->sz_of_file_aliases +#define FileAliases ((AliasDesc)(heap_regs->file_aliases)) #define ForeignCodeLoaded heap_regs->foreign_code_loaded #define Yap_LibDir heap_regs->yap_lib_dir #define DeadClauses heap_regs->dead_clauses diff --git a/H/yapio.h b/H/yapio.h index e4da9456b..9f8f2e408 100644 --- a/H/yapio.h +++ b/H/yapio.h @@ -211,6 +211,12 @@ typedef enum{ /* we accept two domains for the moment, IPV6 may follow */ af_unix /* or AF_FILE */ } socket_domain; +/* info on aliases */ +typedef struct AliasDescS { + Atom name; + int alias_stream; +} * AliasDesc; + Term STD_PROTO(InitSocketStream,(int, socket_info, socket_domain)); int STD_PROTO(CheckSocketStream,(Term, char *)); socket_domain STD_PROTO(GetSocketDomain,(int)); @@ -253,7 +259,7 @@ void STD_PROTO(CloseStream,(int)); int STD_PROTO(PlGetchar,(void)); int STD_PROTO(PlFGetchar,(void)); -extern int c_input_stream, c_output_stream; +extern int c_input_stream, c_output_stream, c_error_stream; /* routines in sysbits.c */ char *STD_PROTO(pfgets,(char *,int,YP_File)); diff --git a/Makefile.in b/Makefile.in index d61cd36c3..46310c85a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -434,45 +434,44 @@ libYap.a: $(LIB_OBJECTS) install: @INSTALL_COMMAND@ install_unix: - -mkdir -p $(BINDIR) - $(INSTALL_PROGRAM) -m 755 yap $(BINDIR)/yap - -mkdir -p $(YAPLIBDIR) - $(INSTALL_DATA) -m 644 startup $(YAPLIBDIR)/startup - $(INSTALL_DATA) -m 644 libYap.a $(LIBDIR)/libYap.a - (cd $(srcdir) ; tar cf - library) | (cd $(YAPLIBDIR) ; tar xf -) - $(INSTALL_DATA) $(srcdir)/LGPL/icon_address.pl $(YAPLIBDIR)/library - $(INSTALL_DATA) $(srcdir)/LGPL/pillow.pl $(YAPLIBDIR)/library - (cd $(srcdir)/CLPQR ; tar cf - .) | (cd $(YAPLIBDIR)/library ; tar xf -) - (cd $(srcdir)/CHR ; tar cf - .) | (cd $(YAPLIBDIR)/library ; tar xf -) + -mkdir -p $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) -m 755 yap $(DESTDIR)$(BINDIR)/yap + -mkdir -p $(DESTDIR)$(YAPLIBDIR) + $(INSTALL_DATA) -m 644 startup $(DESTDIR)$(YAPLIBDIR)/startup + $(INSTALL_DATA) -m 644 libYap.a $(DESTDIR)$(LIBDIR)/libYap.a + (cd $(srcdir) ; tar cf - library) | (cd $(DESTDIR)$(YAPLIBDIR) ; tar xf -) + $(INSTALL_DATA) $(srcdir)/LGPL/icon_address.pl $(DESTDIR)$(YAPLIBDIR)/library + $(INSTALL_DATA) $(srcdir)/LGPL/pillow.pl $(DESTDIR)$(YAPLIBDIR)/library + (cd $(srcdir)/CLPQR ; tar cf - .) | (cd $(DESTDIR)$(YAPLIBDIR)/library ; tar xf -) + (cd $(srcdir)/CHR ; tar cf - .) | (cd $(DESTDIR)$(YAPLIBDIR)/library ; tar xf -) @INSTALL_DLLS@ (cd library/regex; make install) - -mkdir -p $(INCLUDEDIR) - for h in $(INTERFACE_HEADERS); do $(INSTALL) $$h $(INCLUDEDIR); done + -mkdir -p $(DESTDIR)$(INCLUDEDIR) + for h in $(INTERFACE_HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done install_mingw32: - -mkdir $(ROOTDIR) - -mkdir $(BINDIR) - -mkdir $(ROOTDIR)/lib - -mkdir $(YAPLIBDIR) - -mkdir $(ROOTDIR)/include - -mkdir $(INCLUDEDIR) - $(INSTALL_PROGRAM) -m 755 yap.exe $(BINDIR)/yap.exe - $(INSTALL_PROGRAM) -m 755 yap.dll $(BINDIR)/yap.dll - $(INSTALL_PROGRAM) -m 755 startup $(YAPLIBDIR)/startup - $(INSTALL) $(srcdir)/include/c_interface.h $(INCLUDEDIR)/c_interface.h + -mkdir $(DESTDIR)$(ROOTDIR) + -mkdir $(DESTDIR)$(BINDIR) + -mkdir $(DESTDIR)$(ROOTDIR)/lib + -mkdir $(DESTDIR)$(YAPLIBDIR) + -mkdir $(DESTDIR)$(ROOTDIR)/include + -mkdir $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_PROGRAM) -m 755 yap.exe $(DESTDIR)$(BINDIR)/yap.exe + $(INSTALL_PROGRAM) -m 755 yap.dll $(DESTDIR)$(BINDIR)/yap.dll + $(INSTALL_PROGRAM) -m 755 startup $(DESTDIR)$(YAPLIBDIR)/startup + $(INSTALL) $(HEADERS) $(DESTDIR)$(INCLUDEDIR) + $(INSTALL) $(srcdir)/include/c_interface.h $(DESTDIR)$(INCLUDEDIR)/c_interface.h $(INSTALL) config.h $(INCLUDEDIR)/config.h - (cd $(srcdir) ; tar cf - library) | (cd $(YAPLIBDIR) ; tar xf -) - $(INSTALL_DATA) $(srcdir)/LGPL/icon_address.pl $(YAPLIBDIR)/library - $(INSTALL_DATA) $(srcdir)/LGPL/pillow.pl $(YAPLIBDIR)/library - (cd $(srcdir)/CLPQR ; tar cf - .) | (cd $(YAPLIBDIR)/library ; tar xf -) - (cd $(srcdir)/CHR ; tar cf - .) | (cd $(YAPLIBDIR)/library ; tar xf -) + (cd $(srcdir) ; tar cf - library) | (cd $(DESTDIR)$(YAPLIBDIR) ; tar xf -) + $(INSTALL_DATA) $(srcdir)/LGPL/icon_address.pl $(DESTDIR)$(YAPLIBDIR)/library + $(INSTALL_DATA) $(srcdir)/LGPL/pillow.pl $(DESTDIR)$(YAPLIBDIR)/library + (cd $(srcdir)/CLPQR ; tar cf - .) | (cd $(DESTDIR)$(YAPLIBDIR)/library ; tar xf -) + (cd $(srcdir)/CHR ; tar cf - .) | (cd $(DESTDIR)$(YAPLIBDIR)/library ; tar xf -) (cd library/regex; make install_mingw32) - -mkdir $(INCLUDEDIR) - $(INSTALL) $(HEADERS) $(INCLUDEDIR) install_library: libYap.a - $(INSTALL_DATA) -m 644 libYap.a $(LIBDIR)/libYap.a - -mkdir $(INCLUDEDIR) - $(INSTALL) $(HEADERS) $(INCLUDEDIR) + $(INSTALL_DATA) -m 644 libYap.a $(DESTDIR)$(LIBDIR)/libYap.a + -mkdir $(DESTDIR)$(INCLUDEDIR) + $(INSTALL) $(HEADERS) $(DESTDIR)$(INCLUDEDIR) ########## TAGS: $(C_SOURCES) $(PL_SOURCES) $(HEADERS) @@ -486,10 +485,10 @@ depend: $(HEADERS) $(C_SOURCES) sed 's|.*/\([^:]*\):|\1:|' > .depend ;\ fi -clean: +clean: clean_docs rm -f *.o *~ $(GHEADERS) *.BAK -realclean: clean +realclean: clean realclean_docs rm -f yap startup config.log config.cache config.h dist: @@ -527,28 +526,60 @@ yap.dll: $(HEADERS) $(LIB_OBJECTS) $(DEF_FILE) $(LD) $(EXP_FILE) --dll -o $(DLLNAME) $(LIB_OBJECTS) $(DLL_LIBS) -e $(ENTRY_FUNCTION) install_info: - cd $(srcdir)/docs ; \ make info; \ - $(INSTALL) yap.info* $(INFODIR); \ - if test -e $(INFODIR)/emacs.bz2; then \ - bzip2 --quiet --force $(INFODIR)/yap.info*; \ + $(INSTALL) yap.info* $(DESTDIR)$(INFODIR); \ + if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \ + bzip2 --quiet --force $(DESTDIR)$(INFODIR)/yap.info*; \ else \ - if test -e $(INFODIR)/emacs.gz; then \ - gzip --quiet --force $(INFODIR)/yap.info*; \ + if test -e $(DESTDIR)$(INFODIR)/emacs.gz; then \ + gzip --quiet --force $(DESTDIR)$(INFODIR)/yap.info*; \ fi \ fi; \ - $(INSTALL_INFO) --quiet --section "Programming Languages" yap.info $(INFODIR)/dir; \ + $(INSTALL_INFO) --quiet --section "Programming Languages" yap.info $(DESTDIR)$(INFODIR)/dir; \ cd ../LGPL/pillow/doc ; \ - $(INSTALL) pillow_doc.info $(INFODIR); \ - if test -e $(INFODIR)/emacs.bz2; then \ - bzip2 --quiet --force $(INFODIR)/pillow_doc.info; \ + $(INSTALL) pillow_doc.info $(DESTDIR)$(INFODIR); \ + if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \ + bzip2 --quiet --force $(DESTDIR)$(INFODIR)/pillow_doc.info; \ else \ - if test -e $(INFODIR)/emacs.gz; then \ - gzip --quiet --force $(INFODIR)/pillow_doc.info; \ + + if test -e $(DESTDIR)$(INFODIR)/emacs.gz; then \ + gzip --quiet --force $(DESTDIR)$(INFODIR)/pillow_doc.info; \ fi \ fi; \ $(INSTALL_INFO) --quiet --section "Programming Languages" --entry="`cat pillow_doc.infoindex`" pillow_doc.info $(INFODIR)/dir +info: yap.info + +yap.info: $(srcdir)/docs/yap.tex + $(MAKEINFO) $(srcdir)/docs/yap.tex + +html: yap.html + +yap.html: $(srcdir)/docs/yap.tex + $(TEXI2HTML) $(srcdir)/docs/yap.tex + +dvi: yap.dvi + +yap.dvi: $(srcdir)/docs/yap.tex + $(TEXI2DVI) $(srcdir)/docs/yap.tex + +ps: yap.ps + +yap.ps: $(srcdir)/docs/yap.dvi + dvips -o yap.ps $(srcdir)/docs/yap + +pdf: yap.pdf + +yap.pdf: $(srcdir)/docs/yap.tex + $(TEXI2PDF) $(srcdir)/docs/yap.tex + +clean_docs: + rm -f *.aux *.ca *.cas *.cn *.cns *.cp *.cps *.cy *.cys *.dvi *.fn *.fns *.ky *.log *.sa *.sas *.sn *.sns *.sy *.sys *~ *.tp *.vr *.toc *.pg + +realclean_docs: clean_docs + rm -f yap.ps yap.html yap_toc.html yap.pdf yap.info* + + # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/changes4.3.html b/changes4.3.html index cd779dd87..34e912003 100644 --- a/changes4.3.html +++ b/changes4.3.html @@ -4,6 +4,25 @@

Changes in YAP4.3

+

Yap-4.3.19:

+ +

Yap-4.3.18: