Skip to content

Commit

Permalink
ocfs2-test: Made changes to Makefile to build ocfs2-test RPM.
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Matsunaga <[email protected]>

Signed-off-by: Tristan Ye <[email protected]>
  • Loading branch information
Marcos Matsunaga authored and Marcos Matsunaga committed Nov 12, 2008
1 parent 78b4ace commit 54dc7d8
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 14 deletions.
51 changes: 43 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,75 @@ else
COMPILE_PY = 1
endif

TOOLSARCH = $(shell $(TOPDIR)/rpmarch.guess tools $(TOPDIR))
TESTARCH = $(shell $(TOPDIR)/rpmarch.guess tools $(TOPDIR))

ifeq ($(TOOLSARCH),error)
$(error could not detect architecture for tools)
ifeq ($(TESTARCH),error)
$(error could not detect architecture for ocfs2-test)
endif

SUBDIRS = programs utilities tests suites

SUBDIRS += vendor


DIST_FILES = \
COPYING \
CREDITS \
MAINTAINERS \
README \
Config.make.in \
Preamble.make \
Postamble.make \
aclocal.m4 \
mbvendor.m4 \
python.m4 \
pythondev.m4 \
runlog.m4 \
config.guess \
config.sub \
configure \
configure.in \
install-sh \
mkinstalldirs \
Vendor.make \
vendor.guess \
svnrev.guess \
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
DIST_RULES = dist-subdircreate

.PHONY: dist dist-subdircreate dist-bye dist-fresh distclean

dist-subdircreate:
$(TOPDIR)/mkinstalldirs $(DIST_DIR)/documentation/samples
$(TOPDIR)/mkinstalldirs $(DIST_DIR)/debian

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 $(PKGCONFIG_FILES)

INSTALL_RULES = install-pkgconfig

install-pkgconfig: $(PKGCONFIG_FILES)
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
for p in $(PKGCONFIG_FILES); do \
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/$$p; \
done


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"
include Vendor.make

def:
@echo $(TOOLSARCH)
@echo $(TESTARCH)

include $(TOPDIR)/Postamble.make

Expand Down
12 changes: 6 additions & 6 deletions rpmarch.guess
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ fi

case "$host_cpu" in
x86_64|ia64|s390x)
TOOLSARCH=""
TESTARCH=""
;;
i386|i486|i586|i686|i786|k6|k7)
TOOLSARCH="i386"
TESTARCH="i386"
;;
ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
TOOLSARCH="ppc"
TESTARCH="ppc"
;;
*)
echo "rpmarch.guess: Warning: unknown RPM CPU architecture: $host_cpu" >&2
TOOLSARCH=""
TESTARCH=""
;;
esac

Expand All @@ -60,8 +60,8 @@ case "$mode" in
fi
;;
tools)
if [ -n "$TOOLSARCH" ] ; then
echo "--target $TOOLSARCH"
if [ -n "$TESTARCH" ] ; then
echo "--target $TESTARCH"
fi
;;
*)
Expand Down

0 comments on commit 54dc7d8

Please sign in to comment.