@B instead of touching derived lex files, now the source file date is reset to 1970. This allows the detection of new files

This commit is contained in:
bebbo
2017-02-18 20:17:10 +01:00
parent 759644f061
commit a6370fd76f
2 changed files with 12 additions and 6 deletions
+6 -2
View File
@@ -6,7 +6,9 @@ from logging import debug, info, error
from os import path
import contextlib
from distutils import spawn, sysconfig
import os, glob
import os
import glob
import datetime
import shutil
import site
import subprocess
@@ -369,7 +371,9 @@ def recipe(name, nargs=0):
mmax = mt
if mmax > os.stat(stamp).st_mtime:
mstamp = path.join('{stamps}', mtarget + '-make*')
info('removing stamp for "%s"', mstamp)
info('removing stamp for "%s"\n\tcaused by "%s" %s'
'\n\tstamp is "%s" %s', mstamp, mfile, datetime.datetime.fromtimestamp(mmax),
stamp, datetime.datetime.fromtimestamp(os.stat(stamp).st_mtime))
for f in glob.glob(mstamp):
remove(f)
+6 -4
View File
@@ -6,6 +6,7 @@ from fnmatch import fnmatch
from glob import glob
from logging import info
from os import environ
import os
import argparse
import logging
import platform
@@ -210,10 +211,11 @@ def touch_genfiles(dst):
"""
for name in find(dst, include=['*.l', '*.y']):
basename = path.splitext(name)[0]
for c_file in glob(basename + '.c'):
touch(c_file)
for h_file in glob(basename + '.h'):
touch(h_file)
os.utime(name, (1, 1))
# for c_file in glob(basename + '.c'):
# touch(c_file)
# for h_file in glob(basename + '.h'):
# touch(h_file)
def download():