From ebddb7d986a815d1cb2839e86cdf6c741c2ff33d Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Fri, 13 Oct 2017 23:47:33 +0200 Subject: [PATCH] rework the site repo layout again for fun (and easier building) --- .gitignore | 1 + Makefile | 14 +++++++++----- README.md | 6 +++--- {sites => config}/defaults.erb | 0 {sites => config}/ffhh-sued.erb | 0 {sites => config}/ffhh.erb | 0 6 files changed, 13 insertions(+), 8 deletions(-) rename {sites => config}/defaults.erb (100%) rename {sites => config}/ffhh-sued.erb (100%) rename {sites => config}/ffhh.erb (100%) diff --git a/.gitignore b/.gitignore index 0acb982..e2d3142 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /site.conf /site.mk /modules +sites/ diff --git a/Makefile b/Makefile index 7b8676b..892c020 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,20 @@ -SITE ?= ffhh +sites: sites/ffhh sites/ffhh-sued -all: clean site.mk site.conf modules +sites/%: config/%.erb + mkdir -p $@ + cd $@ && $(MAKE) -f ../../Makefile site SITE=$(@F) + +site: clean site.mk site.conf modules .PHONY: clean clean: rm -f site.mk site.conf modules modules: - erb -T- sites/defaults.erb sites/${SITE}.erb template/$@.erb >$@ + erb -T- ../../config/defaults.erb ../../config/$(SITE).erb ../../template/$@.erb >$@ site.conf: - erb -T- sites/defaults.erb sites/${SITE}.erb template/$@.erb >$@ + erb -T- ../../config/defaults.erb ../../config/$(SITE).erb ../../template/$@.erb >$@ site.mk: - erb -T- sites/defaults.erb sites/${SITE}.erb template/$@.erb >$@ + erb -T- ../../config/defaults.erb ../../config/$(SITE).erb ../../template/$@.erb >$@ diff --git a/README.md b/README.md index 342364e..8952b85 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ cd gluon git clone https://github.com/freifunkhamburg/site-ffhh.git site # Get the Freifunk Hamburg site repository cd site - make SITE=ffhh + make cd .. - make update # Get other repositories used by Gluon - make # Build Gluon + make update # Get other repositories used by Gluon + make GLUON_SITEDIR=site/sites/ffhh # Build Gluon Please see [the official Gluon repository](https://github.com/freifunk-gluon/gluon) for an in-depth explanation of the build process. diff --git a/sites/defaults.erb b/config/defaults.erb similarity index 100% rename from sites/defaults.erb rename to config/defaults.erb diff --git a/sites/ffhh-sued.erb b/config/ffhh-sued.erb similarity index 100% rename from sites/ffhh-sued.erb rename to config/ffhh-sued.erb diff --git a/sites/ffhh.erb b/config/ffhh.erb similarity index 100% rename from sites/ffhh.erb rename to config/ffhh.erb