source: rtems/testsuites/libtests/tar02/Makefile.am @ 4000836c

5
Last change on this file since 4000836c was 4000836c, checked in by Sebastian Huber <sebastian.huber@…>, on 06/13/17 at 11:01:03

tests: Fix build dependencies

See also:

https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html

  • Property mode set to 100644
File size: 1.5 KB
Line 
1if TARTESTS
2rtems_tests_PROGRAMS = tar02
3tar02_SOURCES = init.c ../../psxtests/psxfile01/test_cat.c \
4  initial_filesystem_tar.c initial_filesystem_tar.h
5
6BUILT_SOURCES = initial_filesystem_tar.c initial_filesystem_tar.h
7
8dist_rtems_tests_DATA = tar02.scn
9dist_rtems_tests_DATA += tar02.doc
10endif
11
12include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
13include $(top_srcdir)/../automake/compile.am
14include $(top_srcdir)/../automake/leaf.am
15
16if TARTESTS
17AM_CPPFLAGS += -I$(top_srcdir)/include
18AM_CPPFLAGS += -I$(top_srcdir)/../support/include
19AM_CPPFLAGS += -I$(top_srcdir)/../psxtests/include
20
21LINK_OBJS = $(tar02_OBJECTS)
22LINK_LIBS = $(tar02_LDLIBS)
23
24tar02$(EXEEXT): $(tar02_OBJECTS) $(tar02_DEPENDENCIES)
25        @rm -f tar02$(EXEEXT)
26        $(make-exe)
27
28init.$(OBJEXT): initial_filesystem_tar.h
29
30initial_filesystem_tar.c: initial_filesystem.tar
31        $(BIN2C) -C initial_filesystem.tar initial_filesystem_tar
32CLEANFILES += initial_filesystem_tar.c
33
34initial_filesystem_tar.h: initial_filesystem.tar
35        $(BIN2C) -H initial_filesystem.tar initial_filesystem_tar
36CLEANFILES += initial_filesystem_tar.h
37
38initial_filesystem.tar:
39        rm -rf initial_fs
40        $(MKDIR_P) initial_fs/home
41        (echo "This is a test of loading an RTEMS filesystem from an" ; \
42        echo "initial tar image.") >initial_fs/home/test_file
43        (cd initial_fs; \
44        $(LN_S) home/test_file symlink; \
45        $(PAX) -w -f ../initial_filesystem.tar home symlink)
46CLEANFILES += initial_filesystem.tar
47endif TARTESTS
48
49clean-local:
50        -rm -rf initial_fs
51
52include $(top_srcdir)/../automake/local.am
Note: See TracBrowser for help on using the repository browser.