# Makefile for the IVOA vocabularies SKOS distribution # @configure_input@ RELEASE=@PACKAGE_VERSION@ RELEASEDATEN=@RELEASEDATEN@ # 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.gz doc/vocabularies.xhtml D=${@:.tar=}; DN=$$D/vocabularies-`echo $(RELEASEDATEN)|sed s/-//g`; TOP=`pwd`; \ rm -Rf $$D; \ mkdir $$D; mkdir $$DN; \ cp doc/vocabularies.xhtml $$DN.html; \ cp src/$(DISTNAME).tar.gz $$DN; \ cd $$DN && $(TAR) xzf $$TOP/src/$(DISTNAME).tar.gz 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=} ######################################## # # 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