rd

tiny cpt ramdisk image generator meant for system rescue
git clone git://git.ckyln.com/rd
Log | Files | Refs | README | LICENSE

Makefile (760B)


      1 PREFIX     = /usr/local
      2 BINDIR     = ${PREFIX}/bin
      3 SHAREDIR   = ${PREFIX}/share/rd
      4 SYSCONFDIR = /etc
      5 ETCDIR     = ${SYSCONFDIR}/rd
      6 
      7 all:
      8 	@echo run 'make install' to install the scripts
      9 
     10 
     11 install:
     12 	mkdir -p "${DESTDIR}${BINDIR}" "${DESTDIR}${ETCDIR}/hooks" "${DESTDIR}${SHAREDIR}"
     13 	sed 's|\./init|${SHAREDIR}/init|g;s|\$$PWD|/etc/rd|' < rd > ${DESTDIR}${BINDIR}/rd
     14 	chmod 755 ${DESTDIR}${BINDIR}/rd
     15 	cp init ${DESTDIR}${SHAREDIR}/init
     16 	chmod 755 ${DESTDIR}${SHAREDIR}/init
     17 	cp -r ramfs-image ${DESTDIR}${ETCDIR}
     18 
     19 uninstall:
     20 	rm -rf ${DESTDIR}${ETCDIR} ${DESTDIR}${SHAREDIR}
     21 	rm -f  ${DESTDIR}${BINDIR}/rd
     22 
     23 rd-image.cpio:
     24 	./rd rd-image.cpio
     25 	@echo rd-image.cpio is ready!
     26 
     27 image: rd-image.cpio
     28 
     29 clean:
     30 	rm -f rd-image.cpio
     31 
     32 .PHONY: all install uninstall image