# Makefile for the Sketch Homepage # # Main targets: # # all build the html files # copy create the home-page's directory hierarchy in htdoc/ # clean remove the created files # # # Tools configuration # # directory where the tools are located TOOLS_DIR = ../tools # # SGML Config # # directory where the SGML DTD and scripts ar located SGML_DIR = $(TOOLS_DIR)/sgml # How to invoke the SGML processing script SGMLTOHTML = $(SGML_DIR)/mkhomepage.py # The DTD for the Sketch Homepage SGML DTD = $(SGML_DIR)/skhome.dtd # # FAQ config # # Directory where the faq xml file is located FAQ_DIR = ../faq # FAQ converter script FAQCONV = $(TOOLS_DIR)/faq/faqdom.py # # Other Tools # # Script to convert NEWS files to SGML NEWS_CONV = $(TOOLS_DIR)/misc/news.py # # SourceForge Settings # RSYNC = /usr/bin/rsync RSYNCSSH = -e /usr/bin/ssh SF_WEBDIR = /home/groups/s/sk/sketch/htdocs SF_FTPDIR = /home/groups/ftp/pub/sketch # The SourceForge user and host for rsync commands. Set the actual # username in Makefile.config. See below. SF_USER = SF_HOST = sketch.sourceforge.net # include a local makefile that is not in CVS so that users can override # some of the defaults, especially the SF_USER name. include Makefile.config # List of sgml files to process SGML_FILES = homepage mainpage relnotes news oldnews download addon bugs \ resource scrshots features portability doc devel devnews devnotes \ gallery payments python faq faqin mailinglists FILES = $(SGML_FILES:%=%.sgml) sketch.css sflogo.txt WEBFILES = $(SGML_FILES:%=%.html) index.html platforms.html \ scripts.html screenshots.html links.html WEBIMAGES = # By default, build the webpage locally all: gallery webpage # Build the gallery images gallery: cd Gallery && $(MAKE) # Build the web locally, that is with all files in this directory. We # depend on index.html because that will always be built by the scripts. webpage: index.html # Build the HTML files from the SGML files. index.html: $(FILES) $(DTD) $(SGMLTOHTML) $(SGMLTOHTML) $< # news.sgml is built by a script from NEWS. NEWS is just a copy of the # NEWS file of Sketch 0.6.x. Copy the time-stamp from the source file # since the time-stamp of the output file is used for the # "last-modified" date in the HTML news.sgml: NEWS $(NEWS_CONV) $(NEWS_CONV) NEWS news.sgml touch -r $< $@ # devnews.sgml is built by a script from DEVNEWS. DEVNEWS is a copy of # the NEWS file of Sketch 0.7. Copy the time-stamp from the source file # since the time-stamp of the output file is used for the # "last-modified" date in the HTML devnews.sgml: DEVNEWS $(NEWS_CONV) $(NEWS_CONV) DEVNEWS devnews.sgml touch -r $< $@ # The faq is built from an XML file. faqin.sgml is included by faq.sgml. # Copy the time-stamp from the source file since the time-stamp of the # output file is used for the "last-modified" date in the HTML faqin.sgml: $(FAQ_DIR)/faq.xml $(FAQCONV) $(FAQCONV) -n $(FAQ_DIR)/faq.xml faqin.sgml touch -r $< $@ # Where to put the local copy of the directory hierarchy as it exists on # the server LOCAL_SITE = htdocs # doc: cd ../Sketch/Doc; make rm -rf Doc/* cp ../Sketch/Doc/globals.refdb doc.refdb cd ../Sketch/Doc; cp -Pl *.html ~/Source/Doc/Homepage/Doc cd ../Sketch/Doc; cp -Pl Images/*.png ~/Source/Doc/Homepage/Doc copy: rm -rf $(LOCAL_SITE)/* [ -e $(LOCAL_SITE) ] || mkdir $(LOCAL_SITE) cp -Pl *.html *.css Images/*.png LGPL $(LOCAL_SITE) cp -Pl Gallery/*.{jpg,tar.gz} $(LOCAL_SITE) cp -Plr Patches Doc Binaries $(LOCAL_SITE) cp -Pl *.html *.css Images/*.{png,gif} LGPL *gz *.rpm $(LOCAL_SITE) cp -Plr files $(LOCAL_SITE) # Assuming you've done "make all copy" you can use "make rsync" to put # the files onto the server. Assumes especially that SF_USER has been # set to your SF user id rsync: $(RSYNC) -rltvz $(RSYNCSSH) htdocs/ $(SF_USER)@$(SF_HOST):$(SF_WEBDIR) # # There are some binary files on the Sketch web-page that are not in # CVS. You can use the following two targets to rerieve them from the # server. # # retrieve the whole files/ subtree from the website. getfiles: $(RSYNC) -rltvz -b $(RSYNCSSH) \ $(SF_USER)@$(SF_HOST):$(SF_WEBDIR)/files/ files # Get the other files. Except for Patches/ all other files are now in # files/ and these extra files are only there for "backwards # compatibility". No need to break existing links. getextrafiles: $(RSYNC) -rltvz $(RSYNCSSH) \ $(SF_USER)@$(SF_HOST):$(SF_WEBDIR)/Patches . $(RSYNC) -rltvz $(RSYNCSSH) \ $(SF_USER)@$(SF_HOST):$(SF_WEBDIR)/Binaries . $(RSYNC) -rltvz $(RSYNCSSH) \ $(SF_USER)@$(SF_HOST):$(SF_WEBDIR)/*.rpm . $(RSYNC) -rltvz $(RSYNCSSH) \ $(SF_USER)@$(SF_HOST):$(SF_WEBDIR)/*.gz . # remove automatically built files clean: rm -f $(WEBFILES) rm -f news.sgml devnews.sgml faqin.sgml # rule executed when no Makefile.config exists. Tell the user to create # one. Makefile.config: @echo "Create a file Makefile.config first. See comments in Makefile"