source: rtems/testsuites/libtests/tar01/Makefile.am @ b0f08c8

5
Last change on this file since b0f08c8 was b0f08c8, checked in by Chris Johns <chrisj@…>, on 08/01/16 at 01:02:13

libmisc/untar: Set the perms to the value in the tar file.

This patch parses the mode field in the tar header and sets the
directory or file to the mode value in the header.

Closes #2768.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1if TARTESTS
2rtems_tests_PROGRAMS = tar01
3tar01_SOURCES =
4tar01_SOURCES += init.c
5tar01_SOURCES += ../../psxtests/psxfile01/test_cat.c
6tar01_SOURCES += initial_filesystem_tar.c
7tar01_SOURCES += initial_filesystem_tar.h
8tar01_SOURCES += initial_filesystem_tar_gz.c
9tar01_SOURCES += initial_filesystem_tar_gz.h
10
11tar01_LDADD = -lrtemscpu -lz
12
13BUILT_SOURCES =
14BUILT_SOURCES += initial_filesystem_tar.c
15BUILT_SOURCES += initial_filesystem_tar.h
16BUILT_SOURCES += initial_filesystem_tar_gz.c
17BUILT_SOURCES += initial_filesystem_tar_gz.h
18
19dist_rtems_tests_DATA = tar01.scn
20dist_rtems_tests_DATA += tar01.doc
21endif TARTESTS
22
23include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
24include $(top_srcdir)/../automake/compile.am
25include $(top_srcdir)/../automake/leaf.am
26
27if TARTESTS
28AM_CPPFLAGS += -I$(top_srcdir)/include
29AM_CPPFLAGS += -I$(top_srcdir)/../support/include
30AM_CPPFLAGS += -I$(top_srcdir)/../psxtests/include
31
32LINK_OBJS = $(tar01_OBJECTS) $(tar01_LDADD)
33LINK_LIBS = $(tar01_LDLIBS)
34
35tar01$(EXEEXT): $(tar01_OBJECTS) $(tar01_DEPENDENCIES)
36        @rm -f tar01$(EXEEXT)
37        $(make-exe)
38
39initial_filesystem_tar.c: initial_filesystem.tar
40        $(BIN2C) -C initial_filesystem.tar initial_filesystem_tar
41CLEANFILES += initial_filesystem_tar.c
42
43initial_filesystem_tar.h: initial_filesystem.tar
44        $(BIN2C) -H initial_filesystem.tar initial_filesystem_tar
45CLEANFILES += initial_filesystem_tar.h
46
47initial_filesystem_tar_gz.c: initial_filesystem.tar.gz
48        $(BIN2C) -C initial_filesystem.tar.gz initial_filesystem_tar_gz
49CLEANFILES += initial_filesystem_tar_gz.h
50
51initial_filesystem_tar_gz.h: initial_filesystem.tar.gz
52        $(BIN2C) -H initial_filesystem.tar.gz initial_filesystem_tar_gz
53CLEANFILES += initial_filesystem_tar_gz.h
54
55initial_filesystem.tar:
56        rm -rf initial_fs
57        $(MKDIR_P) initial_fs/home
58        (echo "This is a test of loading an RTEMS filesystem from an" ; \
59        echo "initial tar image.") >initial_fs/home/test_file
60        (echo "#! joel" ; \
61        echo "ls -las /dev") >initial_fs/home/test_script
62        chmod +x initial_fs/home/test_script
63        (cd initial_fs; \
64        $(LN_S) home/test_file symlink; \
65        $(PAX) -w -f ../initial_filesystem.tar home symlink)
66CLEANFILES += initial_filesystem.tar
67
68initial_filesystem.tar.gz: initial_filesystem.tar
69        $(GZIP) < initial_filesystem.tar > initial_filesystem.tar.gz
70CLEANFILES += initial_filesystem.tar.gz
71
72endif TARTESTS
73
74clean-local:
75        -rm -rf initial_fs
76
77include $(top_srcdir)/../automake/local.am
Note: See TracBrowser for help on using the repository browser.