xemacs-packages / XEmacs.rules

# Configuration constants for building XEmacs packages
# Copyright (C) 1997 Free Software Foundation 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.

# Requires XEmacs 21.0-beta19 or greater

# Developer configurable portion

# path to XEmacs-21.0
XEMACS = xemacs

# Build Mule?  Comment for no Mule
BUILD_MULE=t

# Ensure vanilla locale when building
LANG=C

# path to BSD install
INSTALL = ginstall -c

# path to GNU tar
TAR = tar

# Stuff tar should never archive
EXCLUDES = --exclude 'CVS' --exclude '*~' --exclude '*.orig' --exclude '*.rej'

VANILLA = -vanilla

# path to makeinfo
MAKEINFO = makeinfo

# path to directory to install packages in
# This doesn't work and may never work.  For now use
# make STAGING=/where/your/runtime/packages/are install
PKGDIR = /usr/local/lib/xemacs/xemacs-packages

# path to directory for builing kits for distribution
STAGING = /tmp/staging

# path to GNU cp, use the latter if no GNU cp is available.
RCOPY = cp -a
# RCOPY = cp -pR

# Only in rare cases will you need to override this
ifeq '$(AUTOLOAD_PATH)' ''
AUTOLOAD_PATH = .
endif

# Override or add to this in the package Makefile if necessary
GENERATED = $(AUTOLOAD_PATH)/auto-autoloads.elc

# SOURCE_FILES_TO_COPY = *.el*
SOURCE_FILES_TO_COPY = $(ELCS) $(ELCS:.elc=.el) \
	$(MULE_ELCS) $(MULE_ELCS:.elc=.el) \
	$(GENERATED) $(GENERATED:.elc=.el) $(AUTOLOAD_PATH)/_pkg.el

# Non configurable portion follows

MANIFEST = pkginfo/MANIFEST.$(PACKAGE)

.SUFFIXES:
.SUFFIXES: .info .texi .dvi .elc .el

%.info: %.texi
	$(MAKEINFO) $(MAKEINFO_FLAGS) -o $@ $<

%.elc: %.el
	$(XEMACS) -no-autoloads -batch $(PRELOADS) -l ../../package-compile.el -- $(REQUIRES) -- $<

all:: $(AUTOLOAD_PATH)/_pkg.el

bytecompile:: all

dist:: srckit binkit package-info

clean::
	rm -f $(ELCS) $(PACKAGE).info* $(AUTOLOAD_PATH)/auto-autoloads.elc \
		$(AUTOLOAD_PATH)/custom-load.elc

mostlyclean: clean

extraclean: clean

distclean: extraclean
	rm -f core *~ $(AUTOLOAD_PATH)/auto-autoloads.el \
		$(AUTOLOAD_PATH)/custom-load.el package-info \
		$(AUTOLOAD_PATH)/_pkg.el

$(AUTOLOAD_PATH)/auto-autoloads.el : $(ELCS:.elc=.el) $(AUTOLOAD_PATH)/_pkg.el
	$(XEMACS) $(VANILLA) -batch \
		-eval "(setq autoload-package-name \"$(PACKAGE)\")" \
		-l autoload -f batch-update-directory $(AUTOLOAD_PATH)
	@rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~

$(AUTOLOAD_PATH)/custom-load.el : $(ELCS:.elc=.el)
	$(XEMACS) $(VANILLA) -batch -l cus-dep \
		-f Custom-make-dependencies $(AUTOLOAD_PATH)

package-info : package-info.in Makefile $(AUTOLOAD_PATH)/_pkg.el \
			$(STAGING)/$(PACKAGE)-$(VERSION)-pkg.tar.gz
	$(XEMACS) $(VANILLA) -batch \
		-l package-info.el -f batch-update-package-info \
		'$(VERSION)' $(STAGING)/$(PACKAGE)-$(VERSION)-pkg.tar.gz \
		'$(REQUIRES)' \
		'$(AUTHOR_VERSION)' '$(MAINTAINER)' '$(CATEGORY)'
	$(XEMACS) $(VANILLA) -batch \
		-l ../../hack-package-index.el -f batch-hack-package-index \
			$(PACKAGE) package-info $(STAGING)/package-index

$(STAGING)/$(PACKAGE)-$(VERSION)-pkg.tar.gz: $(STAGING)/$(MANIFEST)
	@(cd $(STAGING); \
	rm -f $(PACKAGE)-$(VERSION)-pkg.tar*)
	(cd $(STAGING); \
	$(TAR) $(EXCLUDES) -cf $(PACKAGE)-$(VERSION)-pkg.tar \
		`cat $(MANIFEST)`; \
	gzip -v9 $(PACKAGE)-$(VERSION)-pkg.tar)

