HTML_FILES = $(shell echo *.shtml)
EMPTY_DIRS = doc source
-DEEP_EMPYT_DIRS = doc/exam doc/hwk doc/lab doc/lec doc/rec doc/note
-HTML_DIRS = shared php xml $(EMPTY_DIRS) $(DEEP_EMPTY_DIRS)
+DEEP_EMPTY_DIRS = doc/exam doc/hwk doc/lab doc/lec doc/rec doc/note
+HTML_DIRS = shared php xml $(EMPTY_DIRS)
SOURCE_FILES = $(HTML_FILES) $(HTML_DIRS) README .htaccess
OTHER_FILES = Makefile
DIST_FILES = $(SOURCE_FILES) $(OTHER_FILES)
DIST_DIR = html
clean :
- rm -rf $(DIST_FILE) $(DIST_DIR) install*
+ rm -rf $(DIST_FILE) $(DIST_DIR) $(EMPTY_DIRS) install*
-$(DIST_FILE) : $(DIST_FILES) $(EMPTY_DIRS)
+$(DIST_FILE) : $(DIST_FILES) $(DEEP_EMPTY_DIRS)
mkdir $(DIST_DIR)
- cp -rp $^ $(DIST_DIR)
+ echo $(EMPTY_DIRS)
+ cp -rp $(DIST_FILES) $(DIST_DIR)
tar -cozf $@ $(DIST_DIR)
rm -rf $(DIST_DIR)
# Create empty directories if neccessary (Git doesn't track dirs)
$(EMPTY_DIRS) :
mkdir $@
+
+$(DEEP_EMPTY_DIRS) : $(EMPTY_DIRS)
+ mkdir $@