1### Makefile - for scripts and icons (./etc) of ESS distribution.
2###
3
4## Before making changes here, please take a look at Makeconf
5include ../Makeconf
6
7# In ../Makefile we already construct the  ESSR-VERSION  file :
8# ESSR_VERSION = $(shell cat ESSR-VERSION)
9
10#ETCFILES = $(wildcard BACKBUG[S5].BAT backbug[s5] *.S sas-keys.*)
11#ETCFILES = ESSR.R ess-developer.R SVN-REVISION *.S sas-keys.* ess-sas-sh-command
12# ETCFILES_1 = *.S sas-keys.* ess-sas-sh-command *.jl
13ETCFILES_1 = ess-sas-sh-command *.jl
14isRELEASE=$(shell test -f .IS.RELEASE && echo 'yes')
15ifeq ($(isRELEASE),yes)
16  ETCFILES = .IS.RELEASE git-ref $(ETCFILES_1)
17else
18  ETCFILES =                     $(ETCFILES_1)
19endif
20
21#ICONS = $(wildcard icons/*.xpm)
22ICONS = icons/*.xpm
23
24ESSR_UTIL_FILES = ESSR/LOADREMOTE ESSR/VERSION
25ESSR_CODE_FILES = ESSR/R/*.R ESSR/R/.*.R
26# ESSR_tarball = ESSR_$(ESSR_VERSION).tar.gz
27
28all: #ESSR-VERSION $(ESSR_tarball) library/ESSR
29
30show-etc:
31	@echo $(ETCFILES)
32	ls -l $(ETCFILES)
33
34
35## happens "above" as it is need also in ../lisp/ :
36# ESSR-VERSION: $(ESSR_FILES)
37#	(cd .. ; make etc/ESSR-VERSION)
38
39# $(ESSR_tarball): $(ESSR_FILES)
40#	R CMD build ESSR
41# library/ESSR: $(ESSR_tarball)
42#	R CMD INSTALL -l library ESSR
43
44# rel:  $(ESSR_tarball)
45#	[ x$$USER = xmaechler ] || (echo 'must be maechler'; exit 1 )
46#	$(INSTALL) $(ESSR_tarball) $(UPLOAD_DIR)/pkgs/src/contrib
47
48install :
49	$(INSTALLDIR) $(ETCDIR)/icons
50	$(INSTALLDIR) $(ETCDIR)/ESSR/R
51	$(INSTALL) $(ETCFILES) $(ETCDIR)
52	$(INSTALL) $(ICONS) $(ETCDIR)/icons
53	$(INSTALL) $(ESSR_UTIL_FILES) $(ETCDIR)/ESSR
54	$(INSTALL) $(ESSR_CODE_FILES) $(ETCDIR)/ESSR/R
55	chmod +x $(ETCDIR)/ess-sas-sh-command
56
57uninstall :
58	-cd $(ETCDIR) && $(UNINSTALL) $(ETCFILES)
59	-cd $(ETCDIR) && $(UNINSTALL) $(ICONS)
60	-cd $(ETCDIR) && $(UNINSTALL) $(ESSR_UTIL_FILES)
61	-cd $(ETCDIR) && $(UNINSTALL) $(ESSR_CODE_FILES)
62
63
64
65## 'clean'     shall remove *exactly* those things that are *not* in version control
66clean distclean:
67	rm -rf SVN-REVISION
68## 'distclean' removes also things in VC (svn, when they are remade by "make"):
69# distclean: clean
70#	rm -rf ESSR_*.tar.gz
71