$(AUTOLOAD_PATH)/_pkg.el: Makefile
	@echo Creating $(AUTOLOAD_PATH)/_pkg.el
	@echo ";;;###autoload" > $(AUTOLOAD_PATH)/_pkg.el
	@echo "(package-provide '$(PACKAGE)" >> $(AUTOLOAD_PATH)/_pkg.el
	@echo "		 :version $(VERSION)" >> $(AUTOLOAD_PATH)/_pkg.el
	@echo "		 :type '$(PKG_TYPE))" >> $(AUTOLOAD_PATH)/_pkg.el

.PHONY: srckit-std
.PHONY: binkit-sourceonly binkit-sourceinfo binkit-sourcedata binkit-sourcedatainfo
.PHONY: bindist install autoloads

bindist: binkit package-info

install: binkit

autoloads: $(AUTOLOAD_PATH)/auto-autoloads.el

srckit-std: distclean
	if [ ! -d $(STAGING) ]; then mkdir -p $(STAGING); fi
	(cd ../..; \
	rm -f $(STAGING)/$(PACKAGE)-$(VERSION)-src.tar*; \
	$(TAR) $(EXCLUDES) -cf $(STAGING)/$(PACKAGE)-$(VERSION)-src.tar $(CATEGORY)/$(PACKAGE))
	gzip -v9 $(STAGING)/$(PACKAGE)-$(VERSION)-src.tar

binkit-common: all
	(if test -d $(STAGING); then \
		cd $(STAGING); \
		if test -f $(MANIFEST); then \
			rm -rf `cat $(MANIFEST)`; \
		fi; \
	fi;)
#ifneq '$(ELCS)' ''
	@-mkdir -p $(STAGING)/lisp/$(PACKAGE)
#endif
ifneq '$(ELCS_1)' ''
	@-mkdir -p $(STAGING)/lisp/$(ELCS_1_DEST)
endif
ifneq '$(INFO_FILES)' ''
	@-mkdir -p $(STAGING)/info
	@-mkdir -p $(STAGING)/man/$(PACKAGE)
endif
ifneq '$(DATA_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_DEST)
endif
ifneq '$(DATA_1_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_1_DEST)
endif
ifneq '$(DATA_2_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_2_DEST)
endif
ifneq '$(DATA_3_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_3_DEST)
endif
ifneq '$(DATA_4_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_4_DEST)
endif
ifneq '$(DATA_5_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_5_DEST)
endif
ifneq '$(DATA_6_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_6_DEST)
endif
ifneq '$(DATA_7_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_7_DEST)
endif
ifneq '$(DATA_8_FILES)' ''
	@-mkdir -p $(STAGING)/etc/$(DATA_8_DEST)
endif
ifneq '$(LIBSRC_FILES)' ''
	@-mkdir -p $(STAGING)/lib-src
endif
	@-mkdir -p $(STAGING)/pkginfo
#ifneq '$(ELCS)' ''
	$(RCOPY) ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES) $(STAGING)/lisp/$(PACKAGE)
#endif
ifneq '$(ELCS_1)' ''
	$(RCOPY) $(ELCS_1_FILES) $(STAGING)/lisp/$(ELCS_1_DEST)
endif
ifneq '$(INFO_FILES)' ''
	$(RCOPY) $(INFO_FILES) $(STAGING)/info
	$(RCOPY) $(TEXI_FILES) $(STAGING)/man/$(PACKAGE)
endif
ifneq '$(DATA_FILES)' ''
	$(RCOPY) $(DATA_FILES) $(STAGING)/etc/$(DATA_DEST)
endif
ifneq '$(DATA_1_FILES)' ''
	$(RCOPY) $(DATA_1_FILES) $(STAGING)/etc/$(DATA_1_DEST)
endif
ifneq '$(DATA_2_FILES)' ''
	$(RCOPY) $(DATA_2_FILES) $(STAGING)/etc/$(DATA_2_DEST)
endif
ifneq '$(DATA_3_FILES)' ''
	$(RCOPY) $(DATA_3_FILES) $(STAGING)/etc/$(DATA_3_DEST)
endif
ifneq '$(DATA_4_FILES)' ''
	$(RCOPY) $(DATA_4_FILES) $(STAGING)/etc/$(DATA_4_DEST)
