tMakefile: add install and uninstall targets - vote - simple cgi voting system for web and gopher
git clone git://src.adamsgaard.dk/vote
Log
Files
Refs
README
LICENSE
---
commit ab248d07e87bb0d90520cad5be7225b853a6bc5e
parent ae82a3af5bda85afefcbc4de1cee199c849f370b
Author: Anders Damsgaard 
Date:   Sun, 27 Sep 2020 14:19:14 +0200

Makefile: add install and uninstall targets

Diffstat:
  M Makefile                            |      10 +++++++++-

1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/Makefile b/Makefile
t@@ -15,8 +15,16 @@ ${OBJ}:
 ${NAME}: ${OBJ}
         ${CC} -o $@ ${OBJ} ${HERE_LDFLAGS}
 
+install: ${NAME}
+        mkdir -p /var/www/cgi-bin/${NAME}
+        cp -f ${NAME} /var/www/cgi-bin/${NAME}/
+
+uninstall:
+        rm -f /var/www/cgi-bin/${NAME}/${NAME}
+        -rmdir /var/www/cgi-bin/${NAME}
+
 clean:
         rm -f *.o
         rm -f ${NAME}
 
-.PHONY: default clean
+.PHONY: all install uninstall clean