Makefile.in 3.9 KB
Newer Older
Theodore Ts'o's avatar
Theodore Ts'o committed
1 2 3 4
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
top_builddir = .
Theodore Ts'o's avatar
Theodore Ts'o committed
5
my_dir = .
Theodore Ts'o's avatar
Theodore Ts'o committed
6 7 8 9
INSTALL = @INSTALL@

@MCONFIG@

10 11 12
@RESIZER_CMT@RESIZE_DIR= resize
@DEBUGFS_CMT@DEBUGFS_DIR= debugfs

13
LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid lib/blkid intl
14
PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
Theodore Ts'o's avatar
Theodore Ts'o committed
15
SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
Theodore Ts'o's avatar
Theodore Ts'o committed
16

17
SUBS= lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
Theodore Ts'o's avatar
Theodore Ts'o committed
18

Theodore Ts'o's avatar
Theodore Ts'o committed
19 20
TAR=tar

21
all:: subs
22 23 24
	$(MAKE) libs
	$(MAKE) progs
	$(MAKE) docs
Theodore Ts'o's avatar
Theodore Ts'o committed
25

26
subs:
27
	@for i in $(SUBS) ; do if test -d `dirname $$i` ; then $(MAKE) $$i ; fi ; done
28 29 30

progs: subs all-progs-recursive
libs: subs all-libs-recursive
Theodore Ts'o's avatar
Theodore Ts'o committed
31

32 33 34 35
e2fsprogs.spec: $(DEP_SUBSTITUTE) e2fsprogs.spec.in
	cd $(top_builddir); CONFIG_FILES=./e2fsprogs.spec ./config.status

rpm: e2fsprogs.spec
36 37
	sh contrib/build-rpm

Theodore Ts'o's avatar
Theodore Ts'o committed
38
docs:
39
	-@test -d doc && cd doc && $(MAKE) libext2fs.info
Theodore Ts'o's avatar
Theodore Ts'o committed
40 41

install-doc-libs:
42
	-@test -d doc && cd doc && $(MAKE) install-doc-libs
Theodore Ts'o's avatar
Theodore Ts'o committed
43

Theodore Ts'o's avatar
Theodore Ts'o committed
44
uninstall-doc-libs:
45
	-@test -d doc && cd doc && $(MAKE) uninstall-doc-libs
Theodore Ts'o's avatar
Theodore Ts'o committed
46

Theodore Ts'o's avatar
Theodore Ts'o committed
47
clean-doc:
48
	-@test -d doc && cd doc && $(MAKE) clean
Theodore Ts'o's avatar
Theodore Ts'o committed
49 50

distclean-doc:
51
	-test -d doc && cd doc && $(MAKE) distclean
Theodore Ts'o's avatar
Theodore Ts'o committed
52

53
install: subs all-libs-recursive install-progs-recursive \
54
  install-shlibs-libs-recursive install-doc-libs
55
	if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
Theodore Ts'o's avatar
Theodore Ts'o committed
56

57 58 59
install-strip: subs all-libs-recursive install-strip-progs-recursive \
  install-shlibs-strip-libs-recursive install-doc-libs

Theodore Ts'o's avatar
Theodore Ts'o committed
60 61
uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs

Theodore Ts'o's avatar
Theodore Ts'o committed
62 63
install-libs: install-libs-recursive

Theodore Ts'o's avatar
Theodore Ts'o committed
64 65
uninstall-libs: uninstall-libs-recursive

66
TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
67
  mostlyclean-recursive realclean-recursive:
68
	@for subdir in $(SUBDIRS); do \
69 70 71 72 73
	  if test -d $$subdir ; then \
	    target=`echo $@|$(SED) 's/-recursive//'`; \
	    echo making $$target in $$subdir; \
	    (cd $$subdir && $(MAKE) $$target) || exit 1; \
	  fi ; \
Theodore Ts'o's avatar
Theodore Ts'o committed
74 75
	done

76
all-progs-recursive install-progs-recursive install-strip-progs-recursive \
77
  uninstall-progs-recursive: all-libs-recursive
78
	@for subdir in $(PROG_SUBDIRS); do \
79 80 81 82 83
	  if test -d $$subdir ; then \
	    target=`echo $@|$(SED) 's/-progs-recursive//'`; \
	    echo making $$target in $$subdir; \
	    (cd $$subdir && $(MAKE) $$target) || exit 1; \
	  fi ; \
Theodore Ts'o's avatar
Theodore Ts'o committed
84 85
	done

86 87 88
all-libs-recursive install-libs-recursive install-strip-libs-recursive \
  uninstall-libs-recursive install-shlibs-libs-recursive \
  install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive:
89
	@for subdir in $(LIB_SUBDIRS); do \
90 91 92 93 94
	  if test -d $$subdir ; then \
	    target=`echo $@|$(SED) 's/-libs-recursive//'`; \
	    echo making $$target in $$subdir; \
	    (cd $$subdir && $(MAKE) $$target) || exit 1; \
	  fi ; \
Theodore Ts'o's avatar
Theodore Ts'o committed
95 96 97
	done

mostlyclean: mostlyclean-recursive mostlyclean-local
Theodore Ts'o's avatar
Theodore Ts'o committed
98

Theodore Ts'o's avatar
Theodore Ts'o committed
99
clean: clean-recursive clean-local clean-doc
100
	$(RM) -f $(SUBS) 
Theodore Ts'o's avatar
Theodore Ts'o committed
101

102
distclean: distclean-doc distclean-recursive
103
	$(RM) -rf autom4te.cache e2fsprogs.spec ext2ed/Makefile po/stamp-po
104
	$(MAKE) distclean-local 
Theodore Ts'o's avatar
Theodore Ts'o committed
105

Theodore Ts'o's avatar
Theodore Ts'o committed
106 107
realclean: realclean-recursive realclean-local

108 109
depend:: depend-recursive

Theodore Ts'o's avatar
Theodore Ts'o committed
110 111 112 113 114 115 116 117 118 119 120
lib/ext2fs/ext2_types.h: $(DEP_SUBSTITUTE) asm_types.h \
		$(srcdir)/lib/ext2fs/ext2_types.h.in
	cd $(top_builddir); CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status

lib/blkid/blkid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
		$(srcdir)/lib/blkid/blkid_types.h.in
	cd $(top_builddir); CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status

lib/uuid/uuid_types.h: $(DEP_SUBSTITUTE) asm_types.h \
		$(srcdir)/lib/uuid/uuid_types.h.in
	cd $(top_builddir); CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
121

Theodore Ts'o's avatar
Theodore Ts'o committed
122
mostlyclean-local:
123
	$(RM) -f \#* *~ *.orig core MAKELOG 
Theodore Ts'o's avatar
Theodore Ts'o committed
124

Theodore Ts'o's avatar
Theodore Ts'o committed
125
clean-local: mostlyclean-local
Theodore Ts'o's avatar
Theodore Ts'o committed
126

Theodore Ts'o's avatar
Theodore Ts'o committed
127
distclean-local: clean-local
128
	$(RM) -f $(SUBS) $(SUBST_CONF) \
Theodore Ts'o's avatar
Theodore Ts'o committed
129 130 131
		config.status config.log config.cache MCONFIG Makefile \
		$(srcdir)/TAGS $(srcdir)/Makefile.in.old

Theodore Ts'o's avatar
Theodore Ts'o committed
132 133 134
realclean-local: distclean-local
	$(RM) -f configure

135
check::	subs check-recursive
Theodore Ts'o's avatar
Theodore Ts'o committed
136