endif
ifneq '$(DATA_5_FILES)' ''
	$(RCOPY) $(DATA_5_FILES) $(STAGING)/etc/$(DATA_5_DEST)
endif
ifneq '$(DATA_6_FILES)' ''
	$(RCOPY) $(DATA_6_FILES) $(STAGING)/etc/$(DATA_6_DEST)
endif
ifneq '$(DATA_7_FILES)' ''
	$(RCOPY) $(DATA_7_FILES) $(STAGING)/etc/$(DATA_7_DEST)
endif
ifneq '$(DATA_8_FILES)' ''
	$(RCOPY) $(DATA_8_FILES) $(STAGING)/etc/$(DATA_8_DEST)
endif
ifneq '$(LIBSRC_FILES)' ''
	$(RCOPY) $(LIBSRC_FILES) $(STAGING)/lib-src
endif
	(cd $(STAGING); \
	ls -1 $(MANIFEST) > $(MANIFEST))
#ifneq '$(ELCS)' ''
	@(cd $(STAGING); \
	ls -1 lisp/$(PACKAGE)/ChangeLog \
		$(patsubst %, lisp/$(PACKAGE)/%, $(notdir $(SOURCE_FILES_TO_COPY))) \
		$(patsubst %, lisp/$(PACKAGE)/%, $(notdir $(EXTRA_SOURCES))) \
		>> $(MANIFEST))
