summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTim Shimmin <tes@sgi.com>2006-07-14 15:34:37 +0000
committerTim Shimmin <tes@sgi.com>2006-07-14 15:34:37 +0000
commitb4156957abb3ab29bbe229f80869ad5a290dd3d9 (patch)
tree0168bf263ca1543716304149540d597f0a93c795 /include
parent98865f5edb538f9559b7325d1bdbdbe0fe30d207 (diff)
fix make depend for libtool libraries
Merge of master-melb:xfs-cmds:26539a by kenmcd.
Diffstat (limited to 'include')
-rw-r--r--include/buildrules34
1 files changed, 21 insertions, 13 deletions
diff --git a/include/buildrules b/include/buildrules
index f7212831..4a91fee3 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -35,15 +35,15 @@ $(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
$(LTCOMPILE) -c $<
endif
-ifdef LINGUAS
+ifdef POTHEAD
%.pot: $(XGETTEXTFILES)
- xgettext --omit-header --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
+ $(XGETTEXT) --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
-%.po:
- $(MSGMERGE) -o $@.tmpo $@ $(PKG_NAME).pot
- @if ! diff $@.tmpo $@ >/dev/null; then \
- echo "$@ is out of date, see $@.tmpo"; \
- fi
+# Generate temp .po files, to check whether translations need updating.
+# Not by default, due to gettext output differences between versions.
+%.po: $(POTHEAD)
+# $(MSGMERGE) -o $@.tmpo $@ $(POTHEAD)
+# if ! diff $@.tmpo $@ >/dev/null; then echo "$@ dated, see $@.tmpo"; fi
%.mo: %.po
$(MSGFMT) -o $@ $<
@@ -58,20 +58,28 @@ $(_FORCE):
.PHONY : depend
-depend : $(CFILES) $(HFILES)
- $(SUBDIRS_MAKERULE)
- touch .dep
- $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
+DEPENDSCRIPT := $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
$(SED) -e 's,`pwd`,$(TOPDIR),g' \
-e 's, */[^ ]*,,g' \
-e '/^[^ ]*: *$$/d' \
- -e '/^#.*/d' -e '/^ *$$/d' \
- > .dep
+ -e '/^ *$$/d'
+
+ifdef LTLIBRARY
+DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
+endif
+
+depend : $(CFILES) $(HFILES)
+ $(SUBDIRS_MAKERULE)
+ $(DEPENDSCRIPT) > .dep
test -s .dep || rm -f .dep
# Include dep, but only if it exists
ifeq ($(shell test -f .dep && echo .dep), .dep)
include .dep
else
+ifdef LTLIBRARY
+$(LTOBJECTS): $(HFILES)
+else
$(OBJECTS): $(HFILES)
endif
+endif