utilitaires |
13/03/2012 |
Réalise un fichier makefile en mode batch.
Ce script necessite le programme wasfile des outils wbat32 afin de pouvoir comparer la date entre deux fichiers.
@echo off ::---------------------------------- :: makefile ::---------------------------------- :: teste si le fichier n'existe pas et réalise la règle if not exist test.html call :test :: si le fichier source a été modifié réalise la règle wasfile test.txt modified after test.html if %errorlevel%==0 call :test ::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if not exist prog.html call :prog wasfile prog.txt modified after prog.html if %errorlevel%==0 call :prog goto :eof ::---------------------------------- :: règles ::---------------------------------- :test echo make test type test.txt > test.html goto :eof :prog echo make prog type prog.txt > prog.html goto :eof