kiss-repository

personal kiss repository
git clone git://git.ckyln.com/~cem/kiss-repository.git
Log | Files | Refs | Submodules | README | LICENSE

better-makefile.patch (979B)


      1 diff --git a/Makefile b/Makefile
      2 index 5de8e52..9c17c2d 100644
      3 --- a/Makefile
      4 +++ b/Makefile
      5 @@ -12,8 +12,9 @@ cp=/bin/cp -fv
      6  DESTDIR = 
      7  binary=./grabc
      8  manpage=./grabc.1
      9 -bindir=/usr/local/bin
     10 -mandir=/usr/local/share/man/man1
     11 +PREFIX = /usr/local
     12 +bindir=${PREFIX}/bin
     13 +mandir=${PREFIX}/share/man/man1
     14  
     15  # replace -O with -g in order to debug
     16  
     17 @@ -33,20 +34,16 @@ all: $(PROGNAME)
     18  $(PROGNAME) : $(OBJS)
     19  	$(CC) $(CFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS)
     20  
     21 -doc:
     22 +grabc.1:
     23  	pod2man grabc.pod > grabc.1
     24  
     25 -install: installdirs install-bin install-man
     26 +install: install-bin install-man
     27  
     28 -install-bin:
     29 -	${cp} ${binary} ${DESTDIR}${bindir}
     30 +install-bin: grabc
     31 +	install -Dm755 -t ${DESTDIR}${bindir} ${binary}
     32  
     33 -installdirs:
     34 -	$(SHELL) ./mkinstalldirs ${DESTDIR}${bindir}
     35 -	$(SHELL) ./mkinstalldirs ${DESTDIR}${mandir}
     36 -
     37 -install-man:
     38 -	${cp} ${manpage} ${DESTDIR}${mandir}
     39 +install-man: grabc.1
     40 +	install -Dm644 -t ${DESTDIR}${mandir} ${manpage} 
     41  
     42  deb:
     43  	/bin/rm -f *.deb