
include ../../config

ROOT=$(RPM_BUILD_ROOT)/$(PREFIX)/
CONFIGDIR=$(ROOT)/etc/CDWserver/

INSTALL_FILE=install -m 644 -p

config: config.default
	cp -afv config.default config

install: config
	install -d $(CONFIGDIR)
	$(INSTALL_FILE) config.default $(CONFIGDIR)/
	@for name in config config.html [!cM]* ; do \
		if test -f $(CONFIGDIR)$$name ; then \
			echo "$@ will not overwrite existing $(CONFIGDIR)$$name"; \
		else \
			echo "$(INSTALL_FILE) $$name $(CONFIGDIR)"; \
			$(INSTALL_FILE) $$name $(CONFIGDIR); \
		fi; \
	done

clean:
	rm -f config