#endif
ifneq '$(ELCS_1)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, lisp/$(ELCS_1_DEST)/%, $(notdir $(ELCS_1_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(INFO_FILES)' ''
	@(cd $(STAGING); \
	ls -1 man/$(PACKAGE)/* \
		$(patsubst %,info/%, $(notdir $(INFO_FILES))) >> $(MANIFEST))
endif
ifneq '$(DATA_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(DATA_1_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_1_DEST)/%, $(notdir $(DATA_1_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(DATA_2_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_2_DEST)/%, $(notdir $(DATA_2_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(DATA_3_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_3_DEST)/%, $(notdir $(DATA_3_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(DATA_4_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_4_DEST)/%, $(notdir $(DATA_4_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(DATA_5_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_5_DEST)/%, $(notdir $(DATA_5_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(DATA_6_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_6_DEST)/%, $(notdir $(DATA_6_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(DATA_7_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_7_DEST)/%, $(notdir $(DATA_7_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(DATA_8_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %, etc/$(DATA_8_DEST)/%, $(notdir $(DATA_8_FILES))) \
		>> $(MANIFEST))
endif
ifneq '$(LIBSRC_FILES)' ''
	@(cd $(STAGING); \
	ls -1 $(patsubst %,lib-src/%, $(notdir $(LIBSRC_FILES))) >> $(MANIFEST))
endif

binkit-sourceonly: binkit-common
#binkit-sourceonly: all
#	-rm -rf $(STAGING)/lisp/$(PACKAGE)
#	-mkdir -p $(STAGING)/lisp/$(PACKAGE)
#	-rm -f $(STAGING)/$(MANIFEST)
#	-mkdir -p $(STAGING)/pkginfo
#	-touch $(STAGING)/$(MANIFEST)
#	$(RCOPY) ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES) $(STAGING)/lisp/$(PACKAGE)
#	(cd $(STAGING); \
#	rm -f $(PACKAGE)-$(VERSION)-pkg.tar*; \
#	ls -1 $(MANIFEST) lisp/$(PACKAGE)/* > $(MANIFEST); \
#	$(TAR) $(EXCLUDES) -cf $(PACKAGE)-$(VERSION)-pkg.tar \
#		$(MANIFEST) lisp/$(PACKAGE); \
#	gzip -v9 $(PACKAGE)-$(VERSION)-pkg.tar)

binkit-sourceinfo: binkit-common
#binkit-sourceinfo: all
#	-rm -rf $(STAGING)/lisp/$(PACKAGE)
#	-mkdir -p $(STAGING)/lisp/$(PACKAGE)
#	-mkdir -p $(STAGING)/info
#	-(cd $(STAGING)/info; rm -rf $(notdir $(INFO_FILES)))
#	-(cd $(STAGING)/man; rm -rf $(PACKAGE))
#	-mkdir -p $(STAGING)/man/$(PACKAGE)
#	-rm -f $(STAGING)/$(MANIFEST)
#	-mkdir -p $(STAGING)/pkginfo
#	-touch $(STAGING)/$(MANIFEST)
#	$(RCOPY) ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES) $(STAGING)/lisp/$(PACKAGE)
#	$(RCOPY) $(INFO_FILES) $(STAGING)/info
#	$(RCOPY) $(TEXI_FILES) $(STAGING)/man/$(PACKAGE)
#	(cd $(STAGING); \
#	rm -f $(PACKAGE)-$(VERSION)-pkg.tar*; \
#	ls -1 $(MANIFEST) lisp/$(PACKAGE)/* man/$(PACKAGE)/* \
#		$(patsubst %,info/%, $(notdir $(INFO_FILES))) > $(MANIFEST); \
#	$(TAR) $(EXCLUDES) -cf $(PACKAGE)-$(VERSION)-pkg.tar lisp/$(PACKAGE) \
#		$(patsubst %,info/%, $(notdir $(INFO_FILES))) \
#		man/$(PACKAGE) $(MANIFEST); \
#	gzip -v9 $(PACKAGE)-$(VERSION)-pkg.tar)

binkit-sourcedata: binkit-common
#binkit-sourcedata: all
#	-rm -rf $(STAGING)/lisp/$(PACKAGE)
#	-mkdir -p $(STAGING)/lisp/$(PACKAGE)
#	-rm -rf $(patsubst %, $(STAGING)/etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES)))
#	-mkdir -p $(STAGING)/etc/$(DATA_DEST)
#	-rm -f $(STAGING)/$(MANIFEST)
#	-mkdir -p $(STAGING)/pkginfo
#	-touch $(STAGING)/$(MANIFEST)
#	$(RCOPY) ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES) $(STAGING)/lisp/$(PACKAGE)
#	$(RCOPY) $(DATA_FILES) $(STAGING)/etc/$(DATA_DEST)
#	(cd $(STAGING); \
#	rm -f $(PACKAGE)-$(VERSION)-pkg.tar*; \
#	ls -1 lisp/$(PACKAGE)/* \
#		$(patsubst %, etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES))) \
#		$(MANIFEST) > $(MANIFEST); \
#	$(TAR) $(EXCLUDES) -cf $(PACKAGE)-$(VERSION)-pkg.tar lisp/$(PACKAGE) \
#		$(patsubst %, etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES))) \
#		$(MANIFEST); \
#	gzip -v9 $(PACKAGE)-$(VERSION)-pkg.tar)

binkit-sourcedatainfo: binkit-common
#binkit-sourcedatainfo: all
#	-rm -rf $(STAGING)/lisp/$(PACKAGE)
#	-mkdir -p $(STAGING)/lisp/$(PACKAGE)
#	-mkdir -p $(STAGING)/info
#	-(cd $(STAGING)/info; rm -rf $(notdir $(INFO_FILES)))
#	-(cd $(STAGING)/man; rm -rf $(PACKAGE))
#	-mkdir -p $(STAGING)/man/$(PACKAGE)
#	-rm -rf $(patsubst %, $(STAGING)/etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES)))
#	-mkdir -p $(STAGING)/etc/$(DATA_DEST)
#	-rm -f $(STAGING)/$(MANIFEST)
#	-mkdir -p $(STAGING)/pkginfo
#	-touch $(STAGING)/$(MANIFEST)
#	$(RCOPY) ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES) $(STAGING)/lisp/$(PACKAGE)
#	$(RCOPY) $(INFO_FILES) $(STAGING)/info
#	$(RCOPY) $(TEXI_FILES) $(STAGING)/man/$(PACKAGE)
#	$(RCOPY) $(DATA_FILES) $(STAGING)/etc/$(DATA_DEST)
#	(cd $(STAGING); \
#	rm -f $(PACKAGE)-$(VERSION)-pkg.tar*; \
#	ls -1 lisp/$(PACKAGE)/* man/$(PACKAGE)/* \
#		$(patsubst %,info/%, $(notdir $(INFO_FILES))) \
#		$(patsubst %, etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES))) \
#		$(MANIFEST) > $(MANIFEST); \
#	$(TAR) $(EXCLUDES) -cf $(PACKAGE)-$(VERSION)-pkg.tar lisp/$(PACKAGE) \
#		$(patsubst %,info/%, $(notdir $(INFO_FILES))) \
#		man/$(PACKAGE) \
#		$(patsubst %, etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES))) \
#		$(MANIFEST); \
#	gzip -v9 $(PACKAGE)-$(VERSION)-pkg.tar)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.