Not sure what your constraints are. Easy answer is to make sure some innocuous file is always listed in the includesfile.
See code below for a possible solution where you load the contents of the text file (the includesfile) into a property using loadfile task where it strips linebreaks in case any exist in "empty" file. The tar target can check to see if property set (empty file resulted in property not being set for me). This doesn't build a tar if file is empty, but if you need to do something different when the file is empty you can use unless
test that's similar to the if test.
Output :
C:\>ant (file has something in it)
Buildfile: build.xml
cleanLast:
[delete] Deleting: C:\_Work\java\src\antcompile\tarball.tar
fileToProp:
[echo] File contents is 'README'
tarball:
[tar] Building tar: C:\_Work\java\src\antcompile\tarball.tar
BUILD SUCCESSFUL
Total time: 1 second
C:\>ant (empty file)
Buildfile: build.xml
cleanLast:
[delete] Deleting: C:\_Work\java\src\antcompile\tarball.tar
fileToProp:
[echo] File contents is '${tar.file.list}'
tarball:
BUILD SUCCESSFUL
Total time: 0 seconds