New Makefile for automatic updates
authorJoey Schulze <joey@infodrom.org>
Wed, 27 Jun 2018 21:03:40 +0000 (23:03 +0200)
committerJoey Schulze <joey@infodrom.org>
Wed, 27 Jun 2018 21:03:40 +0000 (23:03 +0200)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..0413399
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,37 @@
+hostname=$(shell hostname)
+
+ifeq ($(hostname),finlandia)
+DEST = $(HOME)/public_html/new/zlist
+TEST = $(HOME)/public_html/new/zlist
+else
+ifeq ($(hostname),luonnotar)
+DEST = /var/www/www.zeitungsliste.de
+TEST = $(HOME)/luonnotar_html/new/zlist
+endif
+endif
+
+FILES =
+FILES+= --include "*/"
+FILES+= --include "*.html" --include "*.shtml" --include "*.php" --include "*.txt"  --include "*.ps"
+FILES+= --include "*.png" --include "*.gif" --include "*.jpg" --include "*.js"
+FILES+= --include "*.css"
+FILES+= --include "favicon.ico"
+FILES+= --exclude "*"
+
+test:
+       test -d $(TEST) || mkdir -p $(TEST)
+       rsync -lptr $(FILES) www/ $(TEST)/
+#      cd src && for f in *.html; do cp $$f $(TEST)/$$f; done
+
+fix:
+
+install: fix
+       test -d $(DEST) || mkdir -p $(DEST)
+       rsync -lptr $(FILES) www/ $(DEST)/
+
+clean:
+       -rm -f `find -name '*~'` `find -name '.?*.swp'`
+       -make -C www clean
+
+depend:
+       make -C www rdepend