## Makefile for lib-src subdirectory in XEmacs. ## Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc. ## Copyright (C) 1996, 1997 Sun Microsystems, Inc. ## This file is part of XEmacs. ## XEmacs 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 2, or (at your option) any ## later version. ## XEmacs 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 XEmacs; see the file COPYING. If not, write to ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ## Boston, MA 02111-1307, USA. ## Note: FSF Makefile.in.in does something weird so that the comments ## above a certain point in this file are in shell format instead of ## in C format. How the hell is this supposed to work? */ ## For performance and consistency, no built-in rules .SUFFIXES: .SUFFIXES: .c .h .o ## ==================== Things "configure" will edit ==================== @SET_MAKE@ SHELL = /bin/sh RM = rm -f pwd = /bin/pwd CC=@CC@ CPP=@CPP@ CFLAGS=@CFLAGS@ CPPFLAGS=@CPPFLAGS@ LDFLAGS=@LDFLAGS@ ALLOCA=@ALLOCA@ LN_S=@LN_S@ version=@version@ ## This will be the name of the generated binary and is set automatically ## by configure. PROGNAME=@PROGNAME@ ## ==================== Where To Install Things ==================== prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ srcdir=@srcdir@ datadir=@datadir@ instvardir=@instvardir@ top_srcdir=@top_srcdir@ archlibdir=@archlibdir@ configuration=@configuration@ moduledir=@moduledir@ sitemoduledir=@sitemoduledir@ ## ==================== Utility Programs for the Build ================= INSTALL = @install_pp@ @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ ## ========================== Lists of Files =========================== #define NO_SHORTNAMES #define NOT_C_CODE #include "../src/config.h" ## Things that a user might actually run, ## which should be installed in bindir. #ifdef WIN32_NATIVE INSTALLABLES_BASE = etags ctags b2m ootags #else INSTALLABLES_BASE = etags ctags b2m gnuclient ootags #endif INSTALLABLE_SCRIPTS = rcs-checkin gnudoit gnuattach #ifdef HAVE_SHLIB INSTALLABLES = $(INSTALLABLES_BASE) ellcc #else INSTALLABLES = $(INSTALLABLES_BASE) #endif ## Things that Emacs runs internally, or during the build process, ## which should not be installed in bindir. #ifdef WIN32_NATIVE UTILITIES= make-path wakeup profile make-docfile digest-doc \ sorted-doc movemail cvtmail yow i hexl \ mmencode minitar #else UTILITIES= make-path wakeup profile make-docfile digest-doc \ sorted-doc movemail cvtmail fakemail yow hexl \ gnuserv mmencode #endif ## These need to be conditional on I18N3 make-msgfile make-po ## Like UTILITIES, but they are not system-dependent, and should not be ## deleted by the distclean target. GEN_SCRIPTS = rcs2log vcdiff gzip-el.sh PKG_SCRIPTS = add-big-package.sh SCRIPTS = $(GEN_SCRIPTS) $(PKG_SCRIPTS) EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} SOURCES = COPYING ChangeLog Makefile.in.in README aixcc.lex emacs.csh \ makedoc.com *.[chy] $(SCRIPTS) ## Additional -D flags for movemail (add to MOVE_FLAGS if desired): ## MAIL_USE_POP Support mail retrieval from a POP mailbox. ## MAIL_USE_MMDF Support MMDF mailboxes. ## MAIL_USE_FLOCK Use flock for file locking (see the comments ## about locking in movemail.c) ## MAIL_UNLINK_SPOOL Unlink the user spool mailbox after reading ## it (instead of just emptying it). ## KERBEROS Support Kerberized POP. ## KRB5 Support Kerberos Version 5 pop instead of ## Version 4 (define this in addition to ## KERBEROS). ## HESIOD Support Hesiod lookups of user mailboxes. ## MAILHOST A string, the host name of the default POP ## mail host for the site. MOVE_FLAGS= ## ## Additional libraries for movemail: ## For KERBEROS ## MOVE_LIBS= -lkrb -ldes -lcom_err ## For KERBEROS + KRB5 ## MOVE_LIBS= -lkrb5 -lcrypto -lisode -lcom_err ## Add "-lhesiod" if HESIOD is defined. MOVE_LIBS= ## ========================== start of cpp stuff ======================= #ifdef USE_GNU_MAKE vpath %.c @srcdir@ vpath %.h @srcdir@ #else VPATH=@srcdir@ #endif c_switch_general=@c_switch_general@ c_switch_all=@c_switch_all@ ld_switch_general=@ld_switch_general@ ld_switch_all=@ld_switch_all@ ld_libs_general=@ld_libs_general@ ## We need to #define emacs to get the right versions of some files. ## To understand the order of -I flags, consider what happens if you run ## ./configure in the source tree, and then run ## $(srcdir).2.26/configure in some other build tree. ## Where will the generated files like config.h be included from? ## This is also why you _must_ use <...> instead of "..." ## when #include'ing generated files. cppflags = -I. -I../src -I$(srcdir) -I$(top_srcdir)/src $(CPPFLAGS) cflags = $(CFLAGS) $(cppflags) $(c_switch_general) ldflags = $(LDFLAGS) $(ld_switch_general) $(ld_libs_general) ## This is the default compilation command. ## But we should never rely on it, because some make version ## failed to find it for getopt.o. ## Using an explicit command made it work. .c.o: ${CC} -c $(cflags) $< .PHONY : all maybe-blessmail install uninstall all: ${UTILITIES} ${INSTALLABLES} srcdir-symlink.stamp ## Make symlinks for shell scripts if using --srcdir srcdir-symlink.stamp: for f in ${SCRIPTS}; do \ if test ! -r $$f; then ${LN_S} ${srcdir}/$$f $$f; fi; \ done; \ touch $@; #undef MOVEMAIL_NEEDS_BLESSING #if !defined (MAIL_USE_FLOCK) && ! defined (MAIL_USE_LOCKF) #define MOVEMAIL_NEEDS_BLESSING blessmail = blessmail blessmail: ../src/xemacs -batch -l ../lisp/blessmail.el chmod +x $@ #endif /* movemail needs blessing */ maybe-blessmail: $(blessmail) #ifdef MOVEMAIL_NEEDS_BLESSING ## Do not charge ahead and do it! Let the installer decide. ## ./blessmail ${archlibdir}/movemail @if test `wc -l