Revision 8 (by gdshaw@RISCPKG.ORG, 2007/03/15 20:32:34) Added copyright file.
# This file is part of the RISC OS Packaging Project !System application.
# Copyright � 2005 Graham Shaw.
# Redistribution and modification are permitted under the terms of the
# GNU General Public License (version 2 or any later version).

VERSION = 0.0.0
PACKAGES = System_$(VERSION)

all:
	make -C System
	rm -rf Temp
	mkdir -p Temp/RiscPkg
	cp RiscPkg/Copyright Temp/RiscPkg/Copyright
	cp -R System Temp

	chmod -R 444 Temp/System
	make -C Temp -f ../RiscPkg/Rules $(PACKAGES)
	rm -rf Temp

.PHONY: clean
clean:
	make -C System clean
	rm -rf Temp
	rm -f $(PACKAGES)

.PHONY: distclean
distclean: clean

.PHONY: $(PACKAGES)
$(PACKAGES): %:
	riscpkg-gencontrol $(firstword $(subst _, ,$@)) < ../RiscPkg/Control > RiscPkg/Control
	rm -f ../$@
	zip -r ../RiscPkg/$@ * -i@../RiscPkg/$(firstword $(subst _, ,$@)).inc