# # A make file for the Emperor Linux website # # Lincoln D. Durey 10-05-1999 # Michael Imamura 11-20-2000 # #=============================================================================== NAME = empweb# # easily change base file name EXT = .tgz# # gzipped tar VER = 1.17# # easily change version # TGZFILE = .archive/.$(NAME).v$(VER)$(EXT)# # archive file name #=============================================================================== UNCOMM = perl -p -i -e 's/^\s*\#.*//g;'# # strip # comments ( \# -> # ) DATE = date +%D# # date of last update (today) #=============================================================================== MAKEOPTS = -s -j8 CONFIGOPTS = -p "www/config_" -s ".html" -h "config/header.inc" -f "config/footer.inc" #=============================================================================== # Source HTML files. SOURCES = $(wildcard src/*.html) $(wildcard src/faq/*.html) $(wildcard src/webelf/*.*) \ $(wildcard src/*.js) $(wildcard src/*.css) DESTS = $(SOURCES:src/%=www/%) # Configurator databases. CONFIG_SRCS = config/delldb.db CONFIG_DEST = $(CONFIG_SRCS:config/%=www/%) default: make cvs-ci # called automagically by /home/cvs/cvsroot/CVSROOT/loginfo when you "cvs ci" # the updated site /home/httpd/dev/website/www/ is served from http://QuadXeon:8383/ cvs-ci: make clean @echo "==> Checking build directories" @$(MAKE) $(MAKEOPTS) dirs # Make sure that all directories are made. @echo "==> Building site files" @$(MAKE) $(MAKEOPTS) site # Build the site files. @echo "==> Checking permissions" @$(MAKE) $(MAKEOPTS) perms # Set the file permissions. # Rebuild the build directory structure dirs: ./dirs.sh # Build the site files. site: $(DESTS) $(CONFIG_DEST) echo "--> Preprocessing prices." ./prices.pl www/*.html # Build the permissions. perms: (cd www; chmod 644 `find . -type f`) (cd www; chmod 755 `find . -type d`) - chmod 755 `find . -type d` - chmod 755 `find . -name \*.pl` `find . -name \*.sh` # Build the configurator pages. www/%.db: config/%.db echo " Regenerating $< --> $@" touch $@ ./config.pl $(CONFIGOPTS) -i $< # Pattern Rule: Build a new file in www for the file. www/%.html: src/%.html echo " Making (.html) $< --> $@" cp $< $@ # Pattern Rule: Build a new file in www for the file. www/%.scm: src/%.scm echo " Making (.scm) $< --> $@" cp $< $@ # Pattern Rule: Build a new file in www for the file. www/%.js: src/%.js echo " Making (.js) $< --> $@" cp $< $@ # Pattern Rule: Build a new file in www for the file. www/%.css: src/%.css echo " Making (.css) $< --> $@" cp $< $@ # Check our spelling. spell: ispell `find src -name \*.html -newer .last_ispell` ; touch .last_ispell # Install tarball to the web server. install: cvs-ci echo "Generating TarBall" make -s tar scp $(TGZFILE) emperor@EmperorLinux.com:website/.archive ssh -l emperor emperorlinux.com "cd website; tar -xzf $(TGZFILE); make perms" # Install tarball to the web server. install-tori: cvs-ci echo "Generating TarBall" make -s tar scp $(TGZFILE) emperor@tori:website/.archive # on tori as root: # (cd /home/httpd/main/website/; tar -xzf /home/emperor/website/.archive/.empweb.v1.10.tgz) # Build a tarball. tar: tar -czvf $(TGZFILE) \ Makefile src www *.pl *.sh \ config # images # Clean ourselves up. clean: rm -rf www RPMS = /usr/src/redhat/RPMS/*/* /usr/src/redhat/SRPMS/* /usr/src/redhat/SOURCES/*patch* rpm: cp $(RPMS) /home/httpd/main/website/www/pub/ rpmwww: scp $(RPMS) emperor@EmperorLinux.com:website/pub/