2 $(error This make needs to be started
as a sub-make from the toplevel directory.
)
5 GITVERSION
= $(shell git describe
--abbrev
=6 HEAD
)
6 GITSTATUS
= $(shell git status
-uno
--porcelain
)
7 ifneq ("$(GITSTATUS)", "")
8 GITVERSION
:= $(GITVERSION
).dirty
11 LISPO
= org-install.el
12 LISPF
= $(subst $(LISPO
),,$(wildcard *.el
))
13 LISPC
= $(LISPF
:%el
=%elc
)
15 include dependencies.mk
17 .PHONY
: all autoloads compile
install clean cleanall clean-install
23 org-install.el
: $(LISPC
)
25 --eval
"(require 'autoload)" \
26 --eval
'(find-file "$(LISPO)")' \
27 --eval
'(erase-buffer)' \
28 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
29 --eval
'(insert "\n(provide (quote org-install))\n")' \
30 --eval
'(save-buffer)'
32 install: $(LISPF
) compile autoloads
33 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
34 $(CP
) $(LISPC
) $(LISPF
) $(LISPO
) $(lispdir
)
35 -$(SED
) -e
's/^\((defconst org-git-version \).*/\1 "$(GITVERSION)"/;' org.el
> $(lispdir
)/org.el
36 $(MAKE
) $(lispdir
)/org.elc
45 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
46 $(RM
) $(lispdir
)/org
*.el
* $(lispdir
)/ob
*.el
*
48 $(LISPC
): dependencies.mk
50 .SUFFIXES
: # we don't need default suffix rules
54 $(info in subdir lisp
)