Commit e8d805e1 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

started work on makefiles

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libenv201008
SVN Revision: 3133
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent d4985a49
# this is <Makefile.buildingblocks>
# ----------------------------------------------------------------------------
# $Id: $
#
# Copyright (c) 2010 by Thomas Forbriger (BFO Schiltach)
#
# some building blocks for Makefiles
#
# The code in this file should be used by copy and paste operations to be
# added to individual Makefiles. Include operations are not appropriate, since
# this complicates reading dependencies across directories.
#
# REVISIONS and CHANGES
# 16/08/2010 V1.0 Thomas Forbriger
#
# ============================================================================
#
all:
flist: Makefile
echo $^ | tr ' ' '\n' | sort > $@
.PHONY: edit
edit: flist; vim $<
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist
# ============================================================================
ab=k
beb=ja
CHECKVAR=$(if $($(1)),,$(error error: missing variable $(1)))
$(call CHECKVAR,ab)
$(call CHECKVAR,beb)
REQUIRED=ab beb kl
kl=o
$(foreach var,$(REQUIRED),$(call CHECKVAR,$(var)))
# ----- END OF Makefile.buildingblocks -----
......@@ -14,8 +14,8 @@
all:
flist: Makefile $(wildcard Makefile.*)
echo $^ | tr ' ' '\n' | sort > $@
flist: Makefile $(wildcard Makefile.*) README
echo $^ | tr ' ' '\n' | sort | egrep -v '.bak$$'> $@
.PHONY: edit
edit: flist; vim $<
......
......@@ -12,7 +12,8 @@
# ============================================================================
#
all:
.PHONY: all package
all: package
flist: Makefile
echo $^ | tr ' ' '\n' | sort > $@
......@@ -25,9 +26,18 @@ clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist
CHECKVAR=:w
$(error error: file is in unfinished state)
$(if $(ab),,$(error nicht gesetzt: ab))
ifndef TF_PUBLICATIONPATH
package:
@echo TF_PUBLICATIONPATH is not defined!
@exit 2
else
VERSIONCODE=$(shell date +'%Y%m%d')
PACKAGE=thofdevel$(VERSIONCODE)
PUBLICATIONPATH=$(HOME)/public_html/download/software
PUBLICATIONPATH=$(TF_PUBLICATIONPATH)
TMPPATH=$(HOME)/tmp/$(PACKAGE)
package:
/bin/rm -rfv $(TMPPATH); mkdir -pv $(TMPPATH)
......@@ -47,5 +57,6 @@ package:
gzip --force -9 $(PUBLICATIONPATH)/$(PACKAGE).tar
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
bzip2 -f $(PUBLICATIONPATH)/$(PACKAGE).tar
endif
# ----- END OF Makefile.thofdevel -----
Makefiles zum erzeugen von Paketen
==================================
This scheme is no longer in use, except for package thofdevel. Packages now
are directly built within Makefiles in the source code directories.
This scheme is no longer in use, except for package thofdevel. Packages now
are directly built within Makefiles in the source code directories.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment