Permalink
Browse files

Helper files to buil color-theme distribution

  • Loading branch information...
1 parent 7f177f5 commit 30812faa8df83c273ebd8887ce621d7c5872e6cd Xavier Maillard committed May 27, 2006
Showing with 220 additions and 0 deletions.
  1. +170 −0 Makefile
  2. +35 −0 Makefile.defs
  3. +15 −0 color-theme-autoloads.in
View
170 Makefile
@@ -0,0 +1,170 @@
+# -*- Makefile -*-
+
+# Borrowed from many emacs places
+
+include Makefile.defs
+
+SPECIAL =
+UNCOMPILED =
+AUTOLOADFILE = color-theme-autoloads
+TESTING =
+THEMES_DIRECTORY = themes
+THEMES_FILES := $(wildcard $(THEMES_DIRECTORY)/*.el)
+ALLSOURCE := $(wildcard *.el) $(THEMES_FILES)
+SOURCE = $(filter-out $(SPECIAL) $(UNCOMPILED) $(TESTING),$(ALLSOURCE))
+TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE))
+MANUAL = color-theme
+MISC = AUTHORS COPYING Makefile.defs Makefile $(AUTOLOADFILE).in
+#AUTHORS CREDITS HISTORY NEWS README Makefile ChangeLog \
+#ChangeLog.2005 ChangeLog.2004 ChangeLog.2003 ChangeLog.2002 \
+#ChangeLog.2001 servers.pl color-theme-auto.in color-theme.texi
+
+all: lisp #$(MANUAL).info
+
+lisp: clean $(TARGET)
+
+autoloads: $(AUTOLOADFILE).elc
+
+$(AUTOLOADFILE).el: $(AUTOLOADFILE).in $(TARGET)
+ cp $(AUTOLOADFILE).in $(AUTOLOADFILE).el
+ rm -f $(AUTOLOADFILE).elc
+ @$(EMACS) -q $(SITEFLAG) -batch \
+ -l $(shell pwd | sed -e 's|^/cygdrive/\([a-z]\)|\1:|')/$(AUTOLOADFILE) \
+ -f color-theme-generate-autoloads \
+ $(shell pwd | sed -e 's|^/cygdrive/\([a-z]\)|\1:|')/$(AUTOLOADFILE).el . \
+ $(THEMES_DIRECTORY)
+
+$(AUTOLOADFILE).elc: $(AUTOLOADFILE).el
+ @echo "Byte compiling the autoload file "$<
+ @$(EMACS) -batch -q -f batch-byte-compile $^
+ @echo "*******************************************************************"
+ @echo "Autoloads up to date. Put the following lines in your configuration"
+ @echo "file (~/.emacs for a single user) :"
+ @echo
+ @echo ${patsubst %, "(add-to-list 'load-path \""%"\") ", $(LISPDIRS)}
+ @echo "(require 'color-theme-autoload \""$(AUTOLOADFILE)"\")"
+ @echo
+
+%.elc: %.el
+ @$(EMACS) $(OPTIONCOMPILE) \
+ --eval '(setq load-path (cons "." load-path))' \
+ -f batch-byte-compile $<
+
+%.info: %.texi
+ @echo "No doc yet !"
+# makeinfo $<
+
+%.html: %.texi
+ @echo "No doc yet !"
+# makeinfo --html --no-split $<
+
+doc: $(MANUAL).info $(MANUAL).html
+ @echo "No doc yet !"
+
+clean:
+ -rm -f themes/*.elc
+ -rm -f *~ *.elc $(AUTOLOADFILE).el
+
+realclean: clean
+ -rm -f $(MANUAL).info $(MANUAL).html $(TARGET) $(SPECIAL)
+
+install-info: $(MANUAL).info
+ [ -d $(INFODIR) ] || install -d $(INFODIR)
+ install -m 0644 $(MANUAL).info $(INFODIR)/$(MANUAL)
+ $(INSTALLINFO) $(INFODIR)/$(MANUAL)
+
+install-bin: lisp
+ install -d $(ELISPDIR)
+ install -d $(ELISPDIR)/themes
+ install -m 0644 $(ALLSOURCE) $(TARGET) $(ELISPDIR)
+ install -m 0644 $(THEMES_FILES) $(TARGET) $(ELISPDIR)/themes
+
+install: install-bin install-info
+
+distclean:
+ -rm $(MANUAL).info $(MANUAL).html $(TARGET)
+ -rm -Rf ../$(DISTDIR)
+ -rm -f debian/dirs debian/files
+
+# dist: distclean
+# cvs checkout -r $(TAG) -d $(PROJECT)-$(VERSION) color-theme | \
+# (mkdir -p ../$(PROJECT)-$(VERSION); cd ../$(PROJECT)-$(VERSION) && \
+# tar xf -)
+# rm -fr ../$(PROJECT)-$(VERSION)/debian ../$(PROJECT)-$(VERSION)/test
+
+# From w3m-el
+dist: Makefile $(AUTOLOADFILE).elc
+ $(MAKE) tarball \
+ VERSION=`$(EMACS) $(SITEFLAG) -f w3mhack-version 2>/dev/null` \
+ BRANCH=`cvs status color-theme.el |grep "Sticky Tag:"|awk '{print $$3}'|sed 's,(none)\,HEAD,'`
+
+tarball: CVS/Root CVS/Repository
+ $(MAKE) distclean
+ -rm -fr ../$(PROJECT)-$(VERSION)/debian ../$(PROJECT)-$(VERSION)/test
+ -rm -rf $(DISTDIR) $(TARBALL) `basename $(TARBALL) .gz`
+ cvs -d `cat CVS/Root` -w export -d $(DISTDIR) -r $(BRANCH) `cat CVS/Repository`
+ -cvs diff |( cd $(DISTDIR) && patch -p0 )
+ # for f in BUGS.ja w3m-e22.el; do\
+# if [ -f $(DISTDIR)/$${f} ]; then\
+# rm -f $(DISTDIR)/$${f} || exit 1;\
+# fi;\
+# done
+ find $(DISTDIR) -name .cvsignore | xargs rm -f
+ find $(DISTDIR) -type d | xargs chmod 755
+ find $(DISTDIR) -type f | xargs chmod 644
+ cd $(DISTDIR) && autoconf
+ chmod 755 $(DISTDIR)/configure $(DISTDIR)/install-sh
+ tar -cf `basename $(TARBALL) .gz` $(DISTDIR)
+ gzip -9 `basename $(TARBALL) .gz`
+ rm -rf $(DISTDIR)
+
+debprepare: $(ALLSOURCE) $(SPECIAL) distclean
+ mkdir ../$(DISTDIR) && chmod 0755 ../$(DISTDIR)
+ cp $(ALLSOURCE) $(SPECIAL) $(MISC) ../$(DISTDIR)
+ cp -r themes ../$(DISTDIR)
+ test -d ../$(DISTDIR)/themes/.arch-ids && rm -R \
+ ../$(DISTDIR)/themes/.arch-ids || :
+ test -d ../$(DISTDIR)/themes/CVS && rm -R \
+ ../$(DISTDIR)/themes/.arch-ids || :
+
+debbuild:
+ (cd ../$(DISTDIR) && \
+ dpkg-buildpackage -v$(LASTUPLOAD) $(BUILDOPTS) \
+ -us -uc -rfakeroot && \
+ echo "Running lintian ..." && \
+ lintian -i ../color-theme-el_$(VERSION)*.deb || : && \
+ echo "Done running lintian." && \
+ debsign)
+
+debrelease: debprepare
+ (cd .. && tar -czf color-theme_$(VERSION).orig.tar.gz $(DISTDIR))
+ cp -R debian ../$(DISTDIR)
+ test -d ../$(DISTDIR)/debian/CVS && rm -R \
+ ../$(DISTDIR)/debian/CVS \
+ ../$(DISTDIR)/debian/maint/CVS \
+ ../$(DISTDIR)/debian/scripts/CVS || :
+ test -d ../$(DISTDIR)/debian/.arch-ids && rm -R \
+ ../$(DISTDIR)/debian/.arch-ids \
+ ../$(DISTDIR)/debian/maint/.arch-ids \
+ ../$(DISTDIR)/debian/scripts/.arch-ids || :
+ $(MAKE) debbuild
+
+release: autoloads distclean
+ mkdir ../$(DISTDIR) && chmod 0755 ../$(DISTDIR)
+ cp $(SPECIAL) $(UNCOMPILED) $(SOURCE) $(MISC) ../$(DISTDIR)
+ cp -r themes ../color-theme-el-$(VERSION)/
+ test -d ../$(DISTDIR)/themes/CVS && \
+ rm -R ../$(DISTDIR)/themes/CVS || :
+ test -d ../$(DISTDIR)/themes/.arch-ids && \
+ rm -R ../$(DISTDIR)/themes/.arch-ids || :
+ (cd .. && tar czf color-theme-el-$(VERSION).tar.gz $(DISTDIR)/*; \
+ zip -r color-theme-el-$(VERSION).zip $(DISTDIR))
+
+upload:
+ (cd .. && echo open ftp://upload.sourceforge.net > upload.lftp ; \
+ echo cd /incoming >> upload.lftp ; \
+ echo mput color-theme-$(VERSION).zip >> upload.lftp ; \
+ echo mput color-theme-$(VERSION).tar.gz >> upload.lftp ; \
+ echo close >> upload.lftp ; \
+ lftp -f upload.lftp ; \
+ rm -f upload.lftp)
View
35 Makefile.defs
@@ -0,0 +1,35 @@
+# -*- Makefile -*-
+EMACS = emacs
+SITEFLAG = --no-site-file
+OPTIONCOMPILE = -q --no-site-file --batch
+
+# XEmacs users will probably want the following settings.
+#EMACS = xemacs
+#SITEFLAG = -no-site-file
+
+# Installation options
+# PREFIX is only used here.
+PREFIX = /usr/local
+ELISPDIR = $(PREFIX)/share/emacs/site-lisp/color-theme-el
+INFODIR = $(PREFIX)/info
+
+# Command to use to install the Info dir entry
+# If you're using Debian, uncomment the following line and comment out
+#the above line.
+#INSTALLINFO = install-info --section "Emacs" "emacs" --info-dir=$(INFODIR)
+INSTALLINFO = install-info --info-dir=$(INFODIR)
+
+# Useful only for the maintainer
+PROJECT = color-theme
+DEBNAME = color-theme-el
+VERSION = 6.6.0
+DISTDIR = $(PROJECT)-$(VERSION)
+TARBALL = $(DISTDIR).tar.gz
+ZIPFILE = $(DISTDIR).zip
+
+MANUAL =
+LASTUPLOAD = 6.5.4-4
+BUILDOPTS =
+
+# DO NOT TOUCH THIS
+TAG = $(shell echo RELEASE-$(VERSION) | tr '.' '-')
View
15 color-theme-autoloads.in
@@ -0,0 +1,15 @@
+;;; -*-emacs-lisp-*-
+
+;; Copyright (C) 2002 Free Software Foundation, Inc.
+
+(defvar generated-autoload-file)
+(defvar command-line-args-left)
+(defun color-theme-generate-autoloads ()
+ (interactive)
+ (require 'autoload)
+ (setq generated-autoload-file (car command-line-args-left))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (batch-update-autoloads))
+
+(provide 'color-theme-autoloads)
+;;; Generated autoloads follow (made by autoload.el).

0 comments on commit 30812fa

Please sign in to comment.