1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Make installation also use the cmd calling

Makes it more obvious which files are actually installed. MKINSTALLDIRS
still spurs out a lot of 'mkdir ...', which probably should also be
silenced when V=0.
This commit is contained in:
Jonas Fonseca 2005-10-01 14:16:19 +02:00 committed by Jonas Fonseca
parent d37ee6db70
commit daaf61331a
5 changed files with 32 additions and 13 deletions

View File

@ -16,7 +16,7 @@ endif
CURPATH = $(shell pwd)
TOPPATH = $(shell cd $(path_to_top) && pwd)
RELPATH = $(shell echo '$(CURPATH)' | sed 's,$(TOPPATH),,;s,^/,,;s,\([a-z]\)$$,\1/,')
RELPATH = $(shell echo '$(CURPATH)' | sed 's,$(TOPPATH),,;s,^/,,;s,\([a-z0-9]\)$$,\1/,')
# Show the command (quiet or non-quiet version based on the assignment
# just above) and then execute it.
@ -39,6 +39,12 @@ quiet_cmd_ld_objs = " [LD] $(RELPATH)$@"
quiet_cmd_recmake = "[MAKE $$target] $(RELPATH)$$subdir"
cmd_recmake = $(MAKE) -C $$subdir $$target
quiet_cmd_installdata = " [INSTALL] $(RELPATH)$(2) -> $(3)"
cmd_installdata = $(INSTALL_DATA) $(2) $(3)
quiet_cmd_installprog = " [INSTALL] $(RELPATH)$(2) -> $(3)"
cmd_installprog = $(INSTALL_PROGRAM) $(2) $(3)
### Internal build rules
@ -90,6 +96,25 @@ lib.o: $(sort $(OBJS))
all-local: lib.o
endif
install-local:
ifdef PROGS
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
@for file in $(PROGS); do \
$(call ncmd,installprog,$$file,$(DESTDIR)$(bindir)); \
done
endif
ifdef MAN1
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
@for file in $(MAN1); do \
$(call ncmd,installdata,$$file,$(DESTDIR)$(mandir)/man1); \
done
endif
ifdef MAN5
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man5
@for file in $(MAN5); do \
$(call ncmd,installdata,$$file,$(DESTDIR)$(mandir)/man5); \
done
endif
# Recursion:

View File

@ -1,8 +1,6 @@
path_to_top=../../..
include $(path_to_top)/Makefile.config
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
$(INSTALL_DATA) elinks.1 $(DESTDIR)$(mandir)/man1
MAN1 = elinks.1
include $(path_to_top)/Makefile.lib

View File

@ -1,9 +1,6 @@
path_to_top=../../..
include $(path_to_top)/Makefile.config
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man5
$(INSTALL_DATA) elinks.conf.5 $(DESTDIR)$(mandir)/man5
$(INSTALL_DATA) elinkskeys.5 $(DESTDIR)$(mandir)/man5
MAN5 = elinks.conf.5 elinkskeys.5
include $(path_to_top)/Makefile.lib

View File

@ -117,8 +117,9 @@ install-local-yes:
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(MKINSTALLDIRS) $(DESTDIR)$$dir; \
if test -r $(srcdir)/$$cat; then \
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
podir=./$(srcdir); \
if test "$$(cd $$podir && pwd)" = "$$(pwd)"; then podir=; fi; \
$(call ncmd,installdata,$$podir$$cat,$(DESTDIR)$$dir/$(PACKAGE).mo); \
else \
echo "Error: Cannot find $$cat"; \
fi; \

View File

@ -40,9 +40,7 @@ all-local: elinks
elinks: lib.o
$(call cmd,link)
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) elinks $(DESTDIR)$(bindir)
PROGS = elinks
include $(path_to_top)/Makefile.lib