GITORIG = /home/thomas/dev/univnautes/pfsense
DIFFDIR = ../copy_overlay/usr/src/univnautes-patches

all: test

diff:
	for f in `grep -v "^#" list`; \
	do \
		echo "diff `basename $$f`.diff"; \
		diff -u orig/`basename $$f` new/`basename $$f` > $(DIFFDIR)/`basename $$f`.diff || true ; \
	done

patch:
	for f in `grep -v "^#" list`; \
	do \
		echo patching $$f ; \
		patch $$f `basename $$f`.diff ; \
		echo delete $$f.orig ; \
		rm -f $$f.orig ; \
		echo "" ; \
	done

test:
	for f in `grep -v "^#" list`; \
	do \
		test -r $(GITORIG)/$$f || exit ; \
		echo compare $$f ; \
		cmp orig/`basename $$f` $(GITORIG)/$$f || exit ; \
	done
