hosts-gen

A little framework to generate /etc/hosts from /etc/hosts.d.
git clone git://r-36.net/hosts-gen
Log | Files | Refs | README | LICENSE

Makefile (1142B)


      1 # hosts-gen
      2 # See LICENSE file for copyright and license details.
      3 
      4 include config.mk
      5 
      6 all:
      7 
      8 dist:
      9 	@echo creating dist tarball
     10 	@mkdir -p hosts-gen-${VERSION}
     11 	@cp -R LICENSE Makefile README config.mk etc examples bin hosts-gen-${VERSION}
     12 	@tar -cf hosts-gen-${VERSION}.tar hosts-gen-${VERSION}
     13 	@gzip hosts-gen-${VERSION}.tar
     14 	@rm -rf hosts-gen-${VERSION}
     15 
     16 install: all
     17 	@echo installing script to ${DESTDIR}${PREFIX}/bin
     18 	@mkdir -p ${DESTDIR}${PREFIX}/bin
     19 	@cp -f bin/hosts-gen ${DESTDIR}${PREFIX}/bin
     20 	@chmod 755 ${DESTDIR}${PREFIX}/bin/hosts-gen
     21 	@echo installing ${DESTDIR}${PREFIX}/etc/hosts.d
     22 	@mkdir -p ${DESTDIR}${PREFIX}/etc/hosts.d
     23 	@cp -R etc/hosts.d/* ${DESTDIR}${PREFIX}/etc/hosts.d
     24 #	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
     25 #	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
     26 #	@sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
     27 #	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
     28 
     29 uninstall:
     30 	@echo removing script from ${DESTDIR}${PREFIX}/bin
     31 	@rm -f ${DESTDIR}${PREFIX}/bin/hosts-gen
     32 	@echo you need to manually remove the ${DESTDIR}${PREFIX}/etc/hosts.d directory
     33 
     34 .PHONY: all dist install uninstall