[Orca-checkins] r445 - in trunk/orca: . data_gatherers data_gatherers/aix data_gatherers/hp data_gatherers/orca_services data_gatherers/orcallator data_gatherers/procallator data_gatherers/winallator lib orca packages
blair at orcaware.com
blair at orcaware.com
Tue May 3 20:14:33 PDT 2005
Author: blair at orcaware.com
Date: Tue May 3 20:13:44 2005
New Revision: 445
Modified:
trunk/orca/Makefile.in
trunk/orca/data_gatherers/Makefile.in
trunk/orca/data_gatherers/aix/Makefile.in
trunk/orca/data_gatherers/hp/Makefile.in
trunk/orca/data_gatherers/orca_services/Makefile.in
trunk/orca/data_gatherers/orcallator/Makefile.in
trunk/orca/data_gatherers/procallator/Makefile.in
trunk/orca/data_gatherers/winallator/Makefile.in
trunk/orca/lib/Makefile.in
trunk/orca/orca/Makefile.in
trunk/orca/packages/Makefile.in
Log:
Bring Orca's Makefile.in's more in line with how GNU packages work.
* Makefile.in,
* packages/Makefile.in:
Use the same rule for the all, install and check targets.
Simplify the clean and distclean rules.
* data_gatherers/aix/Makefile.in,
* data_gatherers/hp/Makefile.in,
* data_gatherers/Makefile.in,
* data_gatherers/orcallator/Makefile.in,
* data_gatherers/orca_services/Makefile.in,
* data_gatherers/procallator/Makefile.in,
* data_gatherers/winallator/Makefile.in,
* lib/Makefile.in,
* orca/Makefile.in:
Now fail if any of the install or clean targets fail to install or
clean properly.
Modified: trunk/orca/Makefile.in
==============================================================================
--- trunk/orca/Makefile.in (original)
+++ trunk/orca/Makefile.in Tue May 3 20:13:44 2005
@@ -11,39 +11,19 @@
docs \
contrib
-all: configure config/PerlHead1 config/PerlHead2 Makefile
- @for dir in $(SUBDIRS); do \
- if test -d $$dir; then \
- echo "cd $$dir"; \
- cd $$dir || exit 1; \
- echo "$(MAKE) CFLAGS=$(CFLAGS) || exit 1"; \
- $(MAKE) CFLAGS="$(CFLAGS)" || exit 1; \
- echo "cd .."; \
- cd ..; \
- else \
- exit 1; \
- fi \
+ORCA_MAKE_DEFINES = CFLAGS='$(CFLAGS)'
+
+all install check: configure config/PerlHead1 config/PerlHead2 Makefile
+ @for subdir in $(SUBDIRS); do \
+ echo making $@ in $$subdir; \
+ (cd $$subdir && $(MAKE) $(ORCA_MAKE_DEFINES) $@) || exit 1; \
done
-test: configure Makefile
+test: check
upgrade:
cd src && $(MAKE) upgrade_installation
-install:
- @for dir in $(SUBDIRS); do \
- if test -d $$dir; then \
- echo "cd $$dir"; \
- cd $$dir || exit 1; \
- echo "$(MAKE) CFLAGS=$(CFLAGS) install || exit 1"; \
- $(MAKE) CFLAGS="$(CFLAGS)" install || exit 1; \
- echo "cd .."; \
- cd ..; \
- else \
- exit 1; \
- fi \
- done
-
install_contrib:
cd contrib && $(MAKE) install_contrib
@@ -62,21 +42,24 @@
install_modules:
cd packages && $(MAKE) CFLAGS="$(CFLAGS)" install_modules
-clean:
- @for dir in $(SUBDIRS); do \
- echo "cd $$dir && $(MAKE) clean"; \
- (cd $$dir && $(MAKE) clean); \
- done
+clean: clean-recursive clean-local
-distclean:
- @for dir in $(SUBDIRS); do \
- echo "cd $$dir && $(MAKE) distclean"; \
- (cd $$dir && $(MAKE) distclean); \
- done
+distclean: distclean-recursive distclean-local
+
+clean-local:
+
+distclean-local: clean-local
$(RM) -r autom4te*.cache
$(RM) config/aclocal.m4 config/PerlHead1 config/PerlHead2
$(RM) configure config.cache config.log config.status Makefile
+clean-recursive distclean-recursive:
+ @for subdir in $(SUBDIRS); do \
+ target=`echo $@ | sed 's/-recursive//'`; \
+ echo making $$target in $$subdir; \
+ (cd $$subdir && $(MAKE) $$target) || exit 1; \
+ done
+
to-autoconf:
aclocal -I config --output=config/aclocal.m4
autoconf --include=config
Modified: trunk/orca/data_gatherers/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/Makefile.in (original)
+++ trunk/orca/data_gatherers/Makefile.in Tue May 3 20:13:44 2005
@@ -14,10 +14,12 @@
$(PROCALLATOR_SUBDIR) \
$(WINALLATOR_SUBDIR)
-all: Makefile $(TARGETS)
- @for dir in $(SUBDIRS); do \
- echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS)"; \
- (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)"); \
+ORCA_MAKE_DEFINES = CFLAGS='$(CFLAGS)'
+
+all install: Makefile $(TARGETS)
+ @for subdir in $(SUBDIRS); do \
+ echo making $@ in $$subdir; \
+ (cd $$subdir && $(MAKE) $(ORCA_MAKE_DEFINES) $@) || exit 1; \
done
orcallator_run_at_boot:
@@ -29,24 +31,21 @@
procallator_run_at_boot:
cd procallator && $(MAKE) procallator_run_at_boot
-install:
- @for dir in $(SUBDIRS); do \
- echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) install"; \
- (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" install); \
- done
+clean: clean-recursive clean-local
-clean:
- @for dir in $(SUBDIRS); do \
- echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) clean"; \
- (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" clean); \
- done
+distclean: distclean-recursive distclean-local
-distclean: clean
- @for dir in $(SUBDIRS); do \
- echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) distclean"; \
- (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" distclean); \
- done
+clean-local:
+
+distclean-local: clean-local
$(RM) Makefile
+clean-recursive distclean-recursive:
+ for subdir in $(SUBDIRS); do \
+ target=`echo $@ | sed 's/-recursive//'`; \
+ echo making $$target in $$subdir; \
+ (cd $$subdir && $(MAKE) $$target) || exit 1; \
+ done
+
Makefile: Makefile.in
cd .. && CONFIG_FILES=data_gatherers/Makefile ./config.status
Modified: trunk/orca/data_gatherers/aix/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/aix/Makefile.in (original)
+++ trunk/orca/data_gatherers/aix/Makefile.in Tue May 3 20:13:44 2005
@@ -37,7 +37,7 @@
$(MKDIR) $(bindir)
@for file in `echo $(BIN_TARGETS)`; do \
echo $(INSTALL) $$file $(bindir); \
- $(INSTALL) $$file $(bindir); \
+ $(INSTALL) $$file $(bindir) || exit 1; \
done
clean:
Modified: trunk/orca/data_gatherers/hp/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/hp/Makefile.in (original)
+++ trunk/orca/data_gatherers/hp/Makefile.in Tue May 3 20:13:44 2005
@@ -37,7 +37,7 @@
$(MKDIR) $(bindir)
@for file in `echo $(BIN_TARGETS)`; do \
echo $(INSTALL) $$file $(bindir); \
- $(INSTALL) $$file $(bindir); \
+ $(INSTALL) $$file $(bindir) || exit 1; \
done
clean:
Modified: trunk/orca/data_gatherers/orca_services/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/orca_services/Makefile.in (original)
+++ trunk/orca/data_gatherers/orca_services/Makefile.in Tue May 3 20:13:44 2005
@@ -49,19 +49,19 @@
$(MKDIR) $(RRD_ORCA_SERVICES_DIR)
@for file in `echo $(BIN_TARGETS)`; do \
echo $(INSTALL) $$file $(bindir); \
- $(INSTALL) $$file $(bindir); \
+ $(INSTALL) $$file $(bindir) || exit 1; \
done
@for file in `echo $(LIBEXEC_TARGETS)`; do \
echo $(INSTALL) $$file $(libexecdir); \
- $(INSTALL) $$file $(libexecdir); \
+ $(INSTALL) $$file $(libexecdir) || exit 1; \
done
- @if test -r $(sysconfdir)/orca_services.cfg; then \
+ if test -r $(sysconfdir)/orca_services.cfg; then \
date="`date +%Y-%m-%d-%H:%M:%S`"; \
echo $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir)/orca_services.cfg.$$date; \
- $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir)/orca_services.cfg.$$date; \
+ $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir)/orca_services.cfg.$$date || exit 1; \
else \
echo $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir); \
- $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir); \
+ $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir) || exit 1; \
fi
orca_services_run_at_boot: all
Modified: trunk/orca/data_gatherers/orcallator/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/orcallator/Makefile.in (original)
+++ trunk/orca/data_gatherers/orcallator/Makefile.in Tue May 3 20:13:44 2005
@@ -50,16 +50,16 @@
$(MKDIR) $(RRD_ORCALLATOR_DIR)
@for file in `echo $(BIN_TARGETS)`; do \
echo $(INSTALL) $$file $(bindir); \
- $(INSTALL) $$file $(bindir); \
+ $(INSTALL) $$file $(bindir) || exit 1; \
done
$(INSTALL) -m 0644 orcallator.se $(libdir)
- @if test -r $(sysconfdir)/orcallator.cfg; then \
+ if test -r $(sysconfdir)/orcallator.cfg; then \
date="`date +%Y-%m-%d-%H:%M:%S`"; \
echo $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)/orcallator.cfg.$$date; \
- $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)/orcallator.cfg.$$date; \
+ $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)/orcallator.cfg.$$date || exit 1; \
else \
echo $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir); \
- $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir); \
+ $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir) || exit 1; \
fi
orcallator_run_at_boot: all
Modified: trunk/orca/data_gatherers/procallator/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/procallator/Makefile.in (original)
+++ trunk/orca/data_gatherers/procallator/Makefile.in Tue May 3 20:13:44 2005
@@ -46,15 +46,15 @@
$(MKDIR) $(RRD_PROCALLATOR_DIR)
@for file in `echo $(BIN_TARGETS)`; do \
echo $(INSTALL) $$file $(bindir); \
- $(INSTALL) $$file $(bindir); \
+ $(INSTALL) $$file $(bindir) || exit 1; \
done
- @if test -r $(sysconfdir)/procallator.cfg; then \
+ if test -r $(sysconfdir)/procallator.cfg; then \
date="`date +%Y-%m-%d-%H:%M:%S`"; \
echo $(INSTALL) -m 0644 procallator.cfg $(sysconfdir)/procallator.cfg.$$date; \
- $(INSTALL) -m 0644 procallator.cfg $(sysconfdir)/procallator.cfg.$$date; \
+ $(INSTALL) -m 0644 procallator.cfg $(sysconfdir)/procallator.cfg.$$date || exit 1; \
else \
echo $(INSTALL) -m 0644 procallator.cfg $(sysconfdir); \
- $(INSTALL) -m 0644 procallator.cfg $(sysconfdir); \
+ $(INSTALL) -m 0644 procallator.cfg $(sysconfdir) || exit 1; \
fi
procallator_run_at_boot: all
Modified: trunk/orca/data_gatherers/winallator/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/winallator/Makefile.in (original)
+++ trunk/orca/data_gatherers/winallator/Makefile.in Tue May 3 20:13:44 2005
@@ -44,15 +44,15 @@
$(MKDIR) $(RRD_WINALLATOR_DIR)
@for file in `echo $(BIN_TARGETS)`; do \
echo $(INSTALL) $$file $(bindir); \
- $(INSTALL) $$file $(bindir); \
+ $(INSTALL) $$file $(bindir) || exit 1; \
done
- @if test -r $(sysconfdir)/winallator.cfg; then \
+ if test -r $(sysconfdir)/winallator.cfg; then \
date="`date +%Y-%m-%d-%H:%M:%S`"; \
echo $(INSTALL) -m 0644 winallator.cfg $(sysconfdir)/winallator.cfg.$$date; \
- $(INSTALL) -m 0644 winallator.cfg $(sysconfdir)/winallator.cfg.$$date; \
+ $(INSTALL) -m 0644 winallator.cfg $(sysconfdir)/winallator.cfg.$$date || exit 1; \
else \
echo $(INSTALL) -m 0644 winallator.cfg $(sysconfdir); \
- $(INSTALL) -m 0644 winallator.cfg $(sysconfdir); \
+ $(INSTALL) -m 0644 winallator.cfg $(sysconfdir) || exit 1; \
fi
clean:
Modified: trunk/orca/lib/Makefile.in
==============================================================================
--- trunk/orca/lib/Makefile.in (original)
+++ trunk/orca/lib/Makefile.in Tue May 3 20:13:44 2005
@@ -35,13 +35,14 @@
$(MKDIR) $(libdir)/SE/3.4
@for f in Orca/*.pm; do \
echo $(INSTALL) -m 0644 $$f $(libdir)/Orca; \
- $(INSTALL) -m 0644 $$f $(libdir)/Orca; \
+ $(INSTALL) -m 0644 $$f $(libdir)/Orca || exit 1; \
done
@if test -d Orca/Config; then \
- $(MKDIR) $(libdir)/Orca/Config; \
+ echo $(MKDIR) $(libdir)/Orca/Config; \
+ $(MKDIR) $(libdir)/Orca/Config || exit 1; \
for f in Orca/Config/*.pm; do \
echo $(INSTALL) -m 0644 $$f $(libdir)/Orca/Config; \
- $(INSTALL) -m 0644 $$f $(libdir)/Orca/Config; \
+ $(INSTALL) -m 0644 $$f $(libdir)/Orca/Config || exit 1; \
done; \
fi
@for d in SE/*; do \
@@ -49,20 +50,23 @@
for f in $$d/*; do \
test ! -f $$f && continue; \
echo $(INSTALL) -m 0644 $$f $(libdir)/$$d; \
- $(INSTALL) -m 0644 $$f $(libdir)/$$d; \
+ $(INSTALL) -m 0644 $$f $(libdir)/$$d || exit 1; \
done \
done
- @echo "cd ..; sh -c 'svnversion .' 2>/dev/null || true"
+ @echo "cd ..; sh -c 'svnversion .'"
@current_rev="`cd ..; sh -c 'svnversion .' 2>/dev/null || true`"; \
+ echo "Subversion reversion of Orca is: $$current_rev"; \
if test "$$current_rev" != "" && \
- test "$$current_rev" != "exported"; then \
- echo "Found good svnversion for `cd ..; pwd`: $$current_rev"; \
+ test "$$current_rev" != "exported"; then \
+ echo Fixing svn revision number in $(libdir)/Orca/Constants.pm; \
echo $(PERL) -w -p -i \
-e 's/^(\$$ORCA_VER_REVISION\s*=\s*).*/$${1}"'$$current_rev'";/' \
$(libdir)/Orca/Constants.pm; \
$(PERL) -w -p -i \
-e 's/^(\$$ORCA_VER_REVISION\s*=\s*).*/$${1}"'$$current_rev'";/' \
- $(libdir)/Orca/Constants.pm; \
+ $(libdir)/Orca/Constants.pm || exit 1; \
+ else \
+ echo Not fixing svn revision number in $(libdir)/Orca/Constants.pm; \
fi
clean:
Modified: trunk/orca/orca/Makefile.in
==============================================================================
--- trunk/orca/orca/Makefile.in (original)
+++ trunk/orca/orca/Makefile.in Tue May 3 20:13:44 2005
@@ -37,7 +37,7 @@
$(MKDIR) $(bindir)
@for file in $(BIN_TARGETS); do \
echo $(INSTALL) $$file $(bindir); \
- $(INSTALL) $$file $(bindir); \
+ $(INSTALL) $$file $(bindir) || exit 1; \
done
upgrade: upgrade_installation
Modified: trunk/orca/packages/Makefile.in
==============================================================================
--- trunk/orca/packages/Makefile.in (original)
+++ trunk/orca/packages/Makefile.in Tue May 3 20:13:44 2005
@@ -143,6 +143,8 @@
$(storable_dir)/Makefile: $(storable_dir)/Makefile.PL $(PERL)
cd $(storable_dir) && $(PERL) Makefile.PL
+check:
+
test:
test_modules: $(TEST_TARGETS)
@@ -160,7 +162,7 @@
cd $(digest_md5_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test
test_math_intervalsearch: $(math_intervalsearch_dir)/Makefile
- cd $(math_intervalsearch_dir) && $(MAKE) test
+ cd $(math_intervalsearch_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test
test_rrdtool: make_rrdtool
cd $(rrdtool_dir)/perl-shared && $(MAKE) CFLAGS="$(CFLAGS)" test
@@ -199,42 +201,42 @@
clean: $(CLEAN_TARGETS)
clean_data_dumper:
- @if test -r $(data_dumper_dir)/Makefile; then \
- echo 'cd $(data_dumper_dir) && $(MAKE) clean'; \
- (cd $(data_dumper_dir) && $(MAKE) clean); \
+ if test -r $(data_dumper_dir)/Makefile; then \
+ echo making clean in $(data_dumper_dir); \
+ (cd $(data_dumper_dir) && $(MAKE) clean) || exit 1; \
fi
clean_date_parse:
- @if test -r $(date_parse_dir)/Makefile; then \
- echo 'cd $(date_parse_dir) && $(MAKE) clean'; \
- (cd $(date_parse_dir) && $(MAKE) clean); \
+ if test -r $(date_parse_dir)/Makefile; then \
+ echo making clean in $(date_parse_dir); \
+ (cd $(date_parse_dir) && $(MAKE) clean) || exit 1; \
fi
clean_devel_dprof:
- @if test -r $(devel_dprof_dir)/Makefile; then \
- echo 'cd $(devel_dprof_dir) && $(MAKE) clean'; \
- (cd $(devel_dprof_dir) && $(MAKE) clean); \
+ if test -r $(devel_dprof_dir)/Makefile; then \
+ echo making clean in $(devel_dprof_dir); \
+ (cd $(devel_dprof_dir) && $(MAKE) clean) || exit 1; \
fi
clean_digest_md5:
- @if test -r $(digest_md5_dir)/Makefile; then \
- echo 'cd $(digest_md5_dir) && $(MAKE) clean'; \
- (cd $(digest_md5_dir) && $(MAKE) clean); \
+ if test -r $(digest_md5_dir)/Makefile; then \
+ echo making clean in $(digest_md5_dir); \
+ (cd $(digest_md5_dir) && $(MAKE) clean) || exit 1; \
fi
clean_math_intervalsearch:
- @if test -r $(math_intervalsearch_dir)/Makefile; then \
- echo 'cd $(math_intervalsearch_dir) && $(MAKE) clean'; \
- (cd $(math_intervalsearch_dir) && $(MAKE) clean); \
+ if test -r $(math_intervalsearch_dir)/Makefile; then \
+ echo making clean in $(math_intervalsearch_dir); \
+ (cd $(math_intervalsearch_dir) && $(MAKE) clean) || exit 1; \
fi
clean_rrdtool:
- (cd $(rrdtool_dir) && $(MAKE) clean)
+ cd $(rrdtool_dir) && $(MAKE) clean
clean_storable:
- @if test -r $(storable_dir)/Makefile; then \
- echo 'cd $(storable_dir) && $(MAKE) clean'; \
- (cd $(storable_dir) && $(MAKE) clean); \
+ if test -r $(storable_dir)/Makefile; then \
+ echo making clean in $(storable_dir); \
+ (cd $(storable_dir) && $(MAKE) clean) || exit 1; \
fi
distclean: $(DISTCLEAN_TARGETS)
More information about the Orca-checkins
mailing list