use DESTDIR in Makefile
This commit is contained in:
parent
ac3bbc7056
commit
dff8431f69
1 changed files with 6 additions and 5 deletions
11
Makefile
11
Makefile
|
@ -1,5 +1,6 @@
|
||||||
MODULES = common plugins/gtkgui
|
MODULES = common plugins/gtkgui
|
||||||
PREFIX = /usr
|
PREFIX = /usr
|
||||||
|
DESTDIR = /
|
||||||
|
|
||||||
FIND= find -regex '.*\.\(\(glade\)\|\(py\)\|\(xpm\)\)'
|
FIND= find -regex '.*\.\(\(glade\)\|\(py\)\|\(xpm\)\)'
|
||||||
FILES=`$(FIND)`
|
FILES=`$(FIND)`
|
||||||
|
@ -18,17 +19,17 @@ clean:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
for d in $(DIRS) ; do \
|
for d in $(DIRS) ; do \
|
||||||
if [ ! -d $(PREFIX)/share/gajim/$$d ] ; then \
|
if [ ! -d $(DESTDIR)$(PREFIX)/share/gajim/$$d ] ; then \
|
||||||
mkdir -p "$(PREFIX)/share/gajim/$$d"; \
|
mkdir -p "$(DESTDIR)$(PREFIX)/share/gajim/$$d"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
for f in $(FILES) ; do \
|
for f in $(FILES) ; do \
|
||||||
DST=`dirname "$$f"`; \
|
DST=`dirname "$$f"`; \
|
||||||
cp "$$f" "$(PREFIX)/share/gajim/$$DST/"; \
|
cp "$$f" "$(DESTDIR)$(PREFIX)/share/gajim/$$DST/"; \
|
||||||
done
|
done
|
||||||
for s in $(SCRIPTS) ; do \
|
for s in $(SCRIPTS) ; do \
|
||||||
BASE=`basename "$$s"`; \
|
BASE=`basename "$$s"`; \
|
||||||
F=`cat "$$s" | sed -e 's!PREFIX!$(PREFIX)!g'`; \
|
F=`cat "$$s" | sed -e 's!PREFIX!$(PREFIX)!g'`; \
|
||||||
echo "$$F" > "$(PREFIX)/bin/$$BASE"; \
|
echo "$$F" > "$(DESTDIR)$(PREFIX)/bin/$$BASE"; \
|
||||||
chmod +x "$(PREFIX)/bin/$$BASE"; \
|
chmod +x "$(DESTDIR)$(PREFIX)/bin/$$BASE"; \
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue