automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BUILT_SOURCES called on `make dist` even if the built sources should not


From: Jerry Lundström
Subject: BUILT_SOURCES called on `make dist` even if the built sources should not be included in the dist
Date: Tue, 17 Sep 2019 16:32:02 +0200
User-agent: Mutt

Hi,

This problem seems to have been introduced in v1.16 with:

- "./configure && make dist" no longer fails when a distributed file
depends on one from BUILT_SOURCES.

And what I can see in the Makefile output is that $(BUILT_SOURCES) has
been added to distdir.

I can't really see how this change got approved, isn't the point of
BUILT_SOURCES to be sources built when building!?  Including them into
distributions seems wrong.

How can I build sources, which should not be distributed, before normal
targets without getting this call on `make dist`?


Here is an example:

```
bin_PROGRAMS = test

EXTRA_DIST = ext/TEST

test_SOURCES = main.c
test_LDADD = ext/built.o

BUILT_SOURCES = ext/built.o

ext/built.o:
        echo "int sdkjfhskjhfskjd(void){ return 0; }" > ext/built.c
        gcc -c ext/built.c -o ext/built.o

CLEANFILES = ext/built.c ext/built.o
```

And the `make dist` output:

```
$ make dist
make  dist-gzip am__post_remove_distdir='@:'
make[1]: Entering directory '/home/buildbot/tmp'
echo "int sdkjfhskjhfskjd(void){ return 0; }" > ext/built.c
gcc -c ext/built.c -o ext/built.o
make  distdir-am
make[2]: Entering directory '/home/buildbot/tmp'
if test -d "test-1.0.0"; then find "test-1.0.0" -type d ! -perm -200
-exec chmod u+w {} ';' && rm -rf "test-1.0.0" || { sleep 5 && rm -rf
"test-1.0.0"; }; else :; fi
test -d "test-1.0.0" || mkdir "test-1.0.0"
test -n "" \
|| find "test-1.0.0" -type d ! -perm -755 \
        -exec chmod u+rwx,go+rx {} \; -o \
  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
  ! -type d ! -perm -444 -exec /bin/bash /home/buildbot/tmp/install-sh
-c -m a+r {} {} \; \
|| chmod -R a+r "test-1.0.0"
make[2]: Leaving directory '/home/buildbot/tmp'
tardir=test-1.0.0 && ${TAR-tar} chof - "$tardir" | eval GZIP= gzip
--best -c >test-1.0.0.tar.gz
make[1]: Leaving directory '/home/buildbot/tmp'
if test -d "test-1.0.0"; then find "test-1.0.0" -type d ! -perm -200
-exec chmod u+w {} ';' && rm -rf "test-1.0.0" || { sleep 5 && rm -rf
"test-1.0.0"; }; else :; fi
```

Cheers,
Jerry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]