From 4506a3db805983b8661f5de839283867342f65b5 Mon Sep 17 00:00:00 2001 From: Doug Ledford Date: Thu, 24 Jul 2008 12:31:46 -0400 Subject: Put in our generic distropkg/Makefile and create the distropkg directory structure Signed-off-by: Doug Ledford --- distropkg/Makefile | 29 +++++++++++++++++++++++++++++ distropkg/rpm/BUILD/.gitignore | 1 + distropkg/rpm/MOCK/.gitignore | 1 + distropkg/rpm/RPMS/.gitignore | 1 + distropkg/rpm/SOURCES/.gitignore | 1 + distropkg/rpm/SRPMS/.gitignore | 1 + 6 files changed, 34 insertions(+) create mode 100644 distropkg/Makefile create mode 100644 distropkg/rpm/BUILD/.gitignore create mode 100644 distropkg/rpm/MOCK/.gitignore create mode 100644 distropkg/rpm/RPMS/.gitignore create mode 100644 distropkg/rpm/SOURCES/.gitignore create mode 100644 distropkg/rpm/SRPMS/.gitignore 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 @@ +*/ -- cgit