Merge branch 'master' of http://wagnertech.de/git/projects
[projects.git] / tools / make / makefile
index 7fadac9..b2f4944 100644 (file)
@@ -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,7 +30,7 @@ include make.pre
 #
 #-----------------------------------------------------------------
 
-compile: compile.stamp
+compile: $(COMPILE_TARGET)
        # compile ist fertig
 
 zip: $(project).zip
@@ -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
@@ -65,7 +68,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 +79,8 @@ clean:
        if [ -e $(project) ]; then rm -rf $(project); fi
 
 #-----------------------------------------------------------------
-# generische Regeln
+# Build-Regeln
 #-----------------------------------------------------------------
-%.pdf:%.tex
-       $(TEX) $<
+%.pdf : %.tex $(SOURCES)
+       pdflatex $< && pdflatex $<
 
--include make.post