X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/projects.git/blobdiff_plain/c9b0630e680308a6389cdf758bb677d811a2d05b..5e8e2b2380cd6697b8634a765cdfd0b9e07c502c:/tools/make/makefile diff --git a/tools/make/makefile b/tools/make/makefile index 7fadac9..c4e9d3e 100644 --- a/tools/make/makefile +++ b/tools/make/makefile @@ -4,15 +4,16 @@ NOP = @echo "No operation for target $@" COMPILE = $(NOP) +COMPILE_TARGET = compile.stamp COPY = $(NOP) ZIP = zip -r $(project).zip $(project) DEB = fakeroot dpkg-deb --build $(project) +INSERT_BUILD = projects/tools/make/insert_build.sh #default parameters project = default SOURCES = COPY_PRE = -TEX = pdflatex # Load project specification include make.pre @@ -29,8 +30,8 @@ include make.pre # #----------------------------------------------------------------- -compile: compile.stamp - # compile ist fertig +compile: $(COMPILE_TARGET) + # compile is ready zip: $(project).zip # ZIP file ready @@ -38,10 +39,12 @@ zip: $(project).zip deb: $(project).deb # Debian package ready +version: $(COMPILE_TARGET) + $(INSERT_BUILD) $(COMPILE_TARGET) $(build) + #----------------------------------------------------------------- # compile steps #----------------------------------------------------------------- - compile.stamp: $(SOURCES) $(COMPILE) @touch compile.stamp @@ -51,13 +54,16 @@ compile.stamp: $(SOURCES) #----------------------------------------------------------------- copy.stamp: $(COPY_PRE) - $(COPY) $(project) + $(COPY) $(project) $(version) ${arch} @touch copy.stamp control.stamp: $(project).control mkdir -p $(project)/DEBIAN cp $(project).control $(project)/DEBIAN/control + if [ -f $(project).preinst ]; then cp $(project).preinst $(project)/DEBIAN/preinst; fi if [ -f $(project).postinst ]; then cp $(project).postinst $(project)/DEBIAN/postinst; fi + if [ -f $(project).prerm ]; then cp $(project).prerm $(project)/DEBIAN/prerm; fi + if [ -f $(project).postrm ]; then cp $(project).postrm $(project)/DEBIAN/postrm; fi @touch control.stamp $(project).zip: copy.stamp $(project) @@ -65,7 +71,7 @@ $(project).zip: copy.stamp $(project) $(project).deb: copy.stamp control.stamp $(DEB) - cp $(project).deb $(project)_$(version).deb + cp $(project).deb $(project)_$(version)$(_arch).deb #----------------------------------------------------------------- # utilities @@ -76,9 +82,9 @@ clean: if [ -e $(project) ]; then rm -rf $(project); fi #----------------------------------------------------------------- -# generische Regeln +# Build-Regeln #----------------------------------------------------------------- -%.pdf:%.tex - $(TEX) $< +%.pdf : %.tex $(SOURCES) + pdflatex $< && pdflatex $< + --include make.post