apcgi

Web client for aps on trusted networks
git clone git://jacobedwards.org/apcgi
Log | Files | Refs | README

Makefile (736B)


      1 root = /var/www
      2 files = /bin/sh /usr/bin/sed /usr/local/bin/apc /usr/lib/libc.so.*
      3 script = ap.cgi
      4 htdocs = ${root}/htdocs/${site}
      5 cgiroot = ${htdocs}/cgi
      6 cc = ${CC}
      7 
      8 all: urlencode urldecode
      9 
     10 urlencode urldecode:
     11 	${cc} -o $@ $@.c
     12 
     13 clean:
     14 	rm -f urlencode urldecode
     15 
     16 install: urlencode urldecode
     17 	for file in ${files}; do \
     18 		mkdir -p ${root}/"$$(dirname "$$file")" && \
     19 		    cp -av "$$file" ${root}/"$$file"; done
     20 	cp -a urlencode urldecode ${root}/usr/bin
     21 	mkdir -p ${htdocs}/man
     22 	man -T html aps > ${htdocs}/man/aps.1.html
     23 	install -o root -g www -m 755 ${script} ${cgiroot}/${script}
     24 
     25 uninstall:
     26 	# NOT POSIX
     27 	rm -f ${files:%=${root}/%}
     28 	rm -f ${cgiroot}/${script}
     29 	rm -f ${htdocs}/man/aps.1.html
     30 
     31 .PHONY: install uninstall clean