Skip to content

Commit

Permalink
Merge pull request #80 from zimbatm/master
Browse files Browse the repository at this point in the history
Split INSTALLPATH into DESTDIR+PREFIX

Thanks, merged.

Rmlint's developement version uses SCons by the way.
If Im not recalling that wrong, this should be supported there already.

(https://github.com/sahib/rmlint/tree/develop)
  • Loading branch information
sahib committed Oct 14, 2014
2 parents 9f5cf60 + 8fac45b commit 9a0a7fe
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
SOURCEDIR=src
DOCDIR=doc

#install
PREFIX=/usr
INSTALLPATH=$(DESTDIR)$(PREFIX)
UNAME := $(shell sh -c 'uname -s 2>/dev/null || echo not')

#BINDIR
BINDIR=$(INSTALLPATH)/bin
#MANDIR
MANDIR=$(DESTDIR)/usr/share/man/man1
MANDIR=$(INSTALLPATH)/share/man/man1
#MANUAL
MANDOC=rmlint.1
MANDOC_COMPRESSED=rmlint.1.gz

#install
INSTALLPATH=$(DESTDIR)/usr/bin
UNAME := $(shell sh -c 'uname -s 2>/dev/null || echo not')

#Programs
ECHO=echo
RM=rm -rf
Expand Down Expand Up @@ -86,9 +89,9 @@ clean:

.PHONY : install
install: rmlint
@$(MKDIR) $(INSTALLPATH)
@$(ECHO) "++ Copying executable to $(INSTALLPATH)"
@$(CP) $(EXECUTABLE) $(INSTALLPATH)
@$(MKDIR) $(BINDIR)
@$(ECHO) "++ Copying executable to $(BINDIR)"
@$(CP) $(EXECUTABLE) $(BINDIR)
@$(MKDIR) $(MANDIR)
@$(ECHO) "++ Zipping manpage"
@$(GZIP) "$(DOCDIR)/$(MANDOC)" > "$(DOCDIR)/$(MANDOC_COMPRESSED)"
Expand All @@ -98,5 +101,5 @@ install: rmlint
.PHONY : uninstall
uninstall:
@$(ECHO) "-- Removing the lint of rmlint"
$(RM) "$(INSTALLPATH)/$(EXECUTABLE)"
$(RM) "$(BINDIR)/$(EXECUTABLE)"
$(RM) "$(MANDIR)/$(MANDOC)"

0 comments on commit 9a0a7fe

Please sign in to comment.