New patch submitted by Federico Simoncelli (fsimonce@redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/705
commit 3b0f6935d4921632f92049568f178722e99761e9 Author: Federico Simoncelli fsimonce@redhat.com Date: Wed Jul 13 15:52:56 2011 +0000
[WIP] Add a recursive install target in Makefile
Change-Id: Id579f1ebea23e4f89e9b3b7c0e0695164c505019
diff --git a/Makefile b/Makefile index c43c755..908b56f 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # (at your option) any later version. See the files README and # LICENSE_GPL_v2 which accompany this distribution. # -DIRS=vdsm_cli re vds_bootstrap vdsm vdsm_reg +SUBDIRS=vdsm_cli re vds_bootstrap vdsm vdsm_reg vdsm_hooks DOCS=LICENSE_GPL_v2 README
all: rpm @@ -45,9 +45,12 @@ pylint_all: pylint: cd vdsm; ls storage/*.py | xargs pylint -e 2> /dev/null
+install: + for subdir in $(SUBDIRS); do make -C $$subdir $@; done + .PHONY: tarball tarball: $(TARBALL) -$(TARBALL): Makefile $(DIRS) $(DOCS) $(TESTS) +$(TARBALL): Makefile $(SUBDIRS) $(DOCS) $(TESTS) tar zcf $(TARBALL) `git ls-files | grep -v /ut/` \ `git ls-files vdsm/ut/faqemu`
diff --git a/vds_bootstrap/Makefile b/vds_bootstrap/Makefile index 6ba23bc..2c023ae 100644 --- a/vds_bootstrap/Makefile +++ b/vds_bootstrap/Makefile @@ -7,15 +7,15 @@ #
INSTALL = install -TARGET = /usr/share/vdsm-bootstrap +VDSMBOOTDIR = /usr/share/vdsm-bootstrap PYSRCS = vds_bootstrap.py vds_bootstrap_complete.py
all: $(PYSRCS)
install: - $(INSTALL) -Dd 755 $(DESTDIR)$(TARGET) - $(INSTALL) -Dm 755 $(PYSRCS) $(DESTDIR)$(TARGET) - $(INSTALL) -Dm 644 deployUtil.py $(DESTDIR)$(TARGET) + $(INSTALL) -Dd 755 $(DESTDIR)$(VDSMBOOTDIR) + $(INSTALL) -Dm 755 $(PYSRCS) $(DESTDIR)$(VDSMBOOTDIR) + $(INSTALL) -Dm 644 deployUtil.py $(DESTDIR)$(VDSMBOOTDIR)
clean: $(RM) *.pyc *.pyo *~ diff --git a/vdsm.spec.in b/vdsm.spec.in index 9f526b9..e3a99be 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -53,55 +53,25 @@ sed -i 's/^software_version =.*/software_version = "%{version}"/;s/software_revi %install rm -rf "%{buildroot}" mkdir -p "%{buildroot}" -make -C vdsm DESTDIR="%{buildroot}" \ - VDSMDIR=%{_datadir}/%{vdsm_name} \ - VDSMLOGDIR=%{_localstatedir}/log/%{vdsm_name} \ - TRUSTSTORE=%{_sysconfdir}/pki/%{vdsm_name} \ - BINDIR=%{_bindir} \ - LIBEXECDIR=%{_libexecdir}/%{vdsm_name} \ - CONFDIR=%{_sysconfdir}/%{vdsm_name} \ - VDSMRUNDIR=%{_localstatedir}/run/%{vdsm_name} \ - VDSMLIBDIR=%{_localstatedir}/lib/%{vdsm_name} \ - SOSPLUGINDIR=%{py_sitedir}/sos/plugins \ - install +make DESTDIR="%{buildroot}" \ + ETC=%{_sysconfdir} \ + VDSMDIR=%{_datadir}/%{vdsm_name} \ + VDSMLOGDIR=%{_localstatedir}/log/%{vdsm_name} \ + TRUSTSTORE=%{_sysconfdir}/pki/%{vdsm_name} \ + BINDIR=%{_bindir} \ + LIBEXECDIR=%{_libexecdir}/%{vdsm_name} \ + CONFDIR=%{_sysconfdir}/%{vdsm_name} \ + REGCONFDIR=%{_sysconfdir}/%{vdsm_name}-reg \ + VDSMRUNDIR=%{_localstatedir}/run/%{vdsm_name} \ + VDSMLIBDIR=%{_localstatedir}/lib/%{vdsm_name} \ + SOSPLUGINDIR=%{py_sitedir}/sos/plugins \ + OVIRT_CONFIG_SETUP=%{py_sitedir}/ovirt_config_setup \ + install
# this is not commonplace, but we want /var/log/core to be a world-writable # dropbox for core dumps. install -dDm 1777 "%{buildroot}"%{_localstatedir}/log/core
-# hook vhostmd -make -C vdsm_hooks DESTDIR="%{buildroot}" \ - LIBEXECDIR=%{_libexecdir}/%{vdsm_name} \ - install - -#vdsm-cli -make -C vdsm_cli DESTDIR="%{buildroot}" \ - CONFDIR=%{_sysconfdir}/%{vdsm_name} \ - BINDIR=%{_bindir} \ - COMPDIR=%{_sysconfdir}/bash_completion.d \ - VDSMDIR=%{_datadir}/%{vdsm_name} \ - TRUSTSTORE=%{_sysconfdir}/pki/%{vdsm_name} \ - TARGET=%{_datadir}/%{vdsm_name} install - -#vdsm-reg -make -C vdsm_reg \ - DESTDIR="%{buildroot}" \ - ETC=%{_sysconfdir} \ - CONFDIR=%{_sysconfdir}/%{vdsm_reg} \ - LOGDIR=%{_localstatedir}/log/%{vdsm_reg} \ - VDSMREGDIR=%{_datadir}/%{vdsm_reg} \ - TRUSTSTORE=%{_sysconfdir}/pki/%{vdsm_name} \ - VDSMRUNDIR=%{_localstatedir}/run/%{vdsm_name} \ - OVIRT_CONFIG_SETUP=%{py_sitedir}/ovirt_config_setup \ - install - -#vdsm-bootstrap -make -C vds_bootstrap \ - DESTDIR="%{buildroot}" \ - TARGET=%{_datadir}/%{vdsm_bootstrap} install - - - %clean %{__rm} -rf %{buildroot}
diff --git a/vdsm_cli/Makefile b/vdsm_cli/Makefile index f135d27..287284b 100644 --- a/vdsm_cli/Makefile +++ b/vdsm_cli/Makefile @@ -8,7 +8,7 @@
INSTALL = install
-TARGET = /usr/share/vdsm +VDSMDIR = /usr/share/vdsm PYSRCS = vdsClient.py vdscli.py dumpStorageTable.py CONFDIR = /etc/vdsm BINDIR = bin @@ -24,8 +24,8 @@ fixpaths: sed -i "s:@TRUSTSTORE@:$(TRUSTSTORE):" vdscli.py
install: fixpaths - $(INSTALL) -Dd $(DESTDIR)/$(TARGET) - $(INSTALL) -Dm 644 $(PYSRCS) $(DESTDIR)/$(TARGET) + $(INSTALL) -Dd $(DESTDIR)/$(VDSMDIR) + $(INSTALL) -Dm 644 $(PYSRCS) $(DESTDIR)/$(VDSMDIR) $(INSTALL) -Dm 755 vdsClient $(DESTDIR)/$(BINDIR)/vdsClient $(INSTALL) -Dm 644 vdsClient.completion $(DESTDIR)$(COMPDIR)/vdsClient $(INSTALL) -Dm 644 vdsClient.1 $(DESTDIR)$(MANDIR)/man1/vdsClient.1 diff --git a/vdsm_hooks/Makefile b/vdsm_hooks/Makefile index 64dd604..9145f4a 100644 --- a/vdsm_hooks/Makefile +++ b/vdsm_hooks/Makefile @@ -26,5 +26,5 @@ install: $(INSTALL) -Dm 755 persist-vdsm-hooks $(DESTDIR)$(LIBEXECDIR)/persist-vdsm-hooks $(INSTALL) -Dm 755 unpersist-vdsm-hook $(DESTDIR)$(LIBEXECDIR)/unpersist-vdsm-hook (for hook in $(SUBDIRS); do \ - make -C $$hook $@ \ + make -C $$hook $@; \ done) diff --git a/vdsm_reg/Makefile b/vdsm_reg/Makefile index 5e1cdc0..fd92c48 100644 --- a/vdsm_reg/Makefile +++ b/vdsm_reg/Makefile @@ -2,8 +2,8 @@ INSTALL=install LN_S=ln -s VDSMREGDIR=/usr/share/vdsm-reg ETC=/etc -CONFDIR=$(ETC)/vdsm-reg -LOGDIR=/var/log/vdsm-reg +REGCONFDIR=$(ETC)/vdsm-reg +VDSMREGLOGDIR=/var/log/vdsm-reg VDSMRUNDIR=/var/run/vdsm MANDIR=/usr/share/man
@@ -17,13 +17,13 @@ fixpaths: sed -i "s:@VDSMRUNDIR@:$(VDSMRUNDIR):" vdsm-reg.conf
install: fixpaths - $(INSTALL) -Dd $(DESTDIR)$(CONFDIR) + $(INSTALL) -Dd $(DESTDIR)$(REGCONFDIR) $(INSTALL) -Dd $(DESTDIR)$(VDSMREGDIR) - $(INSTALL) -Dd $(DESTDIR)$(LOGDIR) + $(INSTALL) -Dd $(DESTDIR)$(VDSMREGLOGDIR) $(INSTALL) -Dd $(DESTDIR)$(OVIRT_CONFIG_SETUP) $(INSTALL) -Dm 755 vdsm-reg $(DESTDIR)$(ETC)/init.d/vdsm-reg - $(INSTALL) -Dm 644 logger.conf $(DESTDIR)$(CONFDIR)/logger.conf - $(INSTALL) -Dm 644 vdsm-reg.conf $(DESTDIR)$(CONFDIR)/vdsm-reg.conf + $(INSTALL) -Dm 644 logger.conf $(DESTDIR)$(REGCONFDIR)/logger.conf + $(INSTALL) -Dm 644 vdsm-reg.conf $(DESTDIR)$(REGCONFDIR)/vdsm-reg.conf $(INSTALL) -Dm 644 $(FILES) $(DESTDIR)$(VDSMREGDIR) $(INSTALL) -Dm 755 save-config $(DESTDIR)$(VDSMREGDIR) $(INSTALL) -Dm 755 config-rhev-manager $(DESTDIR)$(VDSMREGDIR) @@ -38,4 +38,4 @@ install: fixpaths $(INSTALL) -Dm 644 vdsm-reg-logrotate.conf $(DESTDIR)$(ETC)/logrotate.d/vdsm-reg $(INSTALL) -Dm 755 vdsm-reg-logrotate $(DESTDIR)$(ETC)/cron.hourly $(INSTALL) -Dm 644 vdsm-reg.8 $(DESTDIR)$(MANDIR)/man8/vdsm-reg.8 - $(INSTALL) -Dm 644 rhevm.py $(DESTDIR)$(OVIRT_CONFIG_SETUP) + $(INSTALL) -Dm 644 rhevm.py $(DESTDIR)$(OVIRT_CONFIG_SETUP)/rhevm.py
Saggi Mizrahi has posted comments on this change.
Change subject: [WIP] Add a recursive install target in Makefile ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.usersys.redhat.com/705 To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id579f1ebea23e4f89e9b3b7c0e0695164c505019 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Add a recursive install target in Makefile ......................................................................
Add a recursive install target in Makefile
Change-Id: Id579f1ebea23e4f89e9b3b7c0e0695164c505019 --- M Makefile M vds_bootstrap/Makefile M vdsm.spec.in M vdsm_cli/Makefile M vdsm_hooks/Makefile M vdsm_reg/Makefile 6 files changed, 34 insertions(+), 61 deletions(-)
Approvals: Dan Kenigsberg: Verified; Looks good to me, approved
-- To view, visit http://gerrit.usersys.redhat.com/705 To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Id579f1ebea23e4f89e9b3b7c0e0695164c505019 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
vdsm-patches@lists.fedorahosted.org