forked from mirrors/org-mode
shuffle targets to their correct place, harden recipes
* Makefile: declare phony targets, remove help text for install-info-debian * default.mk: add variable for FIND and RM * targets.mk, maint-targets.mk: shuffle targets to where they belong, declare phony targets, work around a texi2dvi bug, use pattern rules, use targets for dependencies instead of repeating them verbatim
This commit is contained in:
parent
2386380c72
commit
77f0e50787
3
Makefile
3
Makefile
|
@ -3,10 +3,9 @@
|
||||||
# Maintainer: Carsten Dominik <dominik@science.uva.nl>
|
# Maintainer: Carsten Dominik <dominik@science.uva.nl>
|
||||||
# Version: VERSIONTAG
|
# Version: VERSIONTAG
|
||||||
#
|
#
|
||||||
# To install org-mode, edit the Makefile, type `make', then `make install'.
|
|
||||||
# To create the PDF and HTML documentation files, type `make doc'.
|
|
||||||
|
|
||||||
# Describe valid make targets for org-mode.
|
# Describe valid make targets for org-mode.
|
||||||
|
.PHONY: targets help
|
||||||
targets help:
|
targets help:
|
||||||
@echo "make - compile Org ELisp files"
|
@echo "make - compile Org ELisp files"
|
||||||
@echo "make clean - clean Elisp and documentation files"
|
@echo "make clean - clean Elisp and documentation files"
|
||||||
|
|
|
@ -39,6 +39,12 @@ MAKEINFO = makeinfo
|
||||||
# How to create the HTML file
|
# How to create the HTML file
|
||||||
TEXI2HTML = makeinfo --html --number-sections
|
TEXI2HTML = makeinfo --html --number-sections
|
||||||
|
|
||||||
|
# How to find files
|
||||||
|
FIND = find
|
||||||
|
|
||||||
|
# How to remove files
|
||||||
|
RM = rm
|
||||||
|
|
||||||
# How to copy the lisp files and elc files to their destination.
|
# How to copy the lisp files and elc files to their destination.
|
||||||
# CP = cp -p # try this if there is no install
|
# CP = cp -p # try this if there is no install
|
||||||
CP = install -p
|
CP = install -p
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
|
.PHONY: p g html_manual html_guide \
|
||||||
|
testrelease release fixrelease \
|
||||||
|
relup makerelease sync_release sync_manual \
|
||||||
|
distfile pkg push pushtag pushreleasetag
|
||||||
|
.NOTPARALLEL: .PHONY
|
||||||
# Below here are special targets for maintenance only
|
# Below here are special targets for maintenance only
|
||||||
|
|
||||||
html: doc/org.html
|
p: pdf
|
||||||
|
open doc/org.pdf
|
||||||
|
|
||||||
|
g: pdf
|
||||||
|
open doc/orgguide.pdf
|
||||||
|
|
||||||
html_manual: doc/org.texi
|
html_manual: doc/org.texi
|
||||||
rm -rf doc/manual
|
rm -rf doc/manual
|
||||||
|
@ -14,12 +23,6 @@ html_guide: doc/orgguide.texi
|
||||||
$(TEXI2HTML) -o doc/guide doc/orgguide.texi
|
$(TEXI2HTML) -o doc/guide doc/orgguide.texi
|
||||||
UTILITIES/guidesplit.pl doc/guide/*.html
|
UTILITIES/guidesplit.pl doc/guide/*.html
|
||||||
|
|
||||||
info: doc/org
|
|
||||||
|
|
||||||
pdf: doc/org.pdf doc/orgguide.pdf
|
|
||||||
|
|
||||||
card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
|
|
||||||
|
|
||||||
testrelease:
|
testrelease:
|
||||||
git checkout -b testrelease origin/maint
|
git checkout -b testrelease origin/maint
|
||||||
git merge -s recursive -X theirs master
|
git merge -s recursive -X theirs master
|
||||||
|
@ -146,37 +149,6 @@ pkg:
|
||||||
echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
|
echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
|
||||||
tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
|
tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
|
||||||
|
|
||||||
cleanall:
|
|
||||||
${MAKE} clean
|
|
||||||
rm -f lisp/org-install.el
|
|
||||||
|
|
||||||
clean:
|
|
||||||
${MAKE} cleanelc
|
|
||||||
${MAKE} cleandoc
|
|
||||||
${MAKE} cleanrel
|
|
||||||
rm -f *~ */*~ */*/*~
|
|
||||||
|
|
||||||
cleancontrib:
|
|
||||||
find contrib -name \*~ -exec rm {} \;
|
|
||||||
|
|
||||||
cleanelc:
|
|
||||||
rm -f $(ELCFILES)
|
|
||||||
cleandoc:
|
|
||||||
-(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
|
|
||||||
-(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
|
|
||||||
-(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
|
|
||||||
-(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf)
|
|
||||||
-(cd doc && rm -rf manual)
|
|
||||||
|
|
||||||
cleanrel:
|
|
||||||
rm -rf RELEASEDIR
|
|
||||||
rm -rf org-7.*
|
|
||||||
rm -rf org-7*zip org-7*tar.gz
|
|
||||||
|
|
||||||
.el.elc:
|
|
||||||
$(ELC) $<
|
|
||||||
|
|
||||||
|
|
||||||
push:
|
push:
|
||||||
git push orgmode@orgmode.org:org-mode.git master
|
git push orgmode@orgmode.org:org-mode.git master
|
||||||
|
|
||||||
|
|
80
targets.mk
80
targets.mk
|
@ -1,9 +1,13 @@
|
||||||
|
.PHONY: default all up2 update compile \
|
||||||
|
install info html pdf card doc install-lisp install-info \
|
||||||
|
autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel
|
||||||
|
.NOTPARALLEL: .PHONY
|
||||||
# Additional distribution files
|
# Additional distribution files
|
||||||
DISTFILES_extra= Makefile request-assign-future.txt contrib etc
|
DISTFILES_extra= Makefile request-assign-future.txt contrib etc
|
||||||
|
|
||||||
default: $(ELCFILES) $(ELCBFILES)
|
default: $(ELCFILES)
|
||||||
|
|
||||||
all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
|
all: default $(INFOFILES)
|
||||||
|
|
||||||
up2: update
|
up2: update
|
||||||
sudo ${MAKE} install
|
sudo ${MAKE} install
|
||||||
|
@ -13,19 +17,21 @@ update:
|
||||||
${MAKE} clean
|
${MAKE} clean
|
||||||
${MAKE} all
|
${MAKE} all
|
||||||
|
|
||||||
compile: $(ELCFILES0) $(ELCBFILES)
|
compile: $(ELCFILES0)
|
||||||
|
|
||||||
install: install-lisp
|
install: install-lisp
|
||||||
|
|
||||||
doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf doc/orgcard.txt
|
info: doc/org
|
||||||
|
|
||||||
p:
|
html: doc/org.html
|
||||||
${MAKE} pdf && open doc/org.pdf
|
|
||||||
|
|
||||||
g:
|
pdf: doc/org.pdf doc/orgguide.pdf
|
||||||
${MAKE} pdf && open doc/orgguide.pdf
|
|
||||||
|
|
||||||
install-lisp: $(LISPFILES) $(ELCFILES)
|
card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
|
||||||
|
|
||||||
|
doc: html pdf card
|
||||||
|
|
||||||
|
install-lisp: $(LISPFILES) default
|
||||||
if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
|
if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
|
||||||
$(CP) $(LISPFILES) $(lispdir)
|
$(CP) $(LISPFILES) $(lispdir)
|
||||||
$(CP) $(ELCFILES) $(lispdir)
|
$(CP) $(ELCFILES) $(lispdir)
|
||||||
|
@ -37,31 +43,30 @@ install-info: $(INFOFILES)
|
||||||
|
|
||||||
autoloads: lisp/org-install.el
|
autoloads: lisp/org-install.el
|
||||||
|
|
||||||
lisp/org-install.el: $(LISPFILES0) Makefile
|
lisp/org-install.el: $(LISPFILES0) maint.mk dependencies.mk
|
||||||
$(BATCH) --eval "(require 'autoload)" \
|
$(BATCH) \
|
||||||
--eval '(find-file "org-install.el")' \
|
--eval "(require 'autoload)" \
|
||||||
--eval '(erase-buffer)' \
|
--eval '(find-file "org-install.el")' \
|
||||||
--eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
|
--eval '(erase-buffer)' \
|
||||||
--eval '(insert "\n(provide (quote org-install))\n")' \
|
--eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
|
||||||
--eval '(save-buffer)'
|
--eval '(insert "\n(provide (quote org-install))\n")' \
|
||||||
|
--eval '(save-buffer)'
|
||||||
mv org-install.el lisp
|
mv org-install.el lisp
|
||||||
|
|
||||||
doc/org: doc/org.texi
|
doc/org: doc/org.texi
|
||||||
(cd doc && $(MAKEINFO) --no-split org.texi -o org)
|
(cd doc && $(MAKEINFO) --no-split org.texi -o org)
|
||||||
|
|
||||||
doc/org.pdf: doc/org.texi
|
doc/%.pdf: LC_ALL=C # work around a bug in texi2dvi
|
||||||
(cd doc && $(TEXI2PDF) org.texi)
|
doc/%.pdf: LANG=C # work around a bug in texi2dvi
|
||||||
|
doc/%.pdf: doc/%.texi
|
||||||
doc/orgguide.pdf: doc/orgguide.texi
|
(cd doc && $(TEXI2PDF) $(<F))
|
||||||
(cd doc && $(TEXI2PDF) orgguide.texi)
|
doc/%.pdf: doc/%.tex
|
||||||
|
(cd doc && $(TEXI2PDF) $(<F))
|
||||||
|
|
||||||
doc/org.html: doc/org.texi
|
doc/org.html: doc/org.texi
|
||||||
(cd doc && $(TEXI2HTML) --no-split -o org.html org.texi)
|
(cd doc && $(TEXI2HTML) --no-split -o org.html org.texi)
|
||||||
UTILITIES/manfull.pl doc/org.html
|
UTILITIES/manfull.pl doc/org.html
|
||||||
|
|
||||||
doc/orgcard.pdf: doc/orgcard.tex
|
|
||||||
(cd doc && pdftex orgcard.tex)
|
|
||||||
|
|
||||||
doc/orgcard.txt: doc/orgcard.tex
|
doc/orgcard.txt: doc/orgcard.tex
|
||||||
(cd doc && perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
|
(cd doc && perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
|
||||||
|
|
||||||
|
@ -69,6 +74,29 @@ doc/orgcard_letter.tex: doc/orgcard.tex
|
||||||
perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
|
perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
|
||||||
doc/orgcard.tex > doc/orgcard_letter.tex
|
doc/orgcard.tex > doc/orgcard_letter.tex
|
||||||
|
|
||||||
doc/orgcard_letter.pdf: doc/orgcard_letter.tex
|
cleanall: clean
|
||||||
(cd doc && pdftex orgcard_letter.tex)
|
$(RM) lisp/org-install.el
|
||||||
|
|
||||||
|
clean: cleanelc cleandoc cleanrel cleancontrib
|
||||||
|
-$(FIND) . -name \*~ -exec $(RM) {} \;
|
||||||
|
|
||||||
|
cleancontrib:
|
||||||
|
-$(FIND) contrib -name \*~ -exec $(RM) {} \;
|
||||||
|
|
||||||
|
cleanelc:
|
||||||
|
rm -f $(ELCFILES)
|
||||||
|
|
||||||
|
cleandoc:
|
||||||
|
-(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
|
||||||
|
-(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
|
||||||
|
-(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
|
||||||
|
-(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf)
|
||||||
|
-(cd doc && rm -rf manual)
|
||||||
|
|
||||||
|
cleanrel:
|
||||||
|
rm -rf RELEASEDIR
|
||||||
|
rm -rf org-7.*
|
||||||
|
rm -rf org-7*zip org-7*tar.gz
|
||||||
|
|
||||||
|
.el.elc:
|
||||||
|
$(ELC) $<
|
||||||
|
|
Loading…
Reference in New Issue