1SUBDIRS = src
2
3EXTRA_DIST = libsdp.spec.in libsdp.conf
4
5dist-hook: libsdp.spec
6	cp libsdp.spec $(distdir)
7
8install-data-hook:
9	if test -e $(DESTDIR)$(sysconfdir)/libsdp.conf; then \
10		diff -q $(srcdir)/libsdp.conf $(DESTDIR)$(sysconfdir)/libsdp.conf 1> /dev/null; \
11		if test $$? == 1; then \
12			t=$(shell date +'%Y%m%d%H%M%S'); \
13		   cp -p $(srcdir)/libsdp.conf \
14				$(DESTDIR)$(sysconfdir)/libsdp.conf.$$t; \
15			echo "NOTE: existing libsdp.conf was not updated."; \
16			echo "      libsdp.conf installed as ibsdp.conf.$$t instead."; \
17		fi; \
18	else \
19		if test ! -d $(DESTDIR)$(sysconfdir); then \
20			mkdir -p $(DESTDIR)$(sysconfdir); \
21		fi; \
22		cp -p $(srcdir)/libsdp.conf $(DESTDIR)$(sysconfdir)/libsdp.conf; \
23	fi
24