view lwlib/Imakefile @ 31384:f6cb7dfe5e7c

(vc-cvs-show-log-entry): New function. (vc-cvs-stay-local): Allow it to be a hostname regexp as well. (vc-cvs-remote-p): Renamed to vc-cvs-stay-local-p. Handle hostname regexps. Updated all callers. (vc-cvs-responsible-p): Handle directories as well. (vc-cvs-could-register): New function. (vc-cvs-retrieve-snapshot): Parse "cvs update" output, keep file properties up-to-date. (vc-cvs-checkout): Do the right thing when the workfile does not exist. (vc-cvs-registered): Use new function vc-cvs-parse-entry to do the actual work. (vc-cvs-remote-p): Allow FILE to be a directory, too. (vc-cvs-dir-state): New function. (vc-cvs-dir-state-heuristic): New function, subroutine of the above. (vc-cvs-parse-entry): New function, also to be used in vc-cvs-registered. (vc-cvs-checkout): Slight restructuring to make the control-flow more clear and to avoid running `cvs' twice. (vc-cvs-workfile-version): Removed comment that this is not reached. It is. (vc-cvs-merge): Set state to 'edited after merge. (vc-cvs-merge-news): Set workfile version to nil if not known. (vc-cvs-latest-on-branch-p): Recommented. Candidate for removal. (vc-cvs-checkin): Raise the max-correct status from 0 to 1. Make sure to switch to *vc* before looking for an error message. Use vc-parse-buffer. (vc-cvs-create-snapshot): Swap DIR and NAME. (vc-cvs-retrieve-snapshot): New function (untested). (vc-cvs-stay-local): Default to t. (vc-cvs-remote-p): New function and property. (vc-cvs-state): Stay local only if the above is t. (vc-handle-cvs): Removed. (vc-cvs-registered): Don't check vc-handle-cvs -- it should all be done via vc-handled-backends now. (vc-cvs-header): Escape Id. (vc-cvs-state, vc-cvs-fetch-status): Use with-temp-file. Use the new BUFFER=t argument to vc-do-command. (vc-cvs-print-log, vc-cvs-diff): Insert in the current buffer. (vc-cvs-state): Use vc-do-command instead of vc-simple-command. (vc-cvs-diff): Remove unused and unsupported argument CMP. (vc-cvs-registered): Obey vc-handle-cvs. (vc-cvs-registered): Use with-temp-buffer. Reorder extraction of fields and call to file-attributes because of a temporary bug in rcp.el. (vc-cvs-fetch-status): Use with-current-buffer. Merge in code from vc-cvs-hooks.el. (proto vc-cvs-registered): Require 'vc-cvs instead of 'vc-cvs-hooks. Don't require 'vc anymore. (vc-cvs-responsible-p): Use expand-file-name instead of concat and file-directory-p instead of file-exists-p. (vc-cvs-create-snapshot): New function, replacing vc-cvs-assign-name. (vc-cvs-assign-name): Remove. (vc-cvs-header): New var. Update Copyright. (vc-cvs-diff): Remove unused `backend' variable. (vc-cvs-checkout): Only toggle read-only if the buffer is setup right. (tail): Provide vc-cvs. (vc-cvs-merge-news, vc-cvs-checkout): Removed call to vc-file-clear-masterprops. (vc-cvs-state): Typo. (vc-cvs-merge-news): Return the status code rather than the error msg. (vc-cvs-state): Don't overwrite a non-heuristic state with a heuristic one. (vc-cvs-merge-news): Just use 'edited for the case with conflicts. (vc-cvs-checkin): Do a trivial parse to set the state in case of error. That allows us to get to 'needs-merge even in the stay-local case. There's still no way to detect 'needs-patch in such a setup (or to force an update for that matter). (vc-cvs-logentry-check): Remove, the default works as well. (vc-cvs-print-log, vc-cvs-diff): Run cvs asynchronously. (vc-cvs-stay-local): Renamed from vc-cvs-simple-toggle. Redocumented. (vc-cvs-state): If locality is wanted, use vc-cvs-state-heuristic. (vc-cvs-toggle-read-only): Removed. (for compiler warnings). (vc-cvs-release, vc-cvs-system-release): Remove. (vc-cvs-use-edit, vc-cvs-simple-toggle): New config variables. (vc-cvs-dired-state-info): Use `cvs-state' and slightly different status symbols. (vc-cvs-parse-status, vc-cvs-state): Move from vc-cvs-hooks.el. (vc-cvs-toggle-read-only): First cut at a function to allow a cvs-status-free vc-toggle-read-only. (vc-cvs-merge-news): Move from cvs-merge-news in vc.el. (vc-cvs-checkin): Use vc-recompute-state+vc-state instead of vc-cvs-status. Also set vc-state rather than vc-locking-user. (vc-cvs-checkout): Modify access rights directly if the user requested not to use `cvs edit'. And refresh the mode line. (if workfile' that got lost when the code was extracted from vc.el. And merged the tail with the rest of the code (not possible in the old vc.el where the tail was shared among all backends). And explicitly set the state to 'edited if `writable' is set. (vc-cvs-revert,vc-cvs-checkout): References to `vc-checkout-model' updated to `vc-cvs-update-model'. (vc-cvs-logentry-check): Function added. (vc-cvs-revert,vc-cvs-checkout): Function calls to `vc-checkout-required' updated to `vc-cvs-uses-locking'. (vc-cvs-admin): Added the query-only option as required by the vc.el file. (vc-cvs-annotate-difference): Updated to handle beginning of annotate buffers correctly. Rename `vc-uses-locking' to `vc-checkout-required'. Rename the `locked' state to `reserved'. (vc-cvs-annotate-difference): Handle possible millenium problem (merged from mainline). Split the annotate feature into a BACKEND-specific part and moved the non-BACKEND stuff to vc.el. (vc-cvs-latest-on-branch-p): Function added. (vc-cvs-revert): Merged and adapted "unedit" patch from main line. (vc-cvs-diff): Function added. (vc-cvs-checkout): Function `vc-cvs-checkout' added. Require vc when compiling. (vc-cvs-register-switches): Doc fix. (vc-annotate-color-map, vc-annotate-menu-elements): Fix custom type. (vc-cvs-print-log, vc-cvs-assign-name, vc-cvs-merge) (vc-cvs-check-headers, vc-cvs-steal, vc-cvs-revert, vc-cvs-checkin): New functions (code from vc.el). (vc-annotate-display-default): Fix interactive spec. (vc-annotate-time-span): Doc fix. Moved the annotate functionality from vc.el. (vc-cvs-admin, vc-cvs-fetch-status): Added from vc.el. (vc-cvs-system-release): Renamed from vc-cvs-backend-release. (vc-cvs-release): Moved from vc.el. (vc-cvs-backend-release): New function. (vc-cvs-dired-state-info, vc-cvs-fetch-status): Moved from vc.el and renamed.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 04 Sep 2000 19:48:04 +0000
parents 648d04be6a9c
children
line wrap: on
line source

