#
# CDWserver/config/Makefile
#
# This file is part of webCDwriter - Network CD Writing.
#
# Copyright (C) 1999-2003 Jrg P. M. Haeger
#
# webCDwriter is free software. See CDWserver.cpp for details.
#

include ../../config

config: config.default
	cp -pfv config.default config

install: config
	install -d -m 755 $(CONFIGDIR)
	$(INSTALL_644) config.default $(CONFIGDIR)
	$(INSTALL_UG) -m 600 accounts $(CONFIGDIR) 2> /dev/null \
		|| $(INSTALL) -m 600 accounts $(CONFIGDIR)
	$(INSTALL_644) config $(CONFIGDIR) 2> /dev/null || :
	@for name in [!M]* ; do \
		if test -f $(CONFIGDIR)$$name ; then \
			echo "$@ will not overwrite existing $(CONFIGDIR)$$name"; \
		else \
			echo "$(INSTALL_FILE) $$name $(CONFIGDIR)"; \
			$(INSTALL_644) $$name $(CONFIGDIR); \
		fi; \
	done

clean:
	rm -rf .[!.]*
	rm -f *~ *.o core config
