- (unless (zerop (run-shell-command
- "cd ~A; make"
- (namestring (merge-pathnames
- (make-pathname
- :name nil
- :type nil
- :directory '(:relative "uffi"))
- (make-pathname
- :directory *asd-file-dir*)))))
- (error 'operation-error :component c :operation o)))
+ (unless (operation-done-p o c)
+ #-(or win32 win64 windows mswindows)
+ (unless (zerop (run-shell-command
+ #-freebsd "cd ~A; make"
+ #+freebsd "cd ~A; gmake"
+ (namestring *library-file-dir*)))
+ (error 'operation-error :component c :operation o))))
+
+(defmethod operation-done-p ((o compile-op) (c clsql-mysql-source-file))
+ (or (and (probe-file #p"/usr/lib/clsql/clsql_mysql.so") t)
+ (let ((lib (make-pathname :defaults (component-pathname c)
+ :type (uffi:default-foreign-library-type))))
+ (and (probe-file lib) (probe-file (component-pathname c))
+ (> (file-write-date lib) (file-write-date (component-pathname c)))))))