Made several changes to the windows installation to simplify it.
[ess.git] / Makefile
blob6efc00e121230ed09fb15095ce422e8159dfbee4
1 ## Top Level Makefile
3 ## Before making changes here, please take a look at Makeconf
4 include ./Makeconf
6 ## This is the default target, i.e. 'make' and 'make all' are the same.
8 all install clean distclean:
9 @for D in lisp doc etc; do cd $$D; $(MAKE) $@; cd ..; done
11 ## the rest of the targets are for ESS developer's use only :
13 ## --- PRE-release ---
15 dist: VERSION RPM.spec
16 cd doc; $(MAKE) docs; cd ..
17 cd lisp; $(MAKE) dist; grep 'ess-version' ess-cust.el; cd ..
18 $(MAKE) cleanup-dist
19 svn cleanup
20 @echo "** Committing VERSION, README, ANNOUNCE, info etc **"
21 svn commit -m "Updating toplevel files for new version" \
22 VERSION README ANNOUNCE RPM.spec
23 svn commit -m "Updating ess-version, info & html for new version" lisp/ess-cust.el doc/info doc/html
24 @echo "**********************************************************"
25 @echo "** Making distribution of ESS for release $(ESSVERSION),"
26 @echo "** from $(ESSDIR)"
27 @echo "** (must have setup subversion with cached authentication, prior for security)"
28 @echo "**********************************************************"
29 @echo "** Exporting Files **"
30 svn checkout --quiet $(SVN_URL)/trunk $(ESSDIR)-svn
31 mkdir -p $(ESSDIR)
32 (cd $(ESSDIR)-svn; tar cvf - --exclude=.svn --no-wildcards .) | (cd $(ESSDIR); tar xf - )
33 @echo "** Clean-up docs, Make docs, and Correct Write Permissions **"
34 CLEANUP="jcgs techrep dsc2001-rmh philasug user-* Why_* README.*"; \
35 cd $(ESSDIR)/doc; chmod -R u+w $$CLEANUP; rm -rf $$CLEANUP; \
36 make all cleanaux ; cd ../..
37 chmod u+w $(ESSDIR)/lisp/ess-site.el $(ESSDIR)/Make*
38 chmod u+w $(ESSDIR)/doc/Makefile $(ESSDIR)/lisp/Makefile
39 chmod a-w $(ESSDIR)/lisp/*.el
40 # should be newer than 'VERSION' :
41 touch $(ESSDIR)/lisp/ess-cust.el
42 chmod a-w $(ESSDIR)/ChangeLog $(ESSDIR)/doc/*
43 test -f $(ESSDIR).tar.gz && rm -rf $(ESSDIR).tar.gz || true
44 @echo "** Creating tar file **"
45 tar hcvofz $(ESSDIR).tar.gz $(ESSDIR)
46 test -f $(ESSDIR).zip && rm -rf $(ESSDIR).zip || true
47 @echo "** Creating zip file **"
48 zip -r $(ESSDIR).zip $(ESSDIR)
49 $(MAKE) cleanup-dist
50 touch $@
52 .PHONY: cleanup-dist cleanup-rel
53 cleanup-dist:
54 @echo "** Cleaning up **"
55 (if [ -d $(ESSDIR) ] ; then \
56 chmod -R u+w $(ESSDIR) $(ESSDIR)-svn && rm -rf $(ESSDIR) $(ESSDIR)-svn; fi)
57 ## should only be called manually (if at all):
58 cleanup-rel:
59 @rm -f dist lisp/dist $(ESSDIR)*
61 %.spec: %.spec.in VERSION
62 sed 's/@@VERSION@@/$(ESSVERSION)/g' $< > $@
65 ## --- RELEASE ---
67 ChangeLog: VERSION
68 @echo "** Adding log-entry to ChangeLog file"
69 mv ChangeLog ChangeLog.old
70 (echo `date "+%Y-%m-%d "` \
71 " ESS Maintainers <ESS-core@stat.math.ethz.ch>" ; \
72 echo; echo " * Version $(ESSVERSION) released."; echo; \
73 cat ChangeLog.old ) > ChangeLog
74 @rm ChangeLog.old
75 svn commit -m 'Version $(ESSVERSION)' ChangeLog
77 rel: ChangeLog dist tag
78 [ x$$USER = xmaechler ] || (echo 'must be maechler'; exit 1 )
79 @echo "** Placing tar and zip files **"
80 cp -p $(ESSDIR).tar.gz $(ESSDIR).zip $(UPLOAD_DIR)
81 @echo "** Creating LATEST.IS. file **"
82 rm -f $(UPLOAD_DIR)/LATEST.IS.*
83 touch $(UPLOAD_DIR)/LATEST.IS.$(ESSDIR)
84 @echo "If all is perfect, eventually call 'make cleanup-rel'"
86 tag:
87 @echo "** Tagging the release **"
88 svn cp -m'release tagging' $(SVN_URL)/trunk $(SVN_URL)/tags/$(ESSVERSIONTAG)
90 ## TODO (when MM has GPG set up properly): add this to 'rel'
91 .PHONY: buildrpm
92 buildrpm: dist
93 rpmbuild -ta --sign $(ESSDIR).tar.gz