/**/# Imakefile file for liblw.a, Copyright (c) 1992-1993 Lucid, Inc.

/*
 *  If you have Motif and want to provide support for Motif widgets in lwlib,
 *  then define USE_MOTIF.
 *
 *  If you have OpenLook and want to provide support for OpenLook widgets in
 *  lwlib, then define USE_OLIT.
 *
 *  Otherwise, define USE_LUCID to use Lucid's own Motif-lookalike widgets,
 *  which are included in this directory.
 *
 *  You cannot define USE_MOTIF and USE_OLIT at the same time, but USE_LUCID
 *  may be defined along with either of the other two.
 *
 *  The OLIT menubar is slow, and possibly buggy.  We recommend against using
 *  it unless you'd like to try to improve it (which we encourage.)
 *
 *  The Lucid menubar is much faster than the Motif menubar, but is missing
 *  a few features (most notably stay-up menus and keyboard traversal.)  But
 *  since it has the Motif look-and-feel, we recommend using it even if you
 *  have Motif.
 *
 *  Currently, only the Motif widgets provide support for dialog boxes.  If
 *  you don't have Motif, you will not be able to pop up dialog boxes from
 *  emacs.  If you define both USE_LUCID and USE_MOTIF, then the menus will
 *  be implemented with Lucid widgets, and the dialog boxes will be 
 *  implemented with Motif widgets.
 *
 *  It shouldn't take much work to add support for non-Motif dialog boxes;
 *  all that one need do is add code that implements Athena versions of the 
 *  xm_create_dialog(), xm_update_one_widget(), and xm_update_one_value()
 *  routines in lwlib-Xm.c.  If you do this, please send us the code.
 *
 *  If you have your X11 source tree online, then you should define 
 *  INCLUDE_EXTENSIONS to cause this library to contain some useful functions
 *  which Xt should provide but doesn't.  You can only do this if you have
 *  the source tree online, because these functions require access to internal
 *  Xt data structures that are not defined in the exported header files.
 *  If you define INCLUDE_EXTENSIONS, then the variable $TOP must point at the
 *  root of the X11 source tree.
 *
 *  To build a "shared" version of lwlib as well, define BUILD_SHARED_LIB.
 *  If INCLUDE_EXTENSIONS is defined, and you want to link with a dynamic
 *  version of Xt, it may be necessary to build a shared version of lwlib as
 *  well, as the X libraries sometimes put *different code* in the dynamic
 *  and shared versions of their libraries, for some reason I don't understand.
 *
 *  Remember, if you build and install a shared version of lwlib, you may need
 *  to run ldconfig(8) before anything will realize that it exists.
 *
 *  To compile with support for Lucid's Energize Programming System, you must
 *  define all of ENERGIZE, USE_LUCID, USE_MOTIF, and INCLUDE_EXTENSIONS.
 */

