#!/usr/bin/make -f
# debian/rules for colorgcc using debhelper.
# Copyright (C) 2003 David Weinehall <tao@debian.org>

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# all patches
PATCHES:=$(shell cd debian/patches && ls *.patch)
REVPATCHES:=$(shell cd debian/patches && ls -r *.patch)

patch: patch-stamp
patch-stamp:
	# apply patches
	#
	for PATCH in $(PATCHES); do \
	echo \# Applying patch $$PATCH; \
	 patch -p1 < debian/patches/$$PATCH; \
	done

	touch patch-stamp

.PHONY: build
build:

.PHONY: clean
clean:
	dh_testdir
	dh_testroot
	dh_clean build-stamp

.PHONY: binary-arch
binary-arch:
# There is nothing to see here. Move along.

.PHONY: binary-indep
binary-indep:
	dh_testdir
	dh_testroot
	dh_installdirs
	dh_installdocs
	dh_install colorgccrc etc/colorgcc
	dh_install colorgcc usr/bin
	dh_installman debian/colorgcc.1 debian/colorgccrc.5
	dh_installchangelogs ChangeLog
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
	touch debian/substvars
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

.PHONY: binary
binary: patch-stamp binary-indep binary-arch
