Here's take 2, complying with the suggestions Andreas had.
Adrian
xemacs-packages/ChangeLog:
2000-06-22 Adrian Aichner <aichner(a)ecf.teradyne.com>
* XEmacs.rules (XEMACS_NATIVE_NT): Determine whether packages are
being built an Native-NT XEmacs.
(PACKAGE_COMPILE): Conditionalize for XEmacs native NT build.
(AUTOLOAD_PACKAGE_NAME): Ditto.
(PKG_TAR_GZ): Ditto.
(PACKAGE_INFO): Ditto.
(%.elc): Use generalized PACKAGE_COMPILE.
($(AUTOLOAD_PATH)/auto-autoloads.el): Use generalized
AUTOLOAD_PACKAGE_NAME.
(package-info): Use generalized PKG_TAR_GZ and PACKAGE_INFO.
xemacs-packages patch:
Index: XEmacs.rules
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/XEmacs.rules,v
retrieving revision 1.17
diff -u -u -r1.17 XEmacs.rules
--- XEmacs.rules 2000/06/02 14:17:21 1.17
+++ XEmacs.rules 2000/06/22 15:45:56
@@ -34,6 +34,10 @@
# Ensure vanilla locale when building
override LANG := C
+XEMACS_NATIVE_NT = \
+$(shell $(XEMACS) $(VANILLA) -batch \
+-eval "(princ (eq system-type 'windows-nt))")
+
# Only in rare cases will you need to override this
ifeq ($(AUTOLOAD_PATH),)
AUTOLOAD_PATH = .
@@ -60,9 +64,15 @@
%.info: %.texi
$(MAKEINFO) $(MAKEINFO_FLAGS) -o $@ $<
-%.elc: %.el
- $(XEMACS) -no-autoloads -batch $(PRELOADS) -l $(XEMACS_PACKAGES_BASE)/package-compile.el
-- $(REQUIRES) -- $<
+ifeq ($(XEMACS_NATIVE_NT),t)
+PACKAGE_COMPILE = \
+"$(shell cygpath --windows $(XEMACS_PACKAGES_BASE)/package-compile.el)"
+else
+PACKAGE_COMPILE = $(XEMACS_PACKAGES_BASE)/package-compile.el
+endif
+%.elc: %.el
+ $(XEMACS) -no-autoloads -batch $(PRELOADS) -l $(PACKAGE_COMPILE) -- $(REQUIRES) --
$<
all:: $(AUTOLOAD_PATH)/_pkg.el
@@ -81,9 +91,15 @@
$(AUTOLOAD_PATH)/custom-load.el package-info \
$(AUTOLOAD_PATH)/_pkg.el
+ifeq ($(XEMACS_NATIVE_NT),t)
+AUTOLOAD_PACKAGE_NAME = (setq autoload-package-name \\\"$(PACKAGE)\\\")
+else
+AUTOLOAD_PACKAGE_NAME = (setq autoload-package-name \"$(PACKAGE)\")
+endif
+
$(AUTOLOAD_PATH)/auto-autoloads.el : $(ELCS:.elc=.el) $(AUTOLOAD_PATH)/_pkg.el
$(XEMACS) $(VANILLA) -batch \
- -eval "(setq autoload-package-name \"$(PACKAGE)\")" \
+ -eval "$(AUTOLOAD_PACKAGE_NAME)" \
-l autoload -f batch-update-directory $(AUTOLOAD_PATH)
@rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
@@ -93,19 +109,25 @@
pkg_tar = $(STAGING)/$(PACKAGE)-$(VERSION)-pkg.tar
+ifeq ($(XEMACS_NATIVE_NT),t)
+PKG_TAR_GZ = "$(shell cygpath --windows $(pkg_tar)).gz"
+PACKAGE_INFO = "$(shell cygpath --windows $(STAGING)/package-index)"
+else
+PKG_TAR_GZ = $(pkg_tar).gz
+PACKAGE_INFO = $(STAGING)/package-index
+endif
+
# Make the $(pkg_tar).gz first, then the $(pkg_tar).bz2
package-info : package-info.in Makefile $(AUTOLOAD_PATH)/_pkg.el \
$(pkg_tar).gz $(pkg_tar).bz2
-
$(XEMACS) $(VANILLA) -batch \
-l package-info.el -f batch-update-package-info \
- '$(VERSION)' $(pkg_tar).gz \
+ '$(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
+ $(PACKAGE) package-info $(PACKAGE_INFO)
ifeq ($(BUILD_TARS),t)
$(pkg_tar): $(STAGING)/$(MANIFEST)
--
Adrian Aichner <adrian(a)xemacs.org>