[Cbe-oss-dev] [PATCH 2/7]MARS/base: Samples conform to automake

Yuji Mano yuji.mano at am.sony.com
Sat Jan 17 07:36:38 EST 2009


From: Kazunori Asayama <asayama at sm.sony.co.jp>

Modify samples Makefile to conform to automake

This patch modifies the Makefile in samples directory so it conforms
to automake's 3rd-party Makefile.

Signed-off-by: Kazunori Asayama <asayama at sm.sony.co.jp>
---
 samples/Makefile |   39 ++++++++++++++++++++++++++++++++-------
 1 file changed, 32 insertions(+), 7 deletions(-)

Index: b/samples/Makefile
===================================================================
--- a/samples/Makefile	2008-12-25 20:31:43.000000000 +0900
+++ b/samples/Makefile	2008-12-25 20:36:29.000000000 +0900
@@ -44,7 +44,14 @@ SUBDIRS = \
 	workload_module \
 	yield
 
-.PHONY: all clean test dist dist-clean
+datadir = /usr/share
+
+.PHONY: all check distdir dist
+.PHONY: mostlyclean clean distclean maintainer-clean
+.PHONY: install install-data install-exec uninstall installdirs installcheck
+.PHONY: install-dvi install-html install-info install-ps install-pdf
+.PHONY: dvi html info ps pdf
+.PHONY: tags ctags
 
 all:
 	@for dir in $(SUBDIRS); do $(MAKE) -C $$dir all || exit 1; done
@@ -59,11 +66,29 @@ check: all
 	@echo "All samples completed successfully!"
 	@echo "==================================="
 
-dist: dist-clean
-	@mkdir $(PACKAGE)
-	@cp -rf $(SUBDIRS) config.mk rules.mk Makefile COPYING README $(PACKAGE)
-	@tar cvzf $(PACKAGE).tar.gz $(PACKAGE) --exclude=.gitignore
-	@rm -rf $(PACKAGE)
+install: install-data
+
+install-data:
+	$(MAKE) distdir=$(DESTDIR)$(datadir)/mars-$(VERSION)/samples distdir
+
+dist:
+	$(MAKE) distdir=$(PACKAGE) distdir
+	tar cvzf $(PACKAGE).tar.gz $(PACKAGE)
+	rm -rf $(PACKAGE)
+
+distdir: distclean
+	mkdir -p $(distdir)
+	cp -rf $(SUBDIRS) config.mk rules.mk Makefile COPYING README $(distdir)
+	rm -f `find  $(distdir) -name '.gitignore'`
 
-dist-clean: clean
+distclean: clean
 	@rm -rf $(PACKAGE).tar.gz $(PACKAGE)
+
+mostlyclean: clean
+
+maintainer-clean: distclean
+
+install-exec uninstall installdirs installcheck:
+install-dvi install-html install-info install-ps install-pdf:
+dvi html info ps pdf:
+tags ctags:






More information about the cbe-oss-dev mailing list