# 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 vocabularies-$(RELEASE).tar: src/$(DISTNAME).tar.gz doc/vocabularies.xhtml D=${@:.tar=}; \ rm -Rf $$D; \ mkdir $$D; \ cp doc/vocabularies.xhtml $$D/vocabularies-`echo $(RELEASEDATEN)|sed s/-//g`.html; \ cp src/$(DISTNAME).tar.gz $$D; \ ( echo "Document URI:"; echo " $(DOCURI).html"; echo; \ echo "Vocabulary base URI:"; echo " $(BASEURI)"; \ echo "unpack $(DISTNAME).tar.gz in that directory") > $$D/000-webmaster rm -f $@ $(TAR) cf $@ ${@:.tar=} # rm -Rf ${@:.tar=} src/$(DISTNAME).tar.gz: Makefile cd src; make $(DISTNAME).tar.gz doc/vocabularies.xhtml: Makefile cd doc; make # Prepare a bundle for the IVOA document coordinator. # # The .../vocabularies-$(RELEASE) directory in the IVOA document # tree has to contain the document itself, the tarball above # (for easy retrieval, and because it is documented as being there # in the document), and the various RDF files (so that they are retrievable # at their namespace URLs). # # Include Apache-1.3 configuration files, so that the document coordinator # should be able to simply unpack this tarball in the correct place. # This should be regarded as temporary: replace it with the patterns based # on Apache mod_rewrite (once Norman has checked with Bruno that that's # supported on the ivoa.net Apache). # #ivoa-document-tree-$(RELEASE).tar: vocabularies-$(RELEASE).tar.gz # rm -Rf ${@:.tar=} # mkdir ${@:.tar=} # TOP=`pwd`; DD=vocabularies-`echo $(RELEASEDATEN)|sed s/-//g`; \ # cd ${@:.tar=}; \ # $(TAR) xzf $$TOP/vocabularies-$(RELEASE).tar.gz; \ # mv vocabularies-$(RELEASE)/* .; rmdir vocabularies-$(RELEASE); \ # echo "This tarball should be unpacked so that the file @BASEURI@.html is served successfully" >000-Bruno-note; \ # cd $$DD; \ # for f in `ls *.ttl | sed 's/\.ttl$$//'`; do \ # sed "s/FOO/$$f/" $$TOP/ivoa-document-tree-template.var >$$f.var; \ # done; \ # cp $$TOP/ivoa-document-tree.htaccess .htaccess # rm -f $@ # $(TAR) cf $@ ${@:.tar=} ## rm -Rf ${@:.tar=} ######################################## # # 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