hackers-il-site / Makefile

TARGET = dest

# PAGES = about articles/index books/index core-doc/index index irc/index mailing-lists/index links/index site-resources/index tutorials/index web-forums/index

# SUBDIRS = articles books core-doc irc links mailing-lists tutorials site-resources source source/arcs web-forums

include defs.mak

SOURCES = $(addprefix src/,$(addsuffix .html.wml,$(PAGES)))

DESTS = $(patsubst src/%.html.wml,$(TARGET)/%.html,$(SOURCES))

RAW_FILES = $(IMAGES)
RAW_FILES_SOURCES = $(addprefix src/,$(RAW_FILES))
RAW_FILES_DEST = $(addprefix $(TARGET)/,$(RAW_FILES))

# PACKAGES_DIR = $(TARGET)/download/arcs
# PACKAGES = $(shell cd temp && cd lk-module-compiler-final && ls)
# PACKAGES_DESTS = $(addprefix $(PACKAGES_DIR)/,$(PACKAGES))

SUBDIRS_DEST = $(addprefix $(TARGET)/,$(SUBDIRS))

LATEMP_WML_INCLUDE_PATH =$(shell latemp-config --wml-flags)

WML_FLAGS += --passoption=2,-X3074 --passoption=3,-I../lib/ --passoption=7,"-S imgsize" -DROOT~.

WML_FLAGS += -DLATEMP_THEME=sinorca-2.0 -DLATEMP_SERVER=hackers

WML_FLAGS += $(LATEMP_WML_INCLUDE_PATH) -I../lib/

RSYNC = rsync --progress --verbose --rsh=ssh 

LIBRARY_FILES = template.wml lib/MyNavData.pm

# This is a file that does not change or is timestamped from invocation
# to inovcation of this makefile. Useful for synchronizing uploads.
UNCHANGED_FILE = unchanged

all: dest $(SUBDIRS_DEST) $(DESTS) $(RAW_FILES_DEST)

$(UNCHANGED_FILE):
	touch $@

dest:
	if [ ! -e $@ ] ; then mkdir $@ ; fi
	
$(DESTS) :: $(TARGET)/% : src/%.wml $(LIBRARY_FILES)
	(cd src && wml $(WML_FLAGS) -DLATEMP_FILENAME=$(patsubst src/%.wml,%,$<) $(patsubst src/%,%,$<)) > $@

$(RAW_FILES_DEST) :: $(TARGET)/% : src/%
	cp -f $< $@

$(SUBDIRS_DEST) :: % : $(UNCHANGED_FILE)
	if [ ! -e $@ ] ; then mkdir $@ ; fi

# $(PACKAGES_DESTS) :: $(PACKAGES_DIR)/% : ./temp/lk-module-compiler-final/%
# 	cp -f $< $@

upload: upload_iglu

upload_iglu: all
	(cd dest && $(RSYNC) -r * shlomif@iglu.org.il:/iglu/Hackers-IL/html)

.PHONY:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.