forked from markfasheh/ocfs2-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original-revision: 2
- Loading branch information
Joel Becker
committed
Aug 25, 2008
1 parent
15ef428
commit 375ab0e
Showing
26 changed files
with
5,605 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
PACKAGE = @PACKAGE@ | ||
VERSION = @VERSION@ | ||
|
||
DIST_VERSION = @DIST_VERSION@ | ||
RPM_VERSION = @RPM_VERSION@ | ||
|
||
MAJOR_VERSION = @MAJOR_VERSION@ | ||
MINOR_VERSION = @MINOR_VERSION@ | ||
MICRO_VERSION = @MICRO_VERSION@ | ||
EXTRA_VERSION = @EXTRA_VERSION@ | ||
|
||
SHELL = @SHELL@ | ||
|
||
prefix = @prefix@ | ||
exec_prefix = @exec_prefix@ | ||
|
||
bindir = @bindir@ | ||
sbindir = @sbindir@ | ||
includedir = @includedir@ | ||
libdir = @libdir@ | ||
datadir = @datadir@ | ||
sysconfdir = @sysconfdir@ | ||
mandir = @mandir@ | ||
|
||
pyexecdir = @pyexecdir@ | ||
|
||
top_builddir = . | ||
|
||
INSTALL = @INSTALL@ | ||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
INSTALL_LIBRARY = @INSTALL_PROGRAM@ | ||
INSTALL_DATA = @INSTALL_DATA@ | ||
INSTALL_HEADER = @INSTALL_DATA@ | ||
|
||
LN_S = @LN_S@ | ||
|
||
CC = @CC@ | ||
CPP = @CPP@ | ||
AR = @AR@ | ||
RANLIB = @RANLIB@ | ||
|
||
CFLAGS = @CFLAGS@ | ||
CPPFLAGS = @CPPFLAGS@ | ||
LDFLAGS = @LDFLAGS@ | ||
|
||
OCFS2_CFLAGS = @OCFS2_CFLAGS@ | ||
OCFS2_LIBS = @OCFS2_LIBS@ | ||
O2DLM_CFLAGS = @O2DLM_CFLAGS@ | ||
O2DLM_LIBS = @O2DLM_LIBS@ | ||
O2CB_CFLAGS = @O2CB_CFLAGS@ | ||
O2CB_LIBS = @O2CB_LIBS@ | ||
COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ | ||
COM_ERR_LIBS = @COM_ERR_LIBS@ | ||
|
||
GLIB_CFLAGS = @GLIB_CFLAGS@ | ||
GLIB_LIBS = @GLIB_LIBS@ | ||
|
||
PYTHON = @PYTHON@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
TOPDIR = . | ||
|
||
include $(TOPDIR)/Preamble.make | ||
|
||
RPM_TOPDIR = $(CURDIR) | ||
|
||
RPMBUILD = $(shell /usr/bin/which rpmbuild 2>/dev/null || /usr/bin/which rpm 2>/dev/null || echo /bin/false) | ||
|
||
SUSEBUILD = $(shell if test -r /etc/SuSE-release; then echo yes; else echo no; fi) | ||
|
||
PYVERSION = $(shell echo $(pyexecdir) | sed -e 's/.*python\([0-9]\.[0-9]\).*/\1/') | ||
|
||
ifeq ($(SUSEBUILD),yes) | ||
COMPILE_PY = 0 | ||
else | ||
COMPILE_PY = 1 | ||
endif | ||
|
||
TOOLSARCH = $(shell $(TOPDIR)/rpmarch.guess tools $(TOPDIR)) | ||
|
||
ifeq ($(TOOLSARCH),error) | ||
$(error could not detect architecture for tools) | ||
endif | ||
|
||
SUBDIRS = tests tools | ||
|
||
|
||
DIST_FILES = \ | ||
COPYING \ | ||
README \ | ||
Config.make.in \ | ||
Preamble.make \ | ||
Postamble.make \ | ||
aclocal.m4 \ | ||
python.m4 \ | ||
runlog.m4 \ | ||
config.guess \ | ||
config.sub \ | ||
configure \ | ||
configure.in \ | ||
install-sh \ | ||
mkinstalldirs \ | ||
rpmarch.guess | ||
|
||
srpm: dist | ||
$(RPMBUILD) -bs --define "_sourcedir $(RPM_TOPDIR)" --define "_srcrpmdir $(RPM_TOPDIR)" --define "pygtk_name $(PYGTK_NAME)" --define "pyversion $(PYVERSION)" --define "chkconfig_dep $(CHKCONFIG_DEP)" --define "compile_py $(COMPILE_PY)" $(TOPDIR)/vendor/common/ocfs2-tools.spec | ||
|
||
rpm: srpm | ||
$(RPMBUILD) --rebuild --define "pygtk_name $(PYGTK_NAME)" --define "pyversion $(PYVERSION)" --define "chkconfig_dep $(CHKCONFIG_DEP)" --define "compile_py $(COMPILE_PY)" $(TOOLSARCH) "ocfs2-tools-$(DIST_VERSION)-$(RPM_VERSION).src.rpm" | ||
|
||
def: | ||
@echo $(TOOLSARCH) | ||
|
||
include $(TOPDIR)/Postamble.make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
ifdef VERSION_SRC | ||
|
||
ifndef VERSION_FILES | ||
$(error Need VERSION_FILES defined for version objects) | ||
endif | ||
|
||
ifndef VERSION_PREFIX | ||
$(error Need VERSION_PREFIX defined for version objects) | ||
endif | ||
|
||
VERSION_OBJ = $(subst .c,.o,$(VERSION_SRC)) | ||
|
||
VERSION_NUM = $(VERSION_PREFIX)_BUILD_VERSION | ||
VERSION_DATE = $(VERSION_PREFIX)_BUILD_DATE | ||
VERSION_MD5 = $(VERSION_PREFIX)_BUILD_MD5 | ||
|
||
VERDEFS = -D$(VERSION_NUM)=\""$(VERSION)"\" \ | ||
-D$(VERSION_DATE)=\""$(shell LANG=C date)"\" \ | ||
-D$(VERSION_MD5)=\""$(shell cat stamp-md5)"\" | ||
|
||
VERMAGIC = $(if $(filter $(VERSION_OBJ),$@),$(VERDEFS)) | ||
|
||
ifneq ($(MAKECMDGOALS),install) | ||
VERSTAMP = stamp | ||
endif | ||
|
||
stamp: ; | ||
|
||
stamp-md5: $(VERSION_FILES) | ||
@cat $(VERSION_FILES) Makefile | md5sum | sed -e 's/ .*//' > stamp-md5 | ||
|
||
$(VERSION_OBJ): stamp-md5 $(VERSTAMP) | ||
endif | ||
|
||
|
||
LOCAL_CFLAGS = $($(subst /,_,$(basename $@))_CFLAGS) | ||
LOCAL_CPPFLAGS = $($(subst /,_,$(basename $@))_CPPFLAGS) | ||
|
||
%.o: %.c | ||
$(CC) $(CFLAGS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(INCLUDES) $(DEFINES) $(VERMAGIC) $(CDEPFLAGS) -o $@ -c $< | ||
|
||
%.p: %.c | ||
$(CC) $(CFLAGS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(INCLUDES) $(DEFINES) $(VERMAGIC) -E -o $@ -c $< | ||
|
||
%.s: %.c | ||
$(CC) $(CFLAGS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(INCLUDES) $(DEFINES) $(VERMAGIC) -S -o $@ -c $< | ||
|
||
|
||
|
||
.PHONY: subdirs $(SUBDIRS) | ||
subdirs: $(SUBDIRS) | ||
|
||
$(SUBDIRS): | ||
$(MAKE) -C $@ | ||
|
||
.PHONY: all-rules | ||
all-rules: subdirs $(UNINST_LIBRARIES) $(LIBRARIES) $(BIN_PROGRAMS) $(SBIN_PROGRAMS) $(UNINST_PROGRAMS) $(MODULES) $(MANS) | ||
|
||
|
||
INSTALL_SUBDIRS = $(addsuffix -install,$(SUBDIRS)) | ||
|
||
.PHONY: install-rules install-subdirs $(INSTALL_RULES) install-libraries install-headers install-bin-programs install-bin-extra install-sbin-programs install-sbin-extra | ||
|
||
install-subdirs: $(INSTALL_SUBDIRS) | ||
|
||
$(INSTALL_SUBDIRS): | ||
$(MAKE) -C $(subst -install,,$@) install | ||
|
||
install-libraries: $(LIBRARIES) | ||
ifdef LIBRARIES | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(libdir) | ||
for lib in $(LIBRARIES); do \ | ||
$(INSTALL_LIBRARY) $$lib $(DESTDIR)$(libdir)/$$lib; \ | ||
done | ||
endif | ||
|
||
ifeq ($(filter /%,$(HEADERS_SUBDIR)),) | ||
Hsubdir = /$(HEADERS_SUBDIR) | ||
else | ||
Hsubdir = $(HEADERS_SUBDIR) | ||
endif | ||
|
||
ifeq ($(filter include/%,$(HEADERS)),) | ||
Hinstall = | ||
else | ||
Hinstall = include/ | ||
endif | ||
|
||
install-headers: $(HEADERS) | ||
ifdef HEADERS | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(includedir)$(Hsubdir) | ||
for hdr in $(patsubst include/%,%,$(HEADERS)); do \ | ||
$(INSTALL_HEADER) $(Hinstall)$$hdr $(DESTDIR)$(includedir)$(Hsubdir)/$$hdr; \ | ||
done | ||
endif | ||
|
||
install-bin-programs: $(BIN_PROGRAMS) | ||
ifdef BIN_PROGRAMS | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(bindir) | ||
for prog in $(BIN_PROGRAMS); do \ | ||
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir)/$$prog; \ | ||
done | ||
endif | ||
|
||
install-bin-extra: $(BIN_EXTRA) | ||
ifdef BIN_EXTRA | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(bindir) | ||
for prog in $(BIN_EXTRA); do \ | ||
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir)/$$prog; \ | ||
done | ||
endif | ||
|
||
install-sbin-programs: $(SBIN_PROGRAMS) | ||
ifdef SBIN_PROGRAMS | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(sbindir) | ||
for prog in $(SBIN_PROGRAMS); do \ | ||
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(sbindir)/$$prog; \ | ||
done | ||
endif | ||
|
||
install-sbin-extra: $(SBIN_EXTRA) | ||
ifdef SBIN_EXTRA | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(sbindir) | ||
for prog in $(SBIN_EXTRA); do \ | ||
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(sbindir)/$$prog; \ | ||
done | ||
endif | ||
|
||
install-mans: $(MANS) | ||
ifdef MANS | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(mandir) | ||
for man in $(MANS); do \ | ||
dir=`echo $$man | sed -e 's/^.*\\./man/'`; \ | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(mandir)/$$dir; \ | ||
$(INSTALL_DATA) $$man $(DESTDIR)$(mandir)/$$dir/$$man; \ | ||
done | ||
endif | ||
|
||
install-rules: install-subdirs $(INSTALL_RULES) install-libraries install-headers install-bin-programs install-bin-extra install-sbin-programs install-sbin-extra install-mans | ||
|
||
|
||
CLEAN_SUBDIRS = $(addsuffix -clean,$(SUBDIRS)) | ||
|
||
.PHONY: clean clean-subdirs $(CLEAN_RULES) $(CLEAN_SUBDIRS) | ||
|
||
clean-subdirs: $(CLEAN_SUBDIRS) | ||
|
||
$(CLEAN_SUBDIRS): | ||
$(MAKE) -C $(subst -clean,,$@) clean | ||
|
||
clean: clean-subdirs $(CLEAN_RULES) | ||
rm -f *.o *.p .*.d core $(BIN_PROGRAMS) $(SBIN_PROGRAMS) $(UNINST_PROGRAMS) $(LIBRARIES) $(UNINST_LIBRARIES) $(CLEAN_FILES) stamp-md5 | ||
|
||
|
||
DIST_SUBDIRS = $(addsuffix -dist,$(SUBDIRS)) | ||
|
||
.PHONY: dist-all dist-mkdir dist-copy dist-subdirs dist dist-bye dist-fresh distclean $(DIST_RULES) $(DIST_SUBDIRS) | ||
|
||
dist-subdirs: $(DIST_SUBDIRS) | ||
|
||
$(DIST_SUBDIRS): | ||
$(MAKE) -C $(subst -dist,,$@) dist-all \ | ||
DIST_CURDIR=$(DIST_CURDIR)/$(subst -dist,,$@) | ||
|
||
dist-mkdir: | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DIST_DIR) | ||
|
||
DIST_ALL_FILES = Makefile $(BIN_EXTRA) $(SBIN_EXTRA) $(MANS) $(VERSION_FILES) $(DIST_FILES) | ||
|
||
dist-copy: dist-mkdir $(DIST_ALL_FILES) $(DIST_RULES) | ||
@for file in $(DIST_ALL_FILES); do \ | ||
echo " cp -p $$file $(DIST_DIR)/$$file"; \ | ||
cp -p $$file $(DIST_DIR)/$$file; \ | ||
done | ||
|
||
dist-all: dist-copy dist-subdirs | ||
|
||
dist-bye: | ||
-rm -rf $(DIST_TOPDIR) | ||
|
||
dist-fresh: dist-bye | ||
$(TOPDIR)/mkinstalldirs $(DIST_TOPDIR) | ||
|
||
dist: dist-fresh dist-all | ||
GZIP=$(GZIP_OPTS) tar chozf $(DIST_TOPDIR).tar.gz $(DIST_TOPDIR) | ||
$(MAKE) dist-bye | ||
|
||
distclean: clean | ||
rm -f Config.make config.status config.cache config.log | ||
|
||
|
||
LOCAL_DFILES := $(wildcard .*.d) | ||
ifneq ($(LOCAL_DFILES),) | ||
.PHONY: $(LOCAL_DFILES) | ||
-include $(LOCAL_DFILES) | ||
endif | ||
|
||
ifeq (Cscope.make,$(wildcard Cscope.make)) | ||
include Cscope.make | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
ifeq ($(TOPDIR)/Config.make,$(wildcard $(TOPDIR)/Config.make)) | ||
include $(TOPDIR)/Config.make | ||
else | ||
.PHONY: dummy-notconfigured | ||
dummy-notconfigured: | ||
@echo "Please run the configure script first" | ||
endif | ||
|
||
LIBRARIES = | ||
UNINST_LIBRARIES = | ||
BIN_PROGRAMS = | ||
SBIN_PROGRAMS = | ||
UNINST_PROGRAMS = | ||
MODULES = | ||
HEADERS = | ||
MANS = | ||
|
||
HEADERS_SUBDIR = | ||
|
||
INSTALL_RULES = | ||
|
||
CLEAN_FILES = | ||
CLEAN_RULES = | ||
|
||
DIST_FILES = | ||
DIST_RULES = | ||
|
||
INCLUDES = | ||
DEFINES = | ||
|
||
CFLAGS += $($(subst /,_,$(basename $@))_CFLAGS) | ||
CFLAGS += -pipe | ||
# protect with configure? | ||
CDEPFLAGS = -MD -MP -MF $(@D)/.$(basename $(@F)).d | ||
|
||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ | ||
|
||
VERSION_FILES = | ||
VERSION_PREFIX = | ||
VERSION_SRC = | ||
|
||
DIST_TOPDIR = $(TOPDIR)/$(PACKAGE)-$(DIST_VERSION) | ||
DIST_CURDIR = . | ||
DIST_DIR = $(DIST_TOPDIR)/$(DIST_CURDIR) | ||
|
||
GZIP_OPTS = --best | ||
|
||
.PHONY: all strip install | ||
all: all-rules | ||
strip: strip-rules | ||
install: install-rules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
These are tests for the OCFS2 filesystem. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
# | ||
# Makefile snipped for ocfs2 tests | ||
# | ||
# This snippet makes any binary that is part of the TESTS | ||
# variable get built and installed in $(TESTDIR) | ||
# | ||
|
||
# Put the tests in UNINST_PROGRAMS, because they don't go in /usr/bin | ||
UNINST_PROGRAMS = $(TESTS) | ||
|
||
INSTALL_RULES = install-tests | ||
|
||
install-tests: $(TESTS) | ||
ifdef TESTS | ||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(libdir)/ocfs2-tests | ||
for prog in $(TESTS); do \ | ||
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(libdir)/ocfs2-tests/$$prog; \ | ||
done | ||
endif | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
m4_include([pkg.m4]) | ||
m4_include([runlog.m4]) | ||
m4_include([python.m4]) |
Oops, something went wrong.