diff options
author | Doug Ledford <dledford@redhat.com> | 2008-07-24 12:31:46 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2008-07-24 12:35:44 -0400 |
commit | 60a321690dad5b106151fff8468019489732dbc5 (patch) | |
tree | e830a415e5f1e68df9d28140e70e0decdaaa5744 | |
parent | 907fce2b9d545ad1a41b1728bd6c90877520c06c (diff) | |
download | mdadm-60a321690dad5b106151fff8468019489732dbc5.tar.gz mdadm-60a321690dad5b106151fff8468019489732dbc5.tar.xz mdadm-60a321690dad5b106151fff8468019489732dbc5.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/Makefile | 29 | ||||
-rw-r--r-- | distropkg/rpm/BUILD/.gitignore | 1 | ||||
-rw-r--r-- | distropkg/rpm/MOCK/.gitignore | 1 | ||||
-rw-r--r-- | distropkg/rpm/RPMS/.gitignore | 1 | ||||
-rw-r--r-- | distropkg/rpm/SOURCES/.gitignore | 1 | ||||
-rw-r--r-- | distropkg/rpm/SRPMS/.gitignore | 1 |
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 @@ +*/ |