Blame 0035-Makefile-fixed-dracut-install-make-target.patch

Harald Hoyer 12f6cc
From 24ba78cb77b3a8ce50902da1795a2d3cdac11691 Mon Sep 17 00:00:00 2001
Harald Hoyer 12f6cc
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 12f6cc
Date: Thu, 26 Jul 2012 11:50:50 +0200
Harald Hoyer 12f6cc
Subject: [PATCH] Makefile: fixed dracut-install make target
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
---
Harald Hoyer 12f6cc
 Makefile    | 27 +++++++++++++++++----------
Harald Hoyer 12f6cc
 dracut.spec |  1 +
Harald Hoyer 12f6cc
 2 files changed, 18 insertions(+), 10 deletions(-)
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
diff --git a/Makefile b/Makefile
Harald Hoyer 12f6cc
index d013cbc..0dbc6eb 100644
Harald Hoyer 12f6cc
--- a/Makefile
Harald Hoyer 12f6cc
+++ b/Makefile
Harald Hoyer 12f6cc
@@ -33,17 +33,24 @@ manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
 .PHONY: install clean archive rpm testimage test all check AUTHORS doc
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
-DRACUT_INSTALL_BIN = install/dracut-install
Harald Hoyer 12f6cc
-
Harald Hoyer 12f6cc
-DRACUT_INSTALL_OBJECTS = \
Harald Hoyer 12f6cc
-        install/dracut-install.o \
Harald Hoyer 12f6cc
-        install/hashmap.o\
Harald Hoyer 12f6cc
-        install/log.o \
Harald Hoyer 12f6cc
-        install/util.o
Harald Hoyer 12f6cc
+DRACUT_INSTALL_BIN = dracut-install
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
 all: syncheck dracut-version.sh $(DRACUT_INSTALL_BIN)
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
-$(DRACUT_INSTALL_BIN): $(DRACUT_INSTALL_OBJECTS)
Harald Hoyer 12f6cc
+DRACUT_INSTALL_SOURCE = \
Harald Hoyer 12f6cc
+        install/dracut-install.c \
Harald Hoyer 12f6cc
+        install/hashmap.c\
Harald Hoyer 12f6cc
+        install/log.c \
Harald Hoyer 12f6cc
+        install/util.c
Harald Hoyer 12f6cc
+
Harald Hoyer 12f6cc
+DRACUT_INSTALL_HEADER = \
Harald Hoyer 12f6cc
+        install/hashmap.h \
Harald Hoyer 12f6cc
+        install/log.h \
Harald Hoyer 12f6cc
+        install/macro.h \
Harald Hoyer 12f6cc
+        install/util.h
Harald Hoyer 12f6cc
+
Harald Hoyer 12f6cc
+$(DRACUT_INSTALL_BIN): $(DRACUT_INSTALL_SOURCE) $(DRACUT_INSTALL_HEADER)
Harald Hoyer 12f6cc
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $(DRACUT_INSTALL_BIN) $(DRACUT_INSTALL_SOURCE)
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
 indent:
Harald Hoyer 12f6cc
 	indent -i8 -nut -br -linux -l120 install/dracut-install.c
Harald Hoyer 12f6cc
@@ -95,7 +102,7 @@ install: doc dracut-version.sh
Harald Hoyer 12f6cc
 		ln -s ../dracut-shutdown.service \
Harald Hoyer 12f6cc
 		$(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \
Harald Hoyer 12f6cc
 	fi
Harald Hoyer 12f6cc
-	if [ -x $(DRACUT_INSTALL_BIN) ]; then \
Harald Hoyer 12f6cc
+	if [ -f $(DRACUT_INSTALL_BIN) ]; then \
Harald Hoyer 12f6cc
 		install -m 0755 $(DRACUT_INSTALL_BIN) $(DESTDIR)$(pkglibdir)/dracut-install; \
Harald Hoyer 12f6cc
 	fi
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
@@ -108,7 +115,7 @@ clean:
Harald Hoyer 12f6cc
 	$(RM) */*/*~
Harald Hoyer 12f6cc
 	$(RM) test-*.img
Harald Hoyer 12f6cc
 	$(RM) dracut-*.rpm dracut-*.tar.bz2
Harald Hoyer 12f6cc
-	$(RM) $(DRACUT_INSTALL_BIN) $(DRACUT_INSTALL_OBJECTS)
Harald Hoyer 12f6cc
+	$(RM) $(DRACUT_INSTALL_BIN) 
Harald Hoyer 12f6cc
 	$(RM) $(manpages) dracut.html
Harald Hoyer 12f6cc
 	$(MAKE) -C test clean
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
diff --git a/dracut.spec b/dracut.spec
Harald Hoyer 12f6cc
index 0d4062f..d960506 100644
Harald Hoyer 12f6cc
--- a/dracut.spec
Harald Hoyer 12f6cc
+++ b/dracut.spec
Harald Hoyer 12f6cc
@@ -286,6 +286,7 @@ rm -rf $RPM_BUILD_ROOT
Harald Hoyer 12f6cc
 %{dracutlibdir}/modules.d/90multipath
Harald Hoyer 12f6cc
 %{dracutlibdir}/modules.d/90qemu
Harald Hoyer 12f6cc
 %{dracutlibdir}/modules.d/91crypt-gpg
Harald Hoyer 12f6cc
+%{dracutlibdir}/modules.d/91crypt-loop
Harald Hoyer 12f6cc
 %{dracutlibdir}/modules.d/95debug
Harald Hoyer 12f6cc
 %{dracutlibdir}/modules.d/95resume
Harald Hoyer 12f6cc
 %{dracutlibdir}/modules.d/95rootfs-block