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:36:48 -0400 |
commit | 41d201104656cdb4f4be1c8c2ed6fd1f60682d4e (patch) | |
tree | 0a9ed995d40afd82d05b0ebb51576d50d523e2ae | |
parent | 936a4754d2f20f4d0ed41ccb85e5d17011ec82d2 (diff) | |
download | mdadm-41d201104656cdb4f4be1c8c2ed6fd1f60682d4e.tar.gz mdadm-41d201104656cdb4f4be1c8c2ed6fd1f60682d4e.tar.xz mdadm-41d201104656cdb4f4be1c8c2ed6fd1f60682d4e.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 @@ +*/ |