Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit ee9cd27

Browse files
thanmianlancetaylor
authored andcommitted
Restore functionality of 'install' target. (ianlancetaylor#10)
Previous change (update from gcc trunk) broke 'make install'; this corrects the problem.
1 parent 17f687d commit ee9cd27

File tree

2 files changed

+73
-50
lines changed

2 files changed

+73
-50
lines changed

Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
3535

3636
include_HEADERS = backtrace.h backtrace-supported.h
3737

38-
noinst_LTLIBRARIES = libbacktrace.la
38+
lib_LTLIBRARIES = libbacktrace.la
3939

4040
libbacktrace_la_SOURCES = \
4141
backtrace.h \
@@ -137,8 +137,8 @@ if HAVE_OBJCOPY_DEBUGLINK
137137
TESTS += dtest
138138

139139
dtest: btest
140-
$(OBJCOPY) --only-keep-debug btest btest.debug
141-
$(OBJCOPY) --strip-debug --add-gnu-debuglink=btest.debug btest dtest
140+
$(OBJCOPY) --only-keep-debug .libs/btest btest.debug
141+
$(OBJCOPY) --strip-debug --add-gnu-debuglink=btest.debug .libs/btest dtest
142142

143143
endif HAVE_OBJCOPY_DEBUGLINK
144144

Makefile.in

Lines changed: 70 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,35 @@ mkinstalldirs = $(install_sh) -d
106106
CONFIG_HEADER = config.h
107107
CONFIG_CLEAN_FILES = backtrace-supported.h
108108
CONFIG_CLEAN_VPATH_FILES =
109-
LTLIBRARIES = $(noinst_LTLIBRARIES)
109+
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
110+
am__vpath_adj = case $$p in \
111+
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
112+
*) f=$$p;; \
113+
esac;
114+
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
115+
am__install_max = 40
116+
am__nobase_strip_setup = \
117+
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
118+
am__nobase_strip = \
119+
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
120+
am__nobase_list = $(am__nobase_strip_setup); \
121+
for p in $$list; do echo "$$p $$p"; done | \
122+
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
123+
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
124+
if (++n[$$2] == $(am__install_max)) \
125+
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
126+
END { for (dir in files) print dir, files[dir] }'
127+
am__base_list = \
128+
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
129+
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
130+
am__uninstall_files_from_dir = { \
131+
test -z "$$files" \
132+
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
133+
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
134+
$(am__cd) "$$dir" && rm -f $$files; }; \
135+
}
136+
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
137+
LTLIBRARIES = $(lib_LTLIBRARIES)
110138
am__DEPENDENCIES_1 =
111139
am_libbacktrace_la_OBJECTS = atomic.lo dwarf.lo fileline.lo posix.lo \
112140
print.lo sort.lo state.lo
@@ -190,34 +218,6 @@ am__can_run_installinfo = \
190218
n|no|NO) false;; \
191219
*) (install-info --version) >/dev/null 2>&1;; \
192220
esac
193-
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
194-
am__vpath_adj = case $$p in \
195-
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
196-
*) f=$$p;; \
197-
esac;
198-
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
199-
am__install_max = 40
200-
am__nobase_strip_setup = \
201-
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
202-
am__nobase_strip = \
203-
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
204-
am__nobase_list = $(am__nobase_strip_setup); \
205-
for p in $$list; do echo "$$p $$p"; done | \
206-
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
207-
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
208-
if (++n[$$2] == $(am__install_max)) \
209-
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
210-
END { for (dir in files) print dir, files[dir] }'
211-
am__base_list = \
212-
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
213-
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
214-
am__uninstall_files_from_dir = { \
215-
test -z "$$files" \
216-
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
217-
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
218-
$(am__cd) "$$dir" && rm -f $$files; }; \
219-
}
220-
am__installdirs = "$(DESTDIR)$(includedir)"
221221
HEADERS = $(include_HEADERS)
222222
ETAGS = etags
223223
CTAGS = ctags
@@ -354,7 +354,7 @@ top_srcdir = @top_srcdir@
354354
ACLOCAL_AMFLAGS = -I .. -I ../config
355355
AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
356356
include_HEADERS = backtrace.h backtrace-supported.h
357-
noinst_LTLIBRARIES = libbacktrace.la
357+
lib_LTLIBRARIES = libbacktrace.la
358358
libbacktrace_la_SOURCES = \
359359
backtrace.h \
360360
atomic.c \
@@ -477,17 +477,40 @@ distclean-hdr:
477477
-rm -f config.h stamp-h1
478478
backtrace-supported.h: $(top_builddir)/config.status $(srcdir)/backtrace-supported.h.in
479479
cd $(top_builddir) && $(SHELL) ./config.status $@
480+
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
481+
@$(NORMAL_INSTALL)
482+
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
483+
list2=; for p in $$list; do \
484+
if test -f $$p; then \
485+
list2="$$list2 $$p"; \
486+
else :; fi; \
487+
done; \
488+
test -z "$$list2" || { \
489+
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
490+
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
491+
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
492+
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
493+
}
494+
495+
uninstall-libLTLIBRARIES:
496+
@$(NORMAL_UNINSTALL)
497+
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
498+
for p in $$list; do \
499+
$(am__strip_dir) \
500+
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
501+
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
502+
done
480503

481-
clean-noinstLTLIBRARIES:
482-
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
483-
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
504+
clean-libLTLIBRARIES:
505+
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
506+
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
484507
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
485508
test "$$dir" != "$$p" || dir=.; \
486509
echo "rm -f \"$${dir}/so_locations\""; \
487510
rm -f "$${dir}/so_locations"; \
488511
done
489512
libbacktrace.la: $(libbacktrace_la_OBJECTS) $(libbacktrace_la_DEPENDENCIES) $(EXTRA_libbacktrace_la_DEPENDENCIES)
490-
$(LINK) $(libbacktrace_la_OBJECTS) $(libbacktrace_la_LIBADD) $(LIBS)
513+
$(LINK) -rpath $(libdir) $(libbacktrace_la_OBJECTS) $(libbacktrace_la_LIBADD) $(LIBS)
491514

492515
clean-checkPROGRAMS:
493516
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -791,7 +814,7 @@ check-am: all-am
791814
check: check-am
792815
all-am: Makefile $(LTLIBRARIES) all-multi $(HEADERS) config.h
793816
installdirs:
794-
for dir in "$(DESTDIR)$(includedir)"; do \
817+
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
795818
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
796819
done
797820
install: install-am
@@ -826,8 +849,8 @@ maintainer-clean-generic:
826849
@echo "it deletes files that may require special tools to rebuild."
827850
clean: clean-am clean-multi
828851

829-
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
830-
clean-noinstLTLIBRARIES mostlyclean-am
852+
clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
853+
clean-libtool mostlyclean-am
831854

832855
distclean: distclean-am distclean-multi
833856
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -853,7 +876,7 @@ install-dvi: install-dvi-am
853876

854877
install-dvi-am:
855878

856-
install-exec-am: install-multi
879+
install-exec-am: install-libLTLIBRARIES install-multi
857880

858881
install-html: install-html-am
859882

@@ -894,28 +917,28 @@ ps: ps-am
894917

895918
ps-am:
896919

897-
uninstall-am: uninstall-includeHEADERS
920+
uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
898921

899922
.MAKE: all all-multi check-am clean-multi distclean-multi install-am \
900923
install-multi install-strip maintainer-clean-multi \
901924
mostlyclean-multi
902925

903926
.PHONY: CTAGS GTAGS all all-am all-multi am--refresh check check-TESTS \
904-
check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
905-
clean-multi clean-noinstLTLIBRARIES ctags distclean \
927+
check-am clean clean-checkPROGRAMS clean-generic \
928+
clean-libLTLIBRARIES clean-libtool clean-multi ctags distclean \
906929
distclean-compile distclean-generic distclean-hdr \
907930
distclean-libtool distclean-multi distclean-tags dvi dvi-am \
908931
html html-am info info-am install install-am install-data \
909932
install-data-am install-dvi install-dvi-am install-exec \
910933
install-exec-am install-html install-html-am \
911934
install-includeHEADERS install-info install-info-am \
912-
install-man install-multi install-pdf install-pdf-am \
913-
install-ps install-ps-am install-strip installcheck \
914-
installcheck-am installdirs maintainer-clean \
935+
install-libLTLIBRARIES install-man install-multi install-pdf \
936+
install-pdf-am install-ps install-ps-am install-strip \
937+
installcheck installcheck-am installdirs maintainer-clean \
915938
maintainer-clean-generic maintainer-clean-multi mostlyclean \
916939
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
917940
mostlyclean-multi pdf pdf-am ps ps-am tags uninstall \
918-
uninstall-am uninstall-includeHEADERS
941+
uninstall-am uninstall-includeHEADERS uninstall-libLTLIBRARIES
919942

920943

921944
@NATIVE_TRUE@edtest2_build.c: gen_edtest2_build; @true
@@ -925,8 +948,8 @@ uninstall-am: uninstall-includeHEADERS
925948
@NATIVE_TRUE@ echo timestamp > $@
926949

927950
@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@dtest: btest
928-
@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --only-keep-debug btest btest.debug
929-
@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --strip-debug --add-gnu-debuglink=btest.debug btest dtest
951+
@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --only-keep-debug .libs/btest btest.debug
952+
@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --strip-debug --add-gnu-debuglink=btest.debug .libs/btest dtest
930953

931954
# We can't use automake's automatic dependency tracking, because it
932955
# breaks when using bootstrap-lean. Automatic dependency tracking

0 commit comments

Comments
 (0)