# Makefile for the IVOA vocabularies SKOS distribution # # Each of the SUBDIRS X, should generate a X/X.tar and X/Notes file # as part of its 'all' target. # # The 'all' target in this file produces a $(DISTNAME).tar file. # Distribution name -- can be overridden DISTNAME=@DISTNAME@ BASEURI=@BASEURI@ # The 'tar' program -- it's sometimes useful to override this # on the command line TAR=@TAR@ ######################################## # # The list of vocabularies which live under here # (ignore AOIM, which has been renamed to AVM). SUBDIRS=AAkeys AVM UCD IVOAT IAUT93 AAkeys2AVM ######################################## # # Rules %.gz: % rm -f $@ gzip --best $< %.stamp: % cd $<; make touch $@ ######################################## # # Targets all: $(DISTNAME).tar $(DISTNAME).tar: $(SUBDIRS:=.stamp) rm -Rf tempdir mkdir tempdir tempdir/$(DISTNAME) cd tempdir/$(DISTNAME); \ for d in $(SUBDIRS); do mkdir $$d; (cd $$d; tar xf ../../../$$d/$$d.tar); done sed -e '/^##/d' \ -e 's,@BASE\@,'`echo $(BASEURI)|sed 's,^http://[^/]*,,'`, \ -e 's,@FILEOPTS\@,'`echo $(SUBDIRS) | sed 's/ /|/g'`, \ -e 's,@SUBDIR\@,$(DISTNAME),' dot-htaccess >tempdir/.htaccess ( cat README; \ for d in $(SUBDIRS); do echo;echo;if test -f $$d/Notes; then cat $$d/Notes; else echo "### No notes on $$d";fi; done; ) \ >tempdir/README-$(DISTNAME) cd tempdir; $(TAR) cf ../$@ . # rm -Rf tempdir clean: rm -Rf *.stamp $(DISTNAME).tar $(DISTNAME).tar.gz for d in $(SUBDIRS); do (cd $$d; make clean); done realclean: clean rm -f Makefile # for d in $(SUBDIRS); do (cd $$d; make -i realclean); done