#define USE_LUCID
/* #define USE_MOTIF */
/* #define USE_OLIT */
/* #define BUILD_SHARED_LIB */
/* #define ENERGIZE */

/* #define INCLUDE_EXTENSIONS */


#ifdef INCLUDE_EXTENSIONS	/* this is where it is at our site */
            TOP = /$(WHICH_X)/mit
#endif

/* 
 *
 *  You shouldn't need to edit anything below this point.
 *
 */

#ifdef ENERGIZE
# if !defined(USE_LUCID) || !defined(USE_MOTIF) || !defined(INCLUDE_EXTENSIONS)
ERROR!  Energize requires Lucid widgets, Motif, and X Extensions.
# endif
#endif /* ENERGIZE */


#ifdef BUILD_SHARED_LIB
SOLWREV=1.0
#endif

#if (ProjectX == 4)
    STD_DEFINES = LibraryDefines
    CDEBUGFLAGS = LibraryCDebugFlags
    EXT_DEFINES = -DTHIS_IS_X11R4
        WHICH_X = x11r4
#define SpecialLibObjectRule SpecialObjectRule
#else /* !4 */
#if (ProjectX == 5)
#ifdef BUILD_SHARED_LIB
# define DoSharedLib YES
# define DoNormalLib YES
#endif
#include <Library.tmpl>
    EXT_DEFINES = -DTHIS_IS_X11R5 -DINCLUDE_ALLOCA_H
        WHICH_X = x11r5
#else /* !5 */
    EXT_DEFINES = "ERROR!  Imakefile was unable to determine whether this is X11r4 or X11r5."
#endif /* !5 */
#endif /* !4 */

     LUCID_SRCS = lwlib-Xlw.c xlwmenu.c
     LUCID_OBJS = lwlib-Xlw.o xlwmenu.o
     MOTIF_SRCS = lwlib-Xm.c
     MOTIF_OBJS = lwlib-Xm.o
      OLIT_SRCS = lwlib-Xol.c lwlib-Xol-mb.c
      OLIT_OBJS = lwlib-Xol.o lwlib-Xol-mb.o

#ifdef INCLUDE_EXTENSIONS
       EXT_SRCS = dispatch.c xrdb-cpp.c xrdb.c
       EXT_OBJS = dispatch.o xrdb-cpp.o xrdb.o
#endif

#if (defined(USE_MOTIF) && defined(USE_OLIT))
TOOLKIT_DEFINES = "ERROR!  You cannot define both USE_MOTIF and USE_OLIT at the same time (in Imakefile)."
#else
# if (defined(USE_MOTIF) && defined(USE_LUCID))
TOOLKIT_DEFINES = -DUSE_MOTIF -DUSE_LUCID
   TOOLKIT_SRCS = $(MOTIF_SRC) $(LUCID_SRCS)
   TOOLKIT_OBJS = $(MOTIF_OBJS) $(LUCID_OBJS)
# else
#  if (defined(USE_OLIT) && defined(USE_LUCID))
        DEFINES = -DUSE_OLIT -DUSE_LUCID
   TOOLKIT_SRCS = $(OLIT_SRC) $(LUCID_SRCS)
   TOOLKIT_OBJS = $(OLIT_OBJS) $(LUCID_OBJS)
#  else
#   if defined(USE_OLIT)
TOOLKIT_DEFINES = -DUSE_OLIT
   TOOLKIT_SRCS = $(OLIT_SRC)
   TOOLKIT_OBJS = $(OLIT_OBJS)
#   else
#    if defined(USE_MOTIF)
TOOLKIT_DEFINES = -DUSE_MOTIF
   TOOLKIT_SRCS = $(MOTIF_SRC)
   TOOLKIT_OBJS = $(MOTIF_OBJS)
#    else
#     if defined(USE_LUCID)
TOOLKIT_DEFINES = -DUSE_LUCID
   TOOLKIT_SRCS = $(LUCID_SRC)
   TOOLKIT_OBJS = $(LUCID_OBJS)
#     else
TOOLKIT_DEFINES = "ERROR!  At least one of USE_MOTIF, USE_LUCID or USE_OLIT must be defined in Imakefile."
#     endif
#    endif
#   endif
#  endif
# endif
#endif

#ifdef ENERGIZE
# ifndef USE_MOTIF
     EZ_OBJS = "ERROR! ENERGIZE requires USE_MOTIF to be defined in Imakefile."
# else
        EZ_OBJS = energize/blpsheet.o energize/build.o energize/classbr_ps.o \
                  energize/ctreebr_ps.o energize/debuggerps.o \
                  energize/editmode.o energize/leb_psheet.o \
                  energize/projectdisp.o energize/projectps.o \
                  energize/search.o energize/target.o
      ENERGIZEP = -DENERGIZE
# endif
#endif

           SRCS = lwlib.c $(TOOLKIT_SRCS) lwlib-utils.c $(EXT_SRCS)
           OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o $(EXT_OBJS) $(EZ_OBJS)
      EXT_FLAGS = -I$(TOOLKITSRC) $(EXT_DEFINES)
        LIBNAME = liblw.a


#if defined(ENERGIZE) && defined(BUILD_SHARED_LIB)
all::
	@if [ ! -d shared ]; then mkdir shared; else exit 0; fi
	@if [ ! -d energize/shared ]; then mkdir energize/shared; \
	else exit 0; fi
	@if [ ! -h shared/energize ]; \
	then cd shared ; ln -s ../energize/shared energize ; \
	else exit 0; fi

clean::
	$(RM) shared/energize
#endif


#ifdef BUILD_SHARED_LIB
# if (ProjectX == 4)
SharedLibraryObjectRule ()
NormalSharedLibraryTarget(lw,$(SOLWREV),$(OBJS))
# else   /* X != 4 */
LibraryObjectRule ()
SharedLibraryTarget(lw,$(SOLWREV),$(OBJS),shared,..)
# endif /* X != 4 */
#else  /* !BUILD_SHARED_LIB */
NormalLibraryObjectRule ()
#endif /* !BUILD_SHARED_LIB */

NormalLibraryTarget (lw,$(OBJS))
MakefileSubdirs (energize)
DependTarget ()

#ifdef ENERGIZE

energize/Imakefile:
	-mkdir energize
	-(cd energize ; sh -c "ln -s ../$(VPATH)/energize/* .")

/* #### we should automatically edit BUILD_SHARED_LIB into/out of the energize
   Imakefile, since that's the only thing down there that changes */
energize/Makefile: energize/Imakefile Imakefile
	$(MAKE) $(MFLAGS) Makefiles

Makefile::
	$(RM) energize/Makefile

$(EZ_OBJS): energize/Makefile
	${RM} $@ ; cd energize ; $(MAKE) $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)"

clean::
	cd energize ; $(MAKE) $(MFLAGS) clean

#endif

#if defined(BUILD_SHARED_LIB) && (ProjectX == 4)
# define LWObjectRule SpecialSharedObjectRule
#else
# define LWObjectRule SpecialLibObjectRule
#endif

CPPDEFS=-DCPP_PROGRAM=\"CppCmd\"

LWObjectRule (lwlib.o, lwlib.c, $(TOOLKIT_DEFINES))
LWObjectRule (dispatch.o, dispatch.c, $(EXT_FLAGS))
LWObjectRule (xrdb-cpp.o, xrdb-cpp.c, $(EXT_FLAGS) "$(CPPDEFS)")
LWObjectRule (xrdb.o,     xrdb.c,     $(EXT_FLAGS))
LWObjectRule (lwlib-Xm.o, lwlib-Xm.c, $(ENERGIZEP))

lwlib-utils.o: lwlib-utils.h
lwlib.o:       lwlib.h lwlib-internal.h
lwlib-Xlw.o:   lwlib.h lwlib-internal.h
lwlib-Xm.o:    lwlib.h lwlib-internal.h lwlib-utils.h
lwlib-Xol.o:   lwlib.h lwlib-internal.h
lwlib-Xol-mb.o: lwlib-Xol-mb.h lwlib-Xol-mbP.h