Website:doc/note subdir and Makefile tree for publishing latex/notes.
authorWilliam Trevor King <wking@thor.yang.physics.drexel.edu>
Wed, 5 Aug 2009 13:16:45 +0000 (09:16 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 17 Sep 2009 16:48:58 +0000 (12:48 -0400)
html/Makefile
latex/Makefile
latex/notes/Makefile [new file with mode: 0644]
latex/notes/topics/Makefile [new file with mode: 0644]
latex/notes/topics/linear_algebra/Makefile

index 53fcf3276d3d68afe9de144aba18780375666f31..f76ed3fb63a4895345ef39d7e835e73ae69fabdf 100644 (file)
@@ -1,6 +1,6 @@
 HTML_FILES = $(shell echo *.shtml)
 EMPTY_DIRS = doc source
 HTML_FILES = $(shell echo *.shtml)
 EMPTY_DIRS = doc source
-DEEP_EMPYT_DIRS = doc/exam doc/hwk doc/lab doc/lec doc/rec
+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)
 SOURCE_FILES = $(HTML_FILES) $(HTML_DIRS) README .htaccess
 OTHER_FILES = Makefile
 HTML_DIRS = shared php xml $(EMPTY_DIRS) $(DEEP_EMPTY_DIRS)
 SOURCE_FILES = $(HTML_FILES) $(HTML_DIRS) README .htaccess
 OTHER_FILES = Makefile
index 19c783be893681039b262c8897cef05f89df2c5e..9008b44b717457b203522979e16564aefe48bd2e 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = hwk rec
+SUBDIRS = hwk rec notes
 
 install :
        @for i in $(SUBDIRS); do \
 
 install :
        @for i in $(SUBDIRS); do \
diff --git a/latex/notes/Makefile b/latex/notes/Makefile
new file mode 100644 (file)
index 0000000..1aea101
--- /dev/null
@@ -0,0 +1,12 @@
+SUBDIRS = topics
+INSTALL_DIR := $(INSTALL_DIR)/doc/note
+
+install :
+       @for i in $(SUBDIRS); do \
+        echo "make install in $$i..."; \
+        (cd $$i; $(MAKE) $(MFLAGS) install); done
+
+clean :
+       @for i in $(SUBDIRS); do \
+        echo "make clean in $$i..."; \
+        (cd $$i; $(MAKE) $(MFLAGS) clean); done
diff --git a/latex/notes/topics/Makefile b/latex/notes/topics/Makefile
new file mode 100644 (file)
index 0000000..c722564
--- /dev/null
@@ -0,0 +1,11 @@
+SUBDIRS = linear_algebra
+
+install :
+       @for i in $(SUBDIRS); do \
+        echo "make install in $$i..."; \
+        (cd $$i; $(MAKE) $(MFLAGS) install); done
+
+clean :
+       @for i in $(SUBDIRS); do \
+        echo "make clean in $$i..."; \
+        (cd $$i; $(MAKE) $(MFLAGS) clean); done
index 6be3b9bad6b472fba0e95c97afcb5f0278c9298d..44a7d4053096e9a6b9e7c00a345a58ac3e4f6242 100644 (file)
@@ -1,20 +1,33 @@
-# each MetaPost graphic has it's own file,
-# so the basic definitions should get bundled out into an external file
-# (encourages reuse anyway, so it's good for you :p)
+THIS_DIR = $(shell basename $(PWD))
+SOURCE_FILES = main.tex
+OTHER_FILES = Makefile
+DIST_FILES = $(SOURCE_FILES) $(OTHER_FILES)
+DIST_FILE = $(THIS_DIR)_source.tar.gz
+DIST_DIR = $(THIS_DIR)
+# external variables: INSTALL_USER, INSTALL_HOST, INSTALL_DIR, SOURCE_DIR
 
 all : main.pdf
 
 view : all
        xpdf main.pdf &
 
 
 all : main.pdf
 
 view : all
        xpdf main.pdf &
 
-%.pdf : %.tex *.tex
-       pdflatex $<
-       ../../tex/make_mp.sh
-       pdflatex $<
+%.pdf : %.tex $(SOURCE_FILES)
+       pdflatex $(patsubst %.tex,%,$<)
+       pdflatex $(patsubst %.tex,%,$<)
 
 semi-clean :
 
 semi-clean :
-       rm -f *.1 *.log *.mp *.mpx *.aux *.out *.cut
-       rm -f mp*.tex # remove metapost-generated tex
+       rm -f *.log *.aux *.out *.thm *.toc *.pre
 
 clean : semi-clean
        rm -f *.pdf
 
 clean : semi-clean
        rm -f *.pdf
+
+$(DIST_FILE) : $(DIST_FILES)
+       mkdir $(DIST_DIR)
+       cp -Lrp $^ $(DIST_DIR)
+       tar -chozf $@ $(DIST_DIR)
+       rm -rf $(DIST_DIR)
+
+install : main.pdf
+       scp -p $< $(INSTALL_USER)@$(INSTALL_HOST):$(INSTALL_DIR)/$(THIS_DIR).pdf
+       scp -p $(DIST_FILE) $(INSTALL_USER)@$(INSTALL_HOST):$(SOURCE_DIR)
+       @date > $@