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:
parent
d37ee6db70
commit
daaf61331a
27
Makefile.lib
27
Makefile.lib
@ -16,7 +16,7 @@ endif
|
|||||||
|
|
||||||
CURPATH = $(shell pwd)
|
CURPATH = $(shell pwd)
|
||||||
TOPPATH = $(shell cd $(path_to_top) && 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
|
# Show the command (quiet or non-quiet version based on the assignment
|
||||||
# just above) and then execute it.
|
# just above) and then execute it.
|
||||||
@ -39,6 +39,12 @@ quiet_cmd_ld_objs = " [LD] $(RELPATH)$@"
|
|||||||
quiet_cmd_recmake = "[MAKE $$target] $(RELPATH)$$subdir"
|
quiet_cmd_recmake = "[MAKE $$target] $(RELPATH)$$subdir"
|
||||||
cmd_recmake = $(MAKE) -C $$subdir $$target
|
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
|
### Internal build rules
|
||||||
@ -90,6 +96,25 @@ lib.o: $(sort $(OBJS))
|
|||||||
all-local: lib.o
|
all-local: lib.o
|
||||||
endif
|
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:
|
# Recursion:
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
path_to_top=../../..
|
path_to_top=../../..
|
||||||
include $(path_to_top)/Makefile.config
|
include $(path_to_top)/Makefile.config
|
||||||
|
|
||||||
install-local:
|
MAN1 = elinks.1
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
|
|
||||||
$(INSTALL_DATA) elinks.1 $(DESTDIR)$(mandir)/man1
|
|
||||||
|
|
||||||
include $(path_to_top)/Makefile.lib
|
include $(path_to_top)/Makefile.lib
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
path_to_top=../../..
|
path_to_top=../../..
|
||||||
include $(path_to_top)/Makefile.config
|
include $(path_to_top)/Makefile.config
|
||||||
|
|
||||||
install-local:
|
MAN5 = elinks.conf.5 elinkskeys.5
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man5
|
|
||||||
$(INSTALL_DATA) elinks.conf.5 $(DESTDIR)$(mandir)/man5
|
|
||||||
$(INSTALL_DATA) elinkskeys.5 $(DESTDIR)$(mandir)/man5
|
|
||||||
|
|
||||||
include $(path_to_top)/Makefile.lib
|
include $(path_to_top)/Makefile.lib
|
||||||
|
@ -117,8 +117,9 @@ install-local-yes:
|
|||||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$$dir; \
|
$(MKINSTALLDIRS) $(DESTDIR)$$dir; \
|
||||||
if test -r $(srcdir)/$$cat; then \
|
if test -r $(srcdir)/$$cat; then \
|
||||||
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
podir=./$(srcdir); \
|
||||||
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
|
if test "$$(cd $$podir && pwd)" = "$$(pwd)"; then podir=; fi; \
|
||||||
|
$(call ncmd,installdata,$$podir$$cat,$(DESTDIR)$$dir/$(PACKAGE).mo); \
|
||||||
else \
|
else \
|
||||||
echo "Error: Cannot find $$cat"; \
|
echo "Error: Cannot find $$cat"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
@ -40,9 +40,7 @@ all-local: elinks
|
|||||||
elinks: lib.o
|
elinks: lib.o
|
||||||
$(call cmd,link)
|
$(call cmd,link)
|
||||||
|
|
||||||
install-local:
|
PROGS = elinks
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
|
|
||||||
$(INSTALL_PROGRAM) elinks $(DESTDIR)$(bindir)
|
|
||||||
|
|
||||||
include $(path_to_top)/Makefile.lib
|
include $(path_to_top)/Makefile.lib
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user