From: Howard Chu Date: Fri, 29 Jul 2005 12:06:12 +0000 (+0000) Subject: Fix install-schema - move old schema dir out of the way, always install X-Git-Tag: OPENLDAP_AC_BP~155 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=53d94be203e541417fd9ae387ae3c64e476a4926;p=openldap Fix install-schema - move old schema dir out of the way, always install a fresh copy of everything. --- diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 4fb79fd895..4301c4f7ab 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -401,23 +401,16 @@ all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) dynamic_overlays touch all-cffiles install-schema: FORCE - @-$(MKDIR) $(DESTDIR)$(schemadir) - i="$(srcdir)/schema/README" ; \ - SF=`basename $$i` ; \ - SD="$(DESTDIR)$(schemadir)/$$SF" ; \ - echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \ - $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD - for i in $(srcdir)/schema/*.schema ; do \ - SF=`basename $$i` ; \ - SD="$(DESTDIR)$(schemadir)/$$SF" ; \ - if test ! -f $$SD ; then \ - echo "installing $$SF in $(schemadir)" ; \ - echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \ - $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \ - else \ - echo "PRESERVING EXISTING SCHEMA FILE $$SD" ; \ - fi ; \ - $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD.default ; \ + @if test -e $(DESTDIR)$(schemadir) ; then \ + echo "MOVING EXISTING SCHEMA DIR to $(DESTDIR)$(schemadir).$$$$" ; \ + mv $(DESTDIR)$(schemadir) $(DESTDIR)$(schemadir).$$$$ ; \ + fi + $(MKDIR) $(DESTDIR)$(schemadir) + @SD=$(DESTDIR)$(schemadir) ; \ + files=`cd $(srcdir)/schema ; echo README *.schema` ; \ + for i in $$files ; do \ + echo $(INSTALL) $(INSTALLFLAGS) -m 444 schema/$$i $$SD/$$i ; \ + $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i ; \ done install-conf: FORCE