# Makefile for the IVOA vocabularies SKOS distribution # @configure_input@ RELEASE=@PACKAGE_VERSION@ # Base URI for the vocabularies -- no trailing slash BASEURI=@BASEURI@ # 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 doc/vocabularies.xhtml rm -Rf ${@:.tar=} mkdir ${@:.tar=} cp doc/vocabularies.xhtml ${@:.tar=} cd ${@:.tar=} && $(TAR) xf ../src/$(DISTNAME).tar rm -f $@ $(TAR) cf $@ ${@:.tar=} rm -Rf ${@:.tar=} src/$(DISTNAME).tar: Makefile cd src; make 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=} D=`basename $(BASEURI)`; \ cd ${@:.tar=}; \ $(TAR) xzf ../vocabularies-$(RELEASE).tar.gz; \ mv vocabularies-$(RELEASE) $$D; \ cp ../vocabularies-$(RELEASE).tar.gz $$D; \ cd $$D; \ mv vocabularies.xhtml index.xhtml; \ for f in `ls *.ttl | sed 's/\.ttl$$//'`; do \ sed "s/FOO/$$f/" ../../ivoa-document-tree-template.map >$$f.map; \ done; \ echo "This tarball should be unpacked so that the file @BASEURI@/index.xhtml is served successfully" >000-Bruno-note; \ cp ../../ivoa-document-tree.htaccess .htaccess rm -f $@ $(TAR) cf $@ ${@:.tar=} rm -Rf ${@:.tar=} ######################################## # # Maintenance 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. 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