forked from mirrors/org-mode
Introduce $(datadir), prefix all installation paths with $(DESTDIR)
Makefile: remove includes for maintainer targets, these will go into local.mk on the server default.mk: introduce $(datadir) to replace $(etcdir) in etc/Makefile doc/Makefile: replace $etcdir) with $(datadir) lisp/Makefile: record ODT styles location as defconst in org-install {doc,etc,lisp}/Makefile: prefix all installation targets with $(DESTDIR)
This commit is contained in:
parent
0081071a52
commit
6a3ec67abd
15
Makefile
15
Makefile
|
@ -1,8 +1,9 @@
|
|||
# Makefile - for the org-mode distribution
|
||||
#
|
||||
# Maintainer: Carsten Dominik <dominik@science.uva.nl>
|
||||
# Version: VERSIONTAG
|
||||
#
|
||||
# This file is not part of GNU Emacs
|
||||
|
||||
# default target is "all"
|
||||
.DEFAULT: all
|
||||
|
||||
# Describe valid make targets for org-mode.
|
||||
.PHONY: targets help
|
||||
|
@ -32,8 +33,6 @@ targets help:
|
|||
$(info make clean-install - remove installed Org ELisp and documentation files)
|
||||
@echo ""
|
||||
|
||||
include default.mk
|
||||
-include local.mk # optional local customization
|
||||
include maint.mk
|
||||
include targets.mk
|
||||
include maint-targets.mk
|
||||
include default.mk # defaults, customizable via "local.mk"
|
||||
-include local.mk # optional local customization, use default.mk as template
|
||||
include targets.mk # toplevel make machinery
|
||||
|
|
|
@ -11,6 +11,9 @@ prefix = /usr/share
|
|||
# Where local lisp files go.
|
||||
lispdir = $(prefix)/emacs/site-lisp/org
|
||||
|
||||
# Where local data files go.
|
||||
datadir = $(lispdir)/etc
|
||||
|
||||
# Where info files go.
|
||||
infodir = $(prefix)/info
|
||||
|
||||
|
@ -63,4 +66,3 @@ CP = install -p
|
|||
|
||||
# Name of the program to install info files
|
||||
INSTALL_INFO = install-info
|
||||
|
||||
|
|
13
doc/Makefile
13
doc/Makefile
|
@ -1,7 +1,7 @@
|
|||
.SUFFIXES: # we don't need default suffix rules
|
||||
ifeq ($(MAKELEVEL), 0)
|
||||
$(error This make needs to be started as a sub-make from the toplevel directory.)
|
||||
endif
|
||||
|
||||
.PHONY: all info html pdf card manual guide install clean cleanall clean-install
|
||||
|
||||
all: info html pdf card
|
||||
|
@ -30,9 +30,9 @@ git-describe.texi: org.texi
|
|||
|
||||
|
||||
install: org
|
||||
if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
|
||||
$(CP) org $(infodir)
|
||||
$(INSTALL_INFO) --infodir=$(infodir) org
|
||||
if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
|
||||
$(CP) org $(DESTDIR)$(infodir)
|
||||
$(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
|
||||
|
||||
clean:
|
||||
$(RM) org *.pdf *.html *_letter.tex \
|
||||
|
@ -42,10 +42,9 @@ cleanall: clean
|
|||
$(RMR) guide manual
|
||||
|
||||
clean-install:
|
||||
$(RM) $(infodir)/org*
|
||||
$(INSTALL_INFO) --infodir=$(infodir) --remove org
|
||||
$(RM) $(DESTDIR)$(infodir)/org*
|
||||
$(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --remove org
|
||||
|
||||
.SUFFIXES: # we don't need default suffix rules
|
||||
.SUFFIXES: .texi .tex .txt
|
||||
|
||||
%: %.texi
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
etcdir = $(lispdir)/etc
|
||||
ETCDIRS = styles
|
||||
-include local.mk # optional local customization
|
||||
|
||||
|
@ -13,12 +12,12 @@ endif
|
|||
all:
|
||||
|
||||
install: $(ETCDIRS)
|
||||
$(foreach dir, $?, if [ ! -d $(etcdir)/$(dir) ]; then $(MKDIR) $(etcdir)/$(dir); else true; fi ; $(CP) $(dir)/* $(etcdir)/$(dir); )
|
||||
$(foreach dir, $?, if [ ! -d $(DESTDIR)$(datadir)/$(dir) ]; then $(MKDIR) $(DESTDIR)$(datadir)/$(dir); else true; fi ; $(CP) $(dir)/* $(DESTDIR)$(datadir)/$(dir); )
|
||||
|
||||
clean:
|
||||
|
||||
cleanall:
|
||||
|
||||
clean-install:
|
||||
if [ ! -d $(etcdir) ]; then $(MKDIR) $(etcdir); else true; fi ;
|
||||
$(RMR) $(etcdir)
|
||||
if [ ! -d $(DESTDIR)$(datadir) ]; then $(MKDIR) $(DESTDIR)$(datadir); else true; fi ;
|
||||
$(RMR) $(DESTDIR)$(datadir)
|
||||
|
|
|
@ -6,6 +6,7 @@ ORG-INSTALL = $(BATCH) \
|
|||
--eval '(insert "\n(provide (quote org-install))\n")' \
|
||||
--eval '(insert "\n(defconst org-release \"$(ORGVERSION)\"\n \"The release version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \
|
||||
--eval '(insert "\n(defconst org-git-version \"$(GITVERSION)\"\n \"The Git version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \
|
||||
--eval '(insert "\n(defconst org-odt-data-dir \"$(datadir)\"\n \"The location of ODT styles.\")\n")' \
|
||||
--eval '(save-buffer)'
|
||||
-include local.mk # optional local customization
|
||||
|
||||
|
@ -32,8 +33,8 @@ org-install.el: $(LISPF)
|
|||
$(ORG-INSTALL)
|
||||
|
||||
install: $(LISPF) compile autoloads
|
||||
if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
|
||||
$(CP) $(LISPC) $(LISPF) $(LISPO) $(lispdir)
|
||||
if [ ! -d $(DESTDIR)$(lispdir) ]; then $(MKDIR) $(DESTDIR)$(lispdir); else true; fi ;
|
||||
$(CP) $(LISPC) $(LISPF) $(LISPO) $(DESTDIR)$(lispdir)
|
||||
|
||||
clean:
|
||||
$(RM) *.elc
|
||||
|
@ -45,5 +46,5 @@ cleanall:
|
|||
$(RM) *.elc $(LISPO)
|
||||
|
||||
clean-install:
|
||||
if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
|
||||
$(RM) $(lispdir)/org*.el* $(lispdir)/ob*.el*
|
||||
if [ ! -d $(DESTDIR)$(lispdir) ]; then $(MKDIR) $(DESTDIR)$(lispdir); else true; fi ;
|
||||
$(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el*
|
||||
|
|
Loading…
Reference in New Issue