Skip to content

Commit

Permalink
Test compilation before uploading always
Browse files Browse the repository at this point in the history
  • Loading branch information
michaliskambi committed Jun 20, 2016
1 parent 446df88 commit 8b73b92
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -21,8 +21,12 @@ $(NAME).pdf: $(NAME).xml
clean:
rm -f $(ALL_OUTPUT)

.PHONY: test
test:
$(MAKE) -C code-samples/ clean all

.PHONY: upload
upload: all
upload: test clean all
scp modern_pascal_introduction.html modern_pascal_introduction.pdf michalis@michalis.ii.uni.wroc.pl:/home/michalis/public_html/modern_pascal_introduction/
firefox http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html
firefox http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.pdf
11 changes: 11 additions & 0 deletions code-samples/Makefile
@@ -0,0 +1,11 @@
PROGRAM_SOURCES:=$(wildcard *.lpr)
PROGRAM_BINARIES:=$(PROGRAM_SOURCES:.lpr=)

.PHONY: all
all:
fpc *.pas
$(foreach PROGRAM_NAME,$(PROGRAM_SOURCES),fpc $(PROGRAM_NAME) && ) true

.PHONY: clean
clean:
rm -Rf *.o *.ppu $(PROGRAM_BINARIES)

0 comments on commit 8b73b92

Please sign in to comment.