]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - include/buildrules
Merge whitespace changes over
[thirdparty/xfsprogs-dev.git] / include / buildrules
CommitLineData
2bd0ea18 1#
0d3e0b37 2# Copyright (c) 1999, 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
dfc130f3 3#
2bd0ea18
NS
4# This program is free software; you can redistribute it and/or modify it
5# under the terms of version 2 of the GNU General Public License as published
6# by the Free Software Fondation.
dfc130f3 7#
2bd0ea18
NS
8# This program is distributed in the hope that it would be useful, but WITHOUT
9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10# FITNESS FOR A PARTICULAR PURPOSE. Further, any license provided herein,
11# whether implied or otherwise, is limited to this program in accordance with
12# the express provisions of the GNU General Public License. Patent licenses,
13# if any, provided herein do not apply to combinations of this program with
14# other product or programs, or any other product whatsoever. This program is
15# distributed without any warranty that the program is delivered free of the
16# rightful claim of any third person by way of infringement or the like. See
17# the GNU General Public License for more details.
dfc130f3 18#
2bd0ea18
NS
19# You should have received a copy of the GNU General Public License along with
20# this program; if not, write the Free Software Foundation, Inc., 59 Temple
21# Place - Suite 330, Boston MA 02111-1307, USA.
22# Common build rules for gmake
23#
24ifndef _BUILDRULES_INCLUDED_
25_BUILDRULES_INCLUDED_ = 1
26
27include $(TOPDIR)/include/builddefs
28
2bd0ea18
NS
29clean clobber : $(SUBDIRS)
30 rm -f $(DIRT)
f937adac 31 @rm -fr .libs
2bd0ea18
NS
32 $(SUBDIRS_MAKERULE)
33
34# Never blow away subdirs
35ifdef SUBDIRS
36.PRECIOUS: $(SUBDIRS)
37$(SUBDIRS):
38 $(SUBDIRS_MAKERULE)
39endif
40
f937adac
NS
41#
42# Standard targets
43#
44
45ifdef LTCOMMAND
46$(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES)
47 $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
48endif
49
50ifdef LTLIBRARY
51$(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
1b82b560 52 $(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
f937adac
NS
53
54%.lo: %.c
55 $(LTCOMPILE) -c $<
56endif
57
9440d84d
NS
58ifdef LINGUAS
59%.pot: $(XGETTEXTFILES)
60 $(XGETTEXT) -o $@ $(XGETTEXTFILES)
61
62%.tmpo: %.po
63 $(MSGMERGE) -o $@ $< $(PKG_NAME).pot
64
65%.mo: %.tmpo
66 $(MSGFMT) -o $@ $<
67endif
68
2bd0ea18
NS
69source :
70 $(SOURCE_MAKERULE)
71
f937adac 72endif # _BUILDRULES_INCLUDED_
2bd0ea18
NS
73
74$(_FORCE):
75
76.PHONY : depend
77
78depend : $(CFILES) $(HFILES)
79 $(SUBDIRS_MAKERULE)
4df72956
NS
80 touch .dep
81 $(MAKEDEPEND) -f - -- $(CFLAGS) -- $(CFILES) | \
82 $(SED) -e 's,`pwd`,$(TOPDIR),g' \
83 -e 's, */[^ ]*,,g' \
84 -e '/^[^ ]*: *$$/d' \
85 -e '/^#.*/d' -e '/^ *$$/d' \
86 > .dep
87 test -s .dep || rm -f .dep
2bd0ea18
NS
88
89# Include dep, but only if it exists
4df72956
NS
90ifeq ($(shell test -f .dep && echo .dep), .dep)
91include .dep
2bd0ea18 92endif