# Makefile.in for sawfish.gtk subdirectory

# $Id: Makefile.in,v 1.3 2002/04/19 05:29:00 jsh Exp $

# Copyright (C) 2000 John Harper <john@dcs.warwick.ac.uk>

# This file is part of sawfish.

# sawfish is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# sawfish is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with sawfish; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

makepp_percent_subdirs=1
include ../../../Makedefs

top_builddir=../../../
top_srcdir=@top_srcdir@
srcdir=@srcdir@

REP_ENVIRON:=$(REP_ENVIRON) REP_LOAD_PATH=$(top_srcdir)/lisp:$(top_builddir)/lisp

SRCS :=	widget.jl		

W_SRCS := widgets/alist.jl	\
	widgets/color.jl	\
	widgets/command.jl	\
	widgets/event.jl	\
	widgets/file.jl		\
	widgets/font.jl		\
	widgets/frame-style.jl	\
	widgets/image.jl	\
	widgets/keymap.jl	\
	widgets/list.jl		\
	widgets/match-window.jl	\
	widgets/modifier-list.jl\
	widgets/pair.jl		\
	widgets/simple-dialog.jl\
	widgets/scheme-boolean.jl

OBJS := $(SRCS:.jl=.jlc)
W_OBJS := $(W_SRCS:.jl=.jlc)

ALL_SRCS := $(SRCS) $(W_SRCS)
ALL_OBJS := $(OBJS) $(W_OBJS)

%.jlc : %.jl
	$(REP_ENVIRON) rep compiler -f compile-batch $<

all : $(ALL_SRCS) $(ALL_OBJS)

install : all installdirs
	set -e; for p in $(SRCS) $(OBJS); do \
	  $(INSTALL_DATA) $$p $(DESTDIR)${lispdir}/sawfish/gtk; \
	done
	set -e; for p in $(W_SRCS) $(W_OBJS); do \
	  $(INSTALL_DATA) $$p $(DESTDIR)${lispdir}/sawfish/gtk/widgets; \
	done

uninstall :
	for p in $(SRCS) $(OBJS); do \
	  rm -f $(DESTDIR)${lispdir}/sawfish/gtk/$$p; \
	done
	for p in $(W_SRCS) $(W_OBJS); do \
	  rm -f $(DESTDIR)${lispdir}/sawfish/gtk/widgets/$$p; \
	done

installdirs : $(top_srcdir)/mkinstalldirs
	$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(lispdir)/sawfish/gtk \
	  $(DESTDIR)$(lispdir)/sawfish/gtk/widgets

clean :
	rm -f *.jlc *~ core
	rm -f widgets/*~ widgets/*.jlc

distclean: gitclean

gitclean : clean
	rm -f Makefile

.PHONY: all install uninstall clean gitclean distclean
