# Makefile for the IVOA vocabularies SKOS distribution # @configure_input@ RELEASE=@PACKAGE_VERSION@ RELEASEDATEN=@RELEASEDATEN@ # Base URI for the vocabularies -- no trailing slash BASEURI=@BASEURI@ # Base URI for the document DOCURI=@DOCURI@ # Distribution name -- can be overridden DISTNAME=@DISTNAME@ TAR=@TAR@ ######################################## # # Rules %.gz: % rm -f $@ gzip --best $< ######################################## # # Targets all: vocabularies-$(RELEASE).tar.gz # This is the main release product, containing the vocabularies # and the associated document. It includes a 000-webmaster note, # to guide the destination webmaster where the files should be placed, # and check-uris.sh, to help them check that everything's installed # where it should be. vocabularies-$(RELEASE).tar: src/$(DISTNAME).tar.gz doc/vocabularies.html check-uris.sh D=${@:.tar=}; \ rm -Rf $$D; \ mkdir $$D; \ cp doc/vocabularies.html $$D/`echo $(DOCURI).html | sed 's,.*/,,'`; \ cp src/$(DISTNAME).tar.gz check-uris.sh $$D; \ ( echo "Document URI:"; echo " $(DOCURI).html"; echo; \ echo "Vocabulary base URI:"; echo " $(BASEURI)"; \ echo "unpack $(DISTNAME).tar.gz in that directory."; \ echo "Note the .htaccess in the RDF directory."; \ echo "Running ./check-uris.sh should confirm all redirections are OK.") > $$D/000-webmaster rm -f $@ $(TAR) cf $@ ${@:.tar=} # rm -Rf ${@:.tar=} src/$(DISTNAME).tar.gz: Makefile cd src; make $(DISTNAME).tar.gz doc/vocabularies.html: Makefile cd doc; make vocabularies.html ######################################## # # Maintainance targets # Note that 'configure' is checked in (to make it possible to configure and # build the project from a checkout, with the minimum amount of fuss). # However we don't here include a dependency of configure on configure.ac: # because Subversion doesn't preserve timestamps, we couldn't guarantee that # this rule wouldn't fire inappropriately, and a stray firing of this # rule vitiates the point of including ./configure in the repository. # Similarly for the Makefile:Makefile.in rule. # A post-installation test target, which checks that all the redirections on the # server match what the document says they'll be. check: @ echo "Install $(DISTNAME).tar.gz as directed, and then run 'make install-check'" install-check: check-uris.sh ./check-uris.sh check-uris.sh: check-uris.sh.in Makefile sed -e 's,@BASEURI\@,$(BASEURI),' \ -e 's,@DISTNAME\@,$(DISTNAME),' \ check-uris.sh.in >check-uris.sh chmod +x check-uris.sh clean: for d in src doc; do (cd $$d; make clean); done realclean: clean rm -f Makefile config.log config.status for d in src doc; do (cd $$d; make realclean); done