[Lunar-commits] <lunar-tools> Reworked Makefile to match lunar core makefile

Stefan Wold ratler at lunar-linux.org
Thu Aug 23 19:05:19 CEST 2012


commit fa08c100c520491358008cdea046ae72b86fbb52
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Thu, 23 Aug 2012 10:05:19 -0700
URL: https://github.com/lunar-linux/lunar-tools/commit/fa08c100c520491358008cdea046ae72b86fbb52

Reworked Makefile to match lunar core makefile
---
  Makefile                                                     +15/-34   
  clad/clad.rc                                                 +0/-22    
  clad/clad -> prog/installkernel
  installkernel/installkernel -> prog/lids
  lids/lids -> prog/lmodules
  lmodules/lmodules -> prog/lnet
  lnet/lnet -> prog/lservices
  lservices/lservices -> prog/ltime
  ltime/ltime -> prog/luser
  luser/luser -> 
   -> 
  11 files changed, 2744 insertions (+), 2785 deletions (-)

--- a/Makefile
+++ b/Makefile
@@ -7,48 +7,29 @@
 # i.e. 2004.9 2004.10 2004.11 ...
 VERSION = 2012.7
 
-PROGRAMS = lids/lids luser/luser lnet/lnet lservices/lservices \
-	lmodules/lmodules clad/clad ltime/ltime
+sbin_PROGS = prog/lids prog/luser prog/lnet prog/lservices \
+	prog/lmodules prog/clad prog/ltime
 DOCS = README COPYING
-MANPAGES = lnet/lnet.8
-PROFILEDFILES = clad/clad.rc
-
-BINDIR = /usr/bin/
-SBINDIR = /usr/sbin/
-MANDIR = /usr/share/man/
-DOCDIR = /usr/share/doc/lunar-tools/
-PROFILEDDIR = /etc/profile.d/
+MANPAGES = $(shell ls -1 man/*)
 
 all:
-install:
-	if [ ! -d "/sbin" ] ; then \
-	    mkdir -p "/sbin" ; \
-	fi
-	install -m755 installkernel/installkernel /sbin/
-	if [ ! -d "${SBINDIR}" ] ; then \
-	    mkdir -p ${SBINDIR} ; \
-	fi
-	for PROGRAM in ${PROGRAMS} ; do \
-	    install -m755 $${PROGRAM} ${SBINDIR}/ ; \
+
+.PHONY:
+install: .PHONY
+	install -d $(DESTDIR)/sbin
+	install -m755 prog/installkernel $(DESTDIR)/sbin/
+	install -d $(DESTDIR)/usr/sbin
+	for PROGRAM in ${sbin_PROGS} ; do \
+	    install -m755 $${PROGRAM} $(DESTDIR)/usr/sbin/ ; \
 	done
 	for MANPAGE in ${MANPAGES} ; do \
 	    EXT=`echo "$${MANPAGE:(($${#MANPAGE}-1)):1}"` ; \
-	    if [ ! -d "${MANDIR}man$$EXT" ] ; then \
-	        mkdir -p ${MANDIR}man$$EXT ; \
-	    fi ; \
-	    install -m644 $${MANPAGE} ${MANDIR}man$$EXT/ ; \
-	done
-	if [ ! -d "${PROFILEDDIR}" ] ; then \
-	    mkdir -p ${PROFILEDDIR} ; \
-	fi
-	for RCFILE in ${PROFILEDFILES} ; do \
-	    install -m644 $${RCFILE} ${PROFILEDDIR}/ ; \
+	    install -d $(DESTDIR)/usr/share/man/man$$EXT ; \
+	    install -m644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$$EXT/ ; \
 	done
-	if [ ! -d "${DOCDIR}" ] ; then \
-		mkdir -p ${DOCDIR} ; \
-	fi
+	install -d $(DESTDIR)/usr/share/doc/lunar-tools
 	for DOC in ${DOCS} ; do \
-		install -m644 $${DOC} ${DOCDIR}/ ; \
+		install -m644 $${DOC} $(DESTDIR)/usr/share/doc/lunar-tools/ ; \
 	done
 
 dist:
--- a/clad/clad.rc
+++ /dev/null
@@ -1,22 +0,0 @@
-
-# Turn on extended globbing
-shopt -s extglob
-
-_clad () 
-{
-    local cur prev
-    COMPREPLY=()
-    cur=${COMP_WORDS[COMP_CWORD]}
-    prev=${COMP_WORDS[COMP_CWORD-1]}
-
-    if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then
-       	COMPREPLY=( $( compgen -W 'create destroy add remove test run bgrun list login logout' $cur ))
-    elif [ $COMP_CWORD -eq 2 ]; then
-        COMPREPLY=( $( compgen -W "`ls /var/lib/clad`" ))
-    else
-        COMPREPLY=( $( compgen -W "`cat /var/lib/clad/$prev`" ))
-    fi
-    return 0
-}
-complete -F _clad clad
-




More information about the Lunar-commits mailing list