1# Makefile.in for sawfish's Lisp files 2# $Id: Makefile.in,v 1.30 2002/07/05 01:17:35 jsh Exp $ 3# 4# Copyright (C) 1999 John Harper <john@dcs.warwick.ac.uk> 5# 6# This file is part of sawfish. 7# 8# sawfish is free software; you can redistribute it and/or modify it 9# under the terms of the GNU General Public License as published by 10# the Free Software Foundation; either version 2, or (at your option) 11# any later version. 12# 13# sawfish is distributed in the hope that it will be useful, but 14# WITHOUT ANY WARRANTY; without even the implied warranty of 15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16# GNU General Public License for more details. 17# 18# You should have received a copy of the GNU General Public License 19# along with sawfish; see the file COPYING. If not, write to 20# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 21 22include ../Makedefs 23 24top_builddir=.. 25top_srcdir=@top_srcdir@ 26 27REP_ENVIRON:=$(REP_ENVIRON) REP_LOAD_PATH=$(top_srcdir)/lisp:$(top_builddir)/lisp 28 29# also in themes/Makefile.in 30sawfish_prog = ../src/sawfish --batch --no-rc 31COMPILE_ENV = SAWFISHLISPDIR=. \ 32 SAWFISHEXECDIR=$(top_builddir)/src/.libexec \ 33 SAWFISHDOCFILE=../DOC \ 34 SAWFISH_USER_LISP_DIR= 35 36SAWFISH_LISP_FILES := sawfish/wm.jlc 37SAWFISH_LISP_DIRS := sawfish/wm 38 39INSTALL_FILES := *.jl *.jlc 40 41SUBDIRS := sawfish/gtk sawfish/cfg 42 43INSTALL_DIRS := \ 44 sawfish sawfish/wm sawfish/wm/ext \ 45 sawfish/wm/placement sawfish/wm/integration \ 46 sawfish/wm/animation sawfish/wm/theming \ 47 sawfish/wm/state sawfish/wm/util \ 48 sawfish/wm/commands sawfish/wm/session \ 49 sawfish/wm/tabs sawfish/wm/edge \ 50 sawfish/wm/prg sawfish/wm/tile 51 52all : lisp 53 set -e; for d in $(SUBDIRS); do \ 54 ( cd $$d && $(MAKE) $@ ); \ 55 done 56 57lisp : $(SAWFISH_LISP_FILES) 58 set -e; for d in $(SAWFISH_LISP_DIRS); do \ 59 $(COMPILE_ENV) $(sawfish_prog) compiler -f compile-lib-batch $$d; \ 60 done 61 62sawfish/wm.jlc : sawfish/wm.jl 63 $(COMPILE_ENV) $(sawfish_prog) compiler -f compile-batch $^ 64 65install : all installdirs 66 set -e; for d in $(SUBDIRS); do \ 67 ( cd $$d && $(MAKE) $@ ); \ 68 done 69 set -e; for d in $(INSTALL_DIRS); do \ 70 for f in $(foreach x,$(INSTALL_FILES),$$d/$(x)); do \ 71 $(INSTALL_DATA) $$f $(DESTDIR)$(lispdir)/$$d; \ 72 done \ 73 done 74 $(rep_INSTALL_ALIASES) -l . $(DESTDIR)$(lispdir) 75 76installdirs : $(top_srcdir)/mkinstalldirs 77 $(SHELL) $< $(foreach x,$(INSTALL_DIRS),$(DESTDIR)$(lispdir)/$(x)) 78 79uninstall : 80 set -e; for d in $(SUBDIRS); do \ 81 ( cd $$d && $(MAKE) $@ ); \ 82 done 83 for d in $(INSTALL_DIRS); do \ 84 for f in $(foreach x,$(INSTALL_FILES),$$d/$(x)); do \ 85 rm -f $(DESTDIR)$(lispdir)/$$f; \ 86 done \ 87 done 88 89clean : 90 set -e; for d in $(SUBDIRS); do \ 91 ( cd $$d && $(MAKE) $@ ); \ 92 done 93 rm -f `find . \( -name '*.jlc' -o -name '*~' -o -name core \) -print` 94 95distclean: clean 96 set -e; for d in $(SUBDIRS); do \ 97 ( cd $$d && $(MAKE) $@ ); \ 98 done 99 rm -f Makefile sawfish/gtk/widgets/font.jl 100 101.PHONY : all lisp install uninstall clean distclean 102