view lwlib/Imakefile @ 31383:860d7ac182e3

(vc-rcs-show-log-entry): New function. (vc-rcs-checkin, vc-rcs-checkout): Don't set all properties. (vc-rcs-register): If there is no RCS subdir, ask the user whether to create one. (vc-rcs-state-heuristic): Use file-ownership-preserved-p. (vc-rcs-checkout): Remove the error-handling for missing-rcs. (vc-rcs-state-heuristic): Don't use file-writable-p. (vc-rcs-print-log): Insert in the current buffer. (vc-rcs-diff): Insert in the current buffer and remove unused arg CMP. (vc-rcs-workfile-unchanged-p): Use vc-do-command instead of vc-simple-command. (vc-rcs-fetch-master-state): Removed check for unlocked-changes to avoid doing a diff when opening a file. (vc-rcs-state): Added check for unlocked-changes. (vc-rcs-header): Escape Id. (vc-rcs-workfile-unchanged-p): Remove optional arg VERSION. (vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific version. (vc-rcs-state-heuristic): Use file-writable-p instead of comparing userids. (vc-rcs-fetch-master-state): Handle the case where rcs is missing. Simplify the logic by eliminating unreachable code. (vc-rcs-diff): Only pass `2' to vc-do-command if necessary and just do a recursive call if we need to retry. (vc-rcs-checkout): Handle the case where rcs is missing by making the buffer read-write if requested and re-signalling the error. (vc-rcs-find-most-recent-rev): New function. The code derives from the old vc-parse-buffer but uses the revision number rather than the date (much easier to compare robustly). (vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the locking-user more directly. Check strict locking and set checkout-model appropriately. (vc-rcs-parse-locks): Remove. (vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the new vc-parse-buffer (and vc-rcs-find-most-recent-rev). (vc-rcs-system-release): Use with-current-buffer and vc-parse-buffer. (vc-rcs-register, vc-rcs-checkout): Use with-current-buffer. Merge in code from vc-rcs-hooks.el. Don't require 'vc anymore. (vc-rcs-responsible-p): Use expand-file-name instead of concat and file-directory-p instead of file-exists-p. (vc-rcs-exists): Remove. (vc-rcs-header): New var. Update Copyright. (vc-rcs-rename-file): New function. (vc-rcs-diff): Remove unused `backend' variable. (vc-rcs-clear-headers): New function; code moved here from vc-clear-headers in vc.el. (tail): Provide vc-rcs and remove vc-rcs-logentry-check. (vc-rcs-register): Parse command output to find master file name and workfile version. (vc-rcs-checkout): Removed call to vc-file-clear-masterprops. Require vc and vc-rcs-hooks. (vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks. (vc-rcs-backend-release-p): Remove (use vc-rcs-release-p). (vc-release-greater-or-equal-p): Move from vc. (vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates. (vc-rcs-checkout): Add a missing `new-version' argument in the call to vc-rcs-latest-on-branch-p. Hopefully that was the right one. (vc-rcs-steal-lock): Renamed from `vc-rcs-steal'. Updated everything to use `vc-checkout-model'. (vc-rcs-backend-release-p): function added. other stuff updated to reference this function instead of the old `vc-backend-release-p'. (vc-rcs-logentry-check): Function added. (vc-rcs-checkin, vc-rcs-previous-version) (vc-rcs-checkout): Name space cleaned up. No more revision number crunching function names that are not prefixed with vc-rcs. (vc-rcs-checkout-model): Function added. References to `vc-checkout-model' replaced. (vc-rcs-admin): Added the query-only option as required by the vc.el file. (vc-rcs-exists): Function added. (vc-*-checkout): Use with-temp-file instead of /bin/sh. Merged from mainline (vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el. (vc-rcs-latest-on-branch-p, vc-rcs-trunk-p) (vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part) (vc-rcs-previous-version): Functions added. (vc-rcs-diff): Function added. (vc-rcs-checkout) Bug (typo) found and fixed. (vc-rcs-register-switches) Variable `vc-rcs-register-switches' added. Require vc when compiling. (vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge) (vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert) (vc-rcs-checkin): New functions (code from vc.el). (vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout): Doc fix. (vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release). (vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part) (vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release) (vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions from vc.el. (vc-rcs-system-release): Renamed from vc-rcs-backend-release.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 04 Sep 2000 19:47:43 +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