summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2008-07-24 12:31:46 -0400
committerDoug Ledford <dledford@redhat.com>2008-07-24 12:37:13 -0400
commit4506a3db805983b8661f5de839283867342f65b5 (patch)
treee830a415e5f1e68df9d28140e70e0decdaaa5744
parent3191c66c9dd2b4b1ec4b3db61a1924631bef1c21 (diff)
downloadmdadm-4506a3db805983b8661f5de839283867342f65b5.tar.gz
mdadm-4506a3db805983b8661f5de839283867342f65b5.tar.xz
mdadm-4506a3db805983b8661f5de839283867342f65b5.zip
Put in our generic distropkg/Makefile and create the distropkg directory structure
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--distropkg/Makefile29
-rw-r--r--distropkg/rpm/BUILD/.gitignore1
-rw-r--r--distropkg/rpm/MOCK/.gitignore1
-rw-r--r--distropkg/rpm/RPMS/.gitignore1
-rw-r--r--distropkg/rpm/SOURCES/.gitignore1
-rw-r--r--distropkg/rpm/SRPMS/.gitignore1
6 files changed, 34 insertions, 0 deletions
diff --git a/distropkg/Makefile b/distropkg/Makefile
new file mode 100644
index 0000000..5c8743e
--- /dev/null
+++ b/distropkg/Makefile
@@ -0,0 +1,29 @@
+# Makefile stub to include common/Makefile.common and distropkg/Makefile.local
+# We assume that the package name and our current directory name match
+NAME := $(shell basename `pwd`)
+SPECFILE = distropkg/$(NAME).spec
+
+# Even though we are in distropkg/Makefile, we are included in the toplevel
+# Makefile, so the location of common, as far as we are concerned, is relative
+# to the toplevel Makefile
+define find-makefile-common
+for d in ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; if [ -d $$d/.git -a -w $$/Makefile.common ] ; then git pull -q $$d ; fi; echo "$$d/Makefile.common" ; break ; fi ; done
+endef
+
+MAKEFILE_COMMON := $(shell $(find-makefile-common))
+
+ifeq ($(MAKEFILE_COMMON),)
+# attempt a checkout
+define checkout-makefile-common
+test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { test -d .git && { git clone `git config --get remote.origin.url | sed -e 's/$(NAME)/common'` ../common; echo "../common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } } >&2
+endef
+
+MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
+endif
+
+include $(MAKEFILE_COMMON)
+
+MAKEFILE_LOCAL := $(wildcard distropkg/Makefile.local)
+ifdef MAKEFILE_LOCAL
+include $(MAKEFILE_LOCAL)
+endif
diff --git a/distropkg/rpm/BUILD/.gitignore b/distropkg/rpm/BUILD/.gitignore
new file mode 100644
index 0000000..355164c
--- /dev/null
+++ b/distropkg/rpm/BUILD/.gitignore
@@ -0,0 +1 @@
+*/
diff --git a/distropkg/rpm/MOCK/.gitignore b/distropkg/rpm/MOCK/.gitignore
new file mode 100644
index 0000000..355164c
--- /dev/null
+++ b/distropkg/rpm/MOCK/.gitignore
@@ -0,0 +1 @@
+*/
diff --git a/distropkg/rpm/RPMS/.gitignore b/distropkg/rpm/RPMS/.gitignore
new file mode 100644
index 0000000..355164c
--- /dev/null
+++ b/distropkg/rpm/RPMS/.gitignore
@@ -0,0 +1 @@
+*/
diff --git a/distropkg/rpm/SOURCES/.gitignore b/distropkg/rpm/SOURCES/.gitignore
new file mode 100644
index 0000000..355164c
--- /dev/null
+++ b/distropkg/rpm/SOURCES/.gitignore
@@ -0,0 +1 @@
+*/
diff --git a/distropkg/rpm/SRPMS/.gitignore b/distropkg/rpm/SRPMS/.gitignore
new file mode 100644
index 0000000..355164c
--- /dev/null
+++ b/distropkg/rpm/SRPMS/.gitignore
@@ -0,0 +1 @@
+*/