fix make depend for libtool libraries

Merge of master-melb:xfs-cmds:26539a by kenmcd.
This commit is contained in:
Tim Shimmin
2006-07-14 15:34:37 +00:00
parent 98865f5edb
commit b4156957ab
+21 -13
View File
@@ -35,15 +35,15 @@ $(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
$(LTCOMPILE) -c $< $(LTCOMPILE) -c $<
endif endif
ifdef LINGUAS ifdef POTHEAD
%.pot: $(XGETTEXTFILES) %.pot: $(XGETTEXTFILES)
xgettext --omit-header --language=C --keyword=_ -o $@ $(XGETTEXTFILES) $(XGETTEXT) --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
%.po: # Generate temp .po files, to check whether translations need updating.
$(MSGMERGE) -o $@.tmpo $@ $(PKG_NAME).pot # Not by default, due to gettext output differences between versions.
@if ! diff $@.tmpo $@ >/dev/null; then \ %.po: $(POTHEAD)
echo "$@ is out of date, see $@.tmpo"; \ # $(MSGMERGE) -o $@.tmpo $@ $(POTHEAD)
fi # if ! diff $@.tmpo $@ >/dev/null; then echo "$@ dated, see $@.tmpo"; fi
%.mo: %.po %.mo: %.po
$(MSGFMT) -o $@ $< $(MSGFMT) -o $@ $<
@@ -58,20 +58,28 @@ $(_FORCE):
.PHONY : depend .PHONY : depend
depend : $(CFILES) $(HFILES) DEPENDSCRIPT := $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
$(SUBDIRS_MAKERULE)
touch .dep
$(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
$(SED) -e 's,`pwd`,$(TOPDIR),g' \ $(SED) -e 's,`pwd`,$(TOPDIR),g' \
-e 's, */[^ ]*,,g' \ -e 's, */[^ ]*,,g' \
-e '/^[^ ]*: *$$/d' \ -e '/^[^ ]*: *$$/d' \
-e '/^#.*/d' -e '/^ *$$/d' \ -e '/^ *$$/d'
> .dep
ifdef LTLIBRARY
DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
endif
depend : $(CFILES) $(HFILES)
$(SUBDIRS_MAKERULE)
$(DEPENDSCRIPT) > .dep
test -s .dep || rm -f .dep test -s .dep || rm -f .dep
# Include dep, but only if it exists # Include dep, but only if it exists
ifeq ($(shell test -f .dep && echo .dep), .dep) ifeq ($(shell test -f .dep && echo .dep), .dep)
include .dep include .dep
else else
ifdef LTLIBRARY
$(LTOBJECTS): $(HFILES)
else
$(OBJECTS): $(HFILES) $(OBJECTS): $(HFILES)
endif endif
endif