test/Makefile.am
author J. Ali Harlow <ali@juiblex.co.uk>
Sat Oct 04 18:12:58 2014 +0100 (2014-10-04)
changeset 454 56ff755c268c
parent 394 afe520f454bd
child 475 008c75a5e08d
permissions -rw-r--r--
Only export symbols starting with razor_ in dynamic library.

Apart from being good practice to avoid clashes with higher-level
libraries and the application, this also fixes an obscure bug: The
gnulib library is used both by librazor (the dynamic library) and
by razor (the executable). In doing so, we want to have two separate
copies of the library despite the code duplication this involves.
Without the explicit limit to export only razor_ symbols, the razor
executable under mingw64 was picking up the getopt_long function
from librazor and the optind variable from libgnu which meant that
it did not see optind changing. Hiding librazor's copy of getopt
causes the linker to find libgnu's copy and everything works.

Note that under mingw librazor-#.dll still contains undocumented
(private) razor_ symbols but these will do no harm as long as nobody
tries to use them.
ali@351
     1
## Process this file with automake to produce Makefile.in
ali@351
     2
ali@394
     3
check_SCRIPTS = relocate named-root remove update details
ali@352
     4
if HAVE_LUA
ali@387
     5
  check_SCRIPTS += lua mult-install
ali@352
     6
endif
ali@367
     7
check_SCRIPTS += order
ali@351
     8
ali@351
     9
relocate:	relocate.sh primary.xml.gz
ali@351
    10
	cp $(srcdir)/relocate.sh relocate
ali@351
    11
ali@359
    12
named-root:	named-root.sh primary.xml.gz
ali@359
    13
	cp $(srcdir)/named-root.sh named-root
ali@359
    14
ali@363
    15
remove:	remove.sh primary.xml.gz
ali@363
    16
	cp $(srcdir)/remove.sh remove
ali@363
    17
ali@382
    18
update:	update.sh base/repodata/primary.xml.gz updates/repodata/primary.xml.gz
ali@382
    19
	cp $(srcdir)/update.sh update
ali@382
    20
ali@394
    21
details:	details.sh primary.xml.gz
ali@394
    22
	cp $(srcdir)/details.sh details
ali@394
    23
ali@367
    24
order:	order.sh primary.xml.gz
ali@367
    25
	cp $(srcdir)/order.sh order
ali@367
    26
ali@352
    27
lua:	lua.sh primary.xml.gz
ali@352
    28
	cp $(srcdir)/lua.sh lua
ali@352
    29
ali@387
    30
mult-install:	mult-install.sh primary.xml.gz
ali@387
    31
	cp $(srcdir)/mult-install.sh mult-install
ali@387
    32
ali@382
    33
base/repodata/primary.xml.gz:	zsh.spec zsh2.spec zip.spec zap.spec \
ali@382
    34
		filesystem.spec Makefile
ali@382
    35
	rm -rf rpmbuild base
ali@351
    36
	mkdir -p rpmbuild/BUILD rpmbuild/RPMS
ali@351
    37
	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/zap.spec
ali@382
    38
	rpmbuild --define "_topdir `pwd`/rpmbuild" --define "_version 1" \
ali@382
    39
	  -bb $(srcdir)/zip.spec
ali@351
    40
	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/zsh.spec
ali@363
    41
	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/zsh2.spec
ali@352
    42
	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/filesystem.spec
ali@382
    43
	mkdir -p base/rpms
ali@382
    44
	mv rpmbuild/RPMS/noarch/*.rpm base/rpms
ali@351
    45
	rm -rf rpmbuild
ali@444
    46
	createrepo --simple-md-filenames -o base base/rpms
ali@382
    47
ali@382
    48
updates/repodata/primary.xml.gz:	zip.spec Makefile
ali@382
    49
	rm -rf rpmbuild updates
ali@382
    50
	mkdir -p rpmbuild/BUILD rpmbuild/RPMS
ali@382
    51
	rpmbuild --define "_topdir `pwd`/rpmbuild" --define "_version 2" \
ali@382
    52
	  -bb $(srcdir)/zip.spec
ali@382
    53
	mkdir -p updates/rpms
ali@382
    54
	mv rpmbuild/RPMS/noarch/*.rpm updates/rpms
ali@382
    55
	rm -rf rpmbuild
ali@444
    56
	createrepo --simple-md-filenames -o updates updates/rpms
ali@382
    57
ali@382
    58
primary.xml.gz:	base/repodata/primary.xml.gz
ali@382
    59
	cp base/repodata/primary.xml.gz base/repodata/filelists.xml.gz .
ali@382
    60
	rm -rf rpms
ali@382
    61
	ln -s base/rpms .
ali@351
    62
ali@351
    63
TESTS = $(check_SCRIPTS)
ali@351
    64
ali@351
    65
EXTRA_DIST = 			\
ali@351
    66
	zap.spec		\
ali@351
    67
	zip.spec		\
ali@351
    68
	zsh.spec		\
ali@363
    69
	zsh2.spec		\
ali@352
    70
	filesystem.spec		\
ali@367
    71
	order.sh		\
ali@387
    72
	mult-install.sh		\
ali@352
    73
	lua.sh			\
ali@363
    74
	remove.sh		\
ali@382
    75
	update.sh		\
ali@394
    76
	details.sh		\
ali@394
    77
	details.ref		\
ali@359
    78
	named-root.sh		\
ali@351
    79
	relocate.sh
ali@351
    80
ali@378
    81
MOSTLYCLEANFILES =		\
ali@378
    82
	primary.xml.gz		\
ali@378
    83
	filelists.xml.gz	\
ali@378
    84
	$(check_SCRIPTS)	\
ali@394
    85
	details.out		\
ali@378
    86
	rawhide.rzdb
ali@378
    87
ali@351
    88
clean-local :
ali@351
    89
	rm -f *~
ali@382
    90
	rm -rf repodata rpms base updates