Makefile 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. # -*- Makefile -*-
  2. # Borrowed from many emacs places
  3. include Makefile.defs
  4. SPECIAL =
  5. UNCOMPILED =
  6. AUTOLOADFILE = color-theme-autoloads
  7. TESTING =
  8. THEMES_DIRECTORY = themes
  9. THEMES_FILES := $(wildcard $(THEMES_DIRECTORY)/*.el)
  10. ALLSOURCE := $(wildcard *.el) $(THEMES_FILES)
  11. SOURCE = $(filter-out $(SPECIAL) $(UNCOMPILED) $(TESTING),$(ALLSOURCE))
  12. TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE))
  13. MANUAL = color-theme
  14. MISC = AUTHORS COPYING ChangeLog Makefile.defs Makefile $(AUTOLOADFILE).in
  15. #AUTHORS CREDITS HISTORY NEWS README Makefile ChangeLog \
  16. #ChangeLog.2005 ChangeLog.2004 ChangeLog.2003 ChangeLog.2002 \
  17. #ChangeLog.2001 servers.pl color-theme-auto.in color-theme.texi
  18. all: lisp #$(MANUAL).info
  19. lisp: clean $(TARGET)
  20. autoloads: $(AUTOLOADFILE).elc
  21. $(AUTOLOADFILE).el: $(AUTOLOADFILE).in #$(TARGET)
  22. cp $(AUTOLOADFILE).in $(AUTOLOADFILE).el
  23. rm -f $(AUTOLOADFILE).elc
  24. @$(EMACS) -q $(SITEFLAG) -batch \
  25. -l $(shell pwd | sed -e 's|^/cygdrive/\([a-z]\)|\1:|')/$(AUTOLOADFILE) \
  26. -f color-theme-generate-autoloads \
  27. $(shell pwd | sed -e 's|^/cygdrive/\([a-z]\)|\1:|')/$(AUTOLOADFILE).el . \
  28. $(THEMES_DIRECTORY)
  29. $(AUTOLOADFILE).elc: $(AUTOLOADFILE).el
  30. @echo "Byte compiling the autoload file "$<
  31. @$(EMACS) -batch -q -f batch-byte-compile $^
  32. @echo "*******************************************************************"
  33. @echo "Autoloads up to date. Put the following lines in your configuration"
  34. @echo "file (~/.emacs for a single user) :"
  35. @echo
  36. @echo ${patsubst %, "(add-to-list 'load-path \""%"\") ", $(LISPDIRS)}
  37. @echo "(require 'color-theme-autoload \""$(AUTOLOADFILE)"\")"
  38. @echo
  39. %.elc: %.el
  40. @$(EMACS) $(OPTIONCOMPILE) \
  41. --eval '(setq load-path (cons "." load-path))' \
  42. -f batch-byte-compile $<
  43. %.info: %.texi
  44. @echo "No doc yet !"
  45. # makeinfo $<
  46. %.html: %.texi
  47. @echo "No doc yet !"
  48. # makeinfo --html --no-split $<
  49. doc: $(MANUAL).info $(MANUAL).html
  50. @echo "No doc yet !"
  51. clean:
  52. -rm -f themes/*.elc
  53. -rm -f *~ *.elc $(AUTOLOADFILE).el
  54. realclean: clean
  55. -rm -f $(MANUAL).info $(MANUAL).html $(TARGET) $(SPECIAL)
  56. install-info: $(MANUAL).info
  57. [ -d $(INFODIR) ] || install -d $(INFODIR)
  58. install -m 0644 $(MANUAL).info $(INFODIR)/$(MANUAL)
  59. $(INSTALLINFO) $(INFODIR)/$(MANUAL)
  60. install-bin: lisp
  61. install -d $(ELISPDIR)
  62. install -d $(ELISPDIR)/themes
  63. install -m 0644 $(ALLSOURCE) $(TARGET) $(ELISPDIR)
  64. install -m 0644 $(THEMES_FILES) $(TARGET) $(ELISPDIR)/themes
  65. install: install-bin install-info
  66. ## DO NOT TOUCH THIS !
  67. ## HELPERS FOR MAINTAINER(S)
  68. distclean:
  69. -rm $(MANUAL).info $(MANUAL).html $(TARGET)
  70. -rm -Rf ../$(DISTDIR)
  71. -rm -f debian/dirs debian/files
  72. -rm -rf $(DISTDIR) $(TARBALL)* $(ZIPFILE)* $(DEBNAME)*
  73. dist: distclean Makefile
  74. $(MAKE) dist-prepare
  75. # Idea taken from w3m-el
  76. dist-prepare: CVS/Root CVS/Repository
  77. cvs -d $(CVSROOT) -w export -d $(DISTDIR) -r $(CVSBRANCH) $(CVSMODULE)
  78. -cvs diff |( cd $(DISTDIR) && patch -p0 )
  79. $(TARBALL): tarball
  80. $(DEBNAME): debian
  81. tarball: dist
  82. find $(DISTDIR) -name .cvsignore | xargs rm -f
  83. find $(DISTDIR) -name debian | xargs rm -fr
  84. find $(DISTDIR) -type d | xargs chmod 755
  85. find $(DISTDIR) -type f | xargs chmod 644
  86. tar -cf `basename $(TARBALL) .gz` $(DISTDIR)
  87. gzip -9 `basename $(TARBALL) .gz`
  88. zip -r $(ZIPFILE) $(DISTDIR)
  89. gpg --detach $(TARBALL)
  90. gpg --detach $(ZIPFILE)
  91. debian: dist
  92. (cd $(DISTDIR) && \
  93. dpkg-buildpackage -v$(LASTUPLOAD) $(BUILDOPTS) \
  94. -us -uc -rfakeroot && \
  95. echo "Running lintian ..." && \
  96. lintian -i ../$(DEBNAME)*.deb || : && \
  97. echo "Done running lintian." && \
  98. debsign)
  99. cp $(DEBNAME)* /var/spool/repo
  100. (cd /var/spool/repo && \
  101. dpkg-scanpackages . /dev/null | gzip -9 > Packages.gz && \
  102. dpkg-scansources . | gzip -9 > Sources.gz)
  103. release: $(DEBNAME) $(TARBALL)
  104. rm -rf $(DISTDIR)
  105. $(MAKE) upload distclean
  106. upload:
  107. (cd /var/spool/repo && echo open perso.nerim.net > upload.lftp ; \
  108. echo cd /var/spool/repo >> upload.lftp ; \
  109. echo mput * >> upload.lftp ; \
  110. echo close >> upload.lftp ; \
  111. lftp -f upload.lftp ; \
  112. rm -f upload.lftp)
  113. (scp $(ZIPFILE)* $(TARBALL)* \
  114. zeDek@download.gna.org:/upload/color-theme)