PageRenderTime 53ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/R/ess-12.04-2/Makefile

https://github.com/nipra/.emacs.d
Makefile | 122 lines | 84 code | 20 blank | 18 comment | 12 complexity | b748bf64f90cba86b1289328ebc98ccd MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0
  1. ## Top Level Makefile
  2. ## Before making changes here, please take a look at Makeconf
  3. include ./Makeconf
  4. ## This is the default target, i.e. 'make' and 'make all' are the same.
  5. all install uninstall: SVN-REVISION
  6. cd etc; $(MAKE) $@
  7. cd lisp; $(MAKE) $@
  8. cd doc; $(MAKE) $@
  9. ## the rest of the targets are for ESS developer's use only :
  10. # VERSION:
  11. # @echo "$(ESSVERSION)" > $@
  12. ## Hmm, this is a bit brittle ... but for distribution, there's no problem
  13. SVN-REVISION: VERSION lisp/*.el doc/*.texi */Makefile Makefile Makeconf
  14. (LC_ALL=C TZ=GMT svn info -r HEAD || $(ECHO) "Revision: unknown") 2> /dev/null \
  15. | sed -n -e '/^Revision/p' -e '/^Last Changed Date/'p \
  16. | cut -d' ' -f1,2,3,4 > $@-tmp
  17. if [ -s $@-tmp ]; then mv $@-tmp $@ ; elif [ ! -e $@ ]; then echo 'not available' > $@ ; fi
  18. ## --- PRE-release ---
  19. # new target to create .tgz and .zip files only
  20. # run in the foreground so you can accept the certificate
  21. # for real men
  22. # GNUTAR=gtar make downloads
  23. downloads: all RPM.spec cleanup-dist
  24. [ x$(ESSfromSVN) = xyes ] || (echo 'ESS must be "from SVN"'; exit 1 )
  25. @echo "**********************************************************"
  26. @echo "** Making distribution of ESS for release $(ESSVERSION),"
  27. @echo "** from $(ESSDIR)"
  28. @echo "** (must have setup subversion with cached authentication, prior for security)"
  29. @echo "**********************************************************"
  30. @echo "** Exporting Files **"
  31. svn checkout --quiet $(SVN_URL)/trunk $(ESSDIR)-svn
  32. mkdir -p $(ESSDIR)
  33. (cd $(ESSDIR)-svn; $(GNUTAR) cvf - --exclude=.svn --no-wildcards .) | (cd $(ESSDIR); $(GNUTAR) xf - )
  34. @echo "** Clean-up docs, Make docs, and Correct Write Permissions **"
  35. CLEANUP="user-* useR-* Why_* README.*"; \
  36. cd $(ESSDIR)/doc; chmod -R u+w $$CLEANUP; rm -rf $$CLEANUP; \
  37. $(MAKE) all cleanaux ; cd ../..
  38. svn cleanup
  39. cd lisp; $(MAKE) ess-custom.el; cp ess-custom.el ../$(ESSDIR)/lisp/; cd ..
  40. # make it newer than VERSION in the tarball:
  41. touch SVN-REVISION
  42. cp -p RPM.spec SVN-REVISION $(ESSDIR)/
  43. chmod a-w $(ESSDIR)/lisp/*.el
  44. chmod u+w $(ESSDIR)/lisp/ess-site.el $(ESSDIR)/Make* $(ESSDIR)/*/Makefile
  45. @echo "** Creating .tgz file **"
  46. test -f $(ESSDIR).tgz && rm -rf $(ESSDIR).tgz || true
  47. $(GNUTAR) hcvofz $(ESSDIR).tgz $(ESSDIR)
  48. @echo "** Creating .zip file **"
  49. test -f $(ESSDIR).zip && rm -rf $(ESSDIR).zip || true
  50. zip -r $(ESSDIR).zip $(ESSDIR)
  51. dist: downloads
  52. grep -E 'defvar ess-(version|revision)' lisp/ess-custom.el \
  53. $(ESSDIR)/lisp/ess-custom.el
  54. touch $@
  55. .PHONY: cleanup-dist cleanup-rel
  56. cleanup-dist:
  57. @echo "** Cleaning up **"
  58. (if [ -d $(ESSDIR) ] ; then \
  59. chmod -R u+w $(ESSDIR) $(ESSDIR)-svn && rm -rf $(ESSDIR) $(ESSDIR)-svn; fi)
  60. ## should only be called manually (if at all):
  61. cleanup-rel:
  62. @rm -f dist lisp/dist $(ESSDIR)*
  63. %.spec: %.spec.in
  64. sed 's/@@VERSION@@/$(ESSVERSION)/g' $< > $@
  65. ## --- RELEASE ---
  66. ChangeLog:
  67. @echo "** Adding log-entry to ChangeLog file"
  68. mv ChangeLog ChangeLog.old
  69. (echo `date "+%Y-%m-%d "` \
  70. " ESS Maintainers <ESS-core@r-project.org>" ; \
  71. echo; echo " * Version $(ESSVERSION) released."; echo; \
  72. cat ChangeLog.old ) > ChangeLog
  73. @rm ChangeLog.old
  74. svn commit -m 'Version $(ESSVERSION)' ChangeLog
  75. rel: ChangeLog dist tag homepage
  76. [ x$$USER = xmaechler ] || (echo 'must be maechler'; exit 1 )
  77. @echo "** Placing .tgz and .zip files **"
  78. cp -p $(ESSDIR).tgz $(ESSDIR).zip $(UPLOAD_DIR)
  79. @echo "** Creating LATEST.IS. file **"
  80. rm -f $(UPLOAD_DIR)/LATEST.IS.*
  81. touch $(UPLOAD_DIR)/LATEST.IS.$(ESSDIR)
  82. @echo "If all is perfect, eventually call 'make cleanup-rel'"
  83. tag:
  84. @echo "** Tagging the release **"
  85. svn cp -m'release tagging' $(SVN_URL)/trunk $(SVN_URL)/tags/$(ESSVERSION)
  86. homepage:
  87. @echo "** Updating ESS Webpage **"
  88. [ x$$USER = xmaechler ] || (echo 'must be maechler'; exit 1 )
  89. cd $(ESS_HOMEPAGE); ./update-VERSION $(ESSVERSION)
  90. ## TODO (when MM has GPG set up properly): add this to 'rel'
  91. .PHONY: buildrpm
  92. buildrpm: dist
  93. rpmbuild -ta --sign $(ESSDIR).tgz
  94. builddeb:
  95. dpkg-buildpackage -uc -us -rfakeroot -tc
  96. ## 'clean' shall remove *exactly* those things that are *not* in version control
  97. ## 'distclean' removes also things in VC (svn, when they are remade by "make"):
  98. clean distclean: cleanup-dist
  99. cd etc; $(MAKE) $@
  100. cd lisp; $(MAKE) $@
  101. cd doc; $(MAKE) $@
  102. rm -f SVN-REVISION* dist