Date:2010-12-12 12:46:54 (9 years 6 months ago)
Author:David Kühling
Commit:90232b54502d64547cd2888d3208e6a998e8fc10
Message:fix lisp load path. split into multiple packages for quicker update/testing, do not install lisp source files by default. remove images, documentation and other stuff that just bloats the package size.

Files: emacs/Makefile (3 diffs)

Change Details

emacs/Makefile
2121include $(INCLUDE_DIR)/host-build.mk
2222include $(INCLUDE_DIR)/package.mk
2323
24define Package/emacs
24define Package/emacs/Default
25  SUBMENU:=Emacs
2526  SECTION:=utils
2627  CATEGORY:=Utilities
27  DEPENDS:=+libncurses
2828  TITLE:=The GNU Emacs Self-Documenting, Extensible Editor
2929  URL:=http://www.gnu.org/software/emacs/
30  SUBMENU:=Editors
30# SUBMENU:=Editors
3131endef
3232
33define Package/emacs/description
33define Package/emacs/Default/description
3434GNU Emacs is an extensible, customizable text editor — and more.
3535At its core is an interpreter for Emacs Lisp, a dialect of the
3636Lisp programming language with extensions to support text editing.
3737endef
3838
39HOST_CONFIGURE_ARGS += --without-x
40CONFIGURE_ARGS += --without-x
41MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib"
39define Package/emacs-bin
40 $(call Package/emacs/Default)
41  DEPENDS:=+libncurses +emacs-data
42  TITLE+= (executable)
43endef
44
45define Package/emacs-bin/description
46$(call Package/emacs/Default/description)
47 This package contains the Emacs executable files
48endef
4249
43    # --with-xpm=no \
44    # --with-jpeg=no \
45    # --with-png=no \
46    # --with-gif=no \
47    # --with-tiff=no \
48    # --without-x \
49    # --with-x-toolkit=no \
50define Package/emacs-data
51 $(call Package/emacs/Default)
52  TITLE+= (compiled lisp)
53endef
5054
55define Package/emacs-data/description
56$(call Package/emacs/Default/description)
57 This package contains the compiled Lisp files needed to run Emacs.
58endef
59
60define Package/emacs-el
61 $(call Package/emacs/Default)
62  TITLE+= (lisp source)
63endef
5164
65define Package/emacs-el/description
66$(call Package/emacs/Default/description)
67 This package contains the Lisp source files of Emacs that can queried via
68 C-h f in case provided documentation of an Emacs function is insufficient.
69endef
5270
71HOST_CONFIGURE_ARGS += --without-x
72CONFIGURE_ARGS += --without-x
73MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib"
5374
5475define Build/Prepare
5576    $(call Build/Prepare/Default)
...... 
87108# ln -sf $(STAGING_DIR_HOST)/bin/temacs $(PKG_BUILD_DIR)/src/
88109    ln -sf $(STAGING_DIR_HOST)/bin/emacs-make-docfile $(PKG_BUILD_DIR)/lib-src/make-docfile
89110    ln -sf $(STAGING_DIR_HOST)/bin/emacs-prefix-args $(PKG_BUILD_DIR)/src/prefix-args
90    sed -ie 's% /usr/lib/crt% $(TOOLCHAIN_DIR)/usr/lib/crt%g' $(PKG_BUILD_DIR)/src/Makefile
111    sed -ie 's; /usr/lib/crt; $(TOOLCHAIN_DIR)/usr/lib/crt;g' $(PKG_BUILD_DIR)/src/Makefile
112    sed -ie 's;\(#.*PATH_DUMPLOADSEARCH\).*$$$$;\1 PATH_LOADSEARCH;' $(PKG_BUILD_DIR)/src/epaths.h
91113    $(call Build/Compile/Default, -C src -o lib-src -o prefix-args -o ../lib-src/make-docfile temacs ../etc/DOC)
92114    cp -v $(PKG_BUILD_DIR)/src/temacs $(PKG_BUILD_DIR)/src/emacs
93115    $(call Build/Compile/Default, -C lisp EMACS=$(STAGING_DIR_HOST)/bin/emacs)
...... 
98120    $(call Build/Install/Default,install-arch-indep install-arch-dep install-leim "MFLAGS=-o test-distrib")
99121endef
100122
101define Package/emacs/install
123define Package/emacs-bin/install
124    $(INSTALL_DIR) $(1)/usr
125    cp -r $(PKG_INSTALL_DIR)/usr/{bin,lib} $(1)/usr
126endef
127
128define Package/emacs-data/install
129    $(INSTALL_DIR) $(1)/usr
130    (cd $(PKG_INSTALL_DIR)/usr && \
131      tar -cf - --exclude "*.el.gz" \
132        --exclude "images" \
133        --exclude "refcards" \
134        --exclude "schema" \
135        --exclude "NEWS*" \
136        share) \
137        | (cd $(1)/usr && tar -xvf -)
138endef
139
140define Package/emacs-el/install
102141    $(INSTALL_DIR) $(1)/usr
103    cp -r $(PKG_INSTALL_DIR)/usr/{bin,lib,share} $(1)/usr
142    (cd $(PKG_INSTALL_DIR)/usr && find share --name "*.el.gz" | tar -cf - -T -) \
143        | (cd $(1)/usr && tar -xvf -)
104144endef
105145
106146$(eval $(call HostBuild))
107$(eval $(call BuildPackage,emacs))
147$(eval $(call BuildPackage,emacs-bin))
148$(eval $(call BuildPackage,emacs-data))
149$(eval $(call BuildPackage,emacs-el))
108150
109151# The following comments configure the Emacs editor. Just ignore them.
110152# Local Variables:

Archive Download the corresponding diff file



interactive