]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - include/buildrules
Userspace cache suffers the same reverse-list-insert issue that the kernel did.
[thirdparty/xfsprogs-dev.git] / include / buildrules
CommitLineData
2bd0ea18 1#
6e3140c7 2# Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved.
2bd0ea18
NS
3#
4ifndef _BUILDRULES_INCLUDED_
5_BUILDRULES_INCLUDED_ = 1
6
7include $(TOPDIR)/include/builddefs
8
2bd0ea18
NS
9clean clobber : $(SUBDIRS)
10 rm -f $(DIRT)
f937adac 11 @rm -fr .libs
2bd0ea18
NS
12 $(SUBDIRS_MAKERULE)
13
14# Never blow away subdirs
15ifdef SUBDIRS
16.PRECIOUS: $(SUBDIRS)
17$(SUBDIRS):
18 $(SUBDIRS_MAKERULE)
19endif
20
f937adac
NS
21#
22# Standard targets
23#
24
25ifdef LTCOMMAND
26$(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES)
27 $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
28endif
29
30ifdef LTLIBRARY
31$(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
1b82b560 32 $(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
f937adac
NS
33
34%.lo: %.c
35 $(LTCOMPILE) -c $<
36endif
37
9440d84d
NS
38ifdef LINGUAS
39%.pot: $(XGETTEXTFILES)
16c44ed2 40 xgettext --omit-header --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
9440d84d 41
e1687900
NS
42%.po:
43 $(MSGMERGE) -o $@.tmpo $@ $(PKG_NAME).pot
638473d8
NS
44 @if ! diff $@.tmpo $@ >/dev/null; then \
45 echo "$@ is out of date, see $@.tmpo"; \
46 fi
9440d84d 47
638473d8 48%.mo: %.po
9440d84d
NS
49 $(MSGFMT) -o $@ $<
50endif
51
2bd0ea18
NS
52source :
53 $(SOURCE_MAKERULE)
54
f937adac 55endif # _BUILDRULES_INCLUDED_
2bd0ea18
NS
56
57$(_FORCE):
58
59.PHONY : depend
60
61depend : $(CFILES) $(HFILES)
62 $(SUBDIRS_MAKERULE)
4df72956 63 touch .dep
d931d17e 64 $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
4df72956
NS
65 $(SED) -e 's,`pwd`,$(TOPDIR),g' \
66 -e 's, */[^ ]*,,g' \
67 -e '/^[^ ]*: *$$/d' \
68 -e '/^#.*/d' -e '/^ *$$/d' \
69 > .dep
70 test -s .dep || rm -f .dep
2bd0ea18
NS
71
72# Include dep, but only if it exists
4df72956
NS
73ifeq ($(shell test -f .dep && echo .dep), .dep)
74include .dep
d931d17e
TS
75else
76$(OBJECTS): $(HFILES)
2bd0ea18 77endif