View | Details | Raw Unified | Return to issue 70210
Collapse All | Expand All

(-)dmake/NEWS (+3 lines)
Lines 6-11 Link Here
6
===============
6
===============
7
7
8
Volker Quetschke (vq@openoffice.org)
8
Volker Quetschke (vq@openoffice.org)
9
#i70210# Dmake now works correctly with empty dynamic prerequisites.
10
11
Volker Quetschke (vq@openoffice.org)
9
#i70168# Improve dmakes handling of literal $ characters in target and
12
#i70168# Improve dmakes handling of literal $ characters in target and
10
prerequisite filenames. This was not working before and is working now
13
prerequisite filenames. This was not working before and is working now
11
but the use of literal $ characters in filenames is still strongly
14
but the use of literal $ characters in filenames is still strongly
(-)dmake/make.c (-6 / +11 lines)
Lines 472-479 Link Here
472
      }
472
      }
473
473
474
      /* Dynamic expansion results in a NULL cell only when the the new
474
      /* Dynamic expansion results in a NULL cell only when the the new
475
       * prerequisite is already in the prerequisite list.  In this case
475
       * prerequisite is already in the prerequisite list or empty. In this
476
       * delete the cell and continue. */
476
       * case delete the cell and continue. */
477
      if ( tcp == NIL(CELL) ) {
477
      if ( tcp == NIL(CELL) ) {
478
	 FREE(dp);
478
	 FREE(dp);
479
	 if ( prev == NIL(LINK) ) {
479
	 if ( prev == NIL(LINK) ) {
Lines 846-864 Link Here
846
{
846
{
847
   CELLPTR cur = lp->cl_prq;
847
   CELLPTR cur = lp->cl_prq;
848
848
849
   /* If condition is true, no space is found. */
849
   if( !(*name) ) {
850
   if ( strchr(name, ' ') == NIL(char) ) {
850
      /* If name is empty this leaves lp->cl_prq unchanged -> No prerequisite added. */
851
      CELLPTR prq = Def_cell(name); /* FIXME: name could be empty. */
851
      ;
852
   }
853
   else if ( strchr(name, ' ') == NIL(char) ) {
854
      /* If condition above is true, no space is found. */
855
      CELLPTR prq  = Def_cell(name);
852
      LINKPTR tmp;
856
      LINKPTR tmp;
853
857
854
      /* Check if prq already exists. */
858
      /* Check if prq already exists. */
855
      for(tmp=head;tmp != NIL(LINK) && tmp->cl_prq != prq;tmp=tmp->cl_next);
859
      for(tmp=head;tmp != NIL(LINK) && tmp->cl_prq != prq;tmp=tmp->cl_next);
856
860
857
      /* If tmp is NULL then the prerequisite is new and is added to the list. */
861
      /* If tmp is NULL then the prerequisite is new and is added to the list. */
858
      if ( !tmp )
862
      if ( !tmp ) {
859
	 /* replace the prerequisite with the expanded version. */
863
	 /* replace the prerequisite with the expanded version. */
860
	 lp->cl_prq = prq;
864
	 lp->cl_prq = prq;
861
	 lp->cl_prq->ce_flag |= F_MARK;
865
	 lp->cl_prq->ce_flag |= F_MARK;
866
      }
862
   }
867
   }
863
   else {
868
   else {
864
      LINKPTR tlp  = lp;
869
      LINKPTR tlp  = lp;
(-)dmake/tests/Makefile.am (-1 / +1 lines)
Lines 9-15 Link Here
9
        misc-10 misc-11 misc-12 misc-13 misc-14 \
9
        misc-10 misc-11 misc-12 misc-13 misc-14 \
10
        targets-1 targets-2 targets-3 targets-4 targets-5 targets-6 \
10
        targets-1 targets-2 targets-3 targets-4 targets-5 targets-6 \
11
        targets-7 targets-8 targets-9 targets-10 targets-11 targets-12 \
11
        targets-7 targets-8 targets-9 targets-10 targets-11 targets-12 \
12
        targets-13 targets-14 targets-15 targets-16
12
        targets-13 targets-14 targets-15 targets-16 targets-17
13
13
14
TESTS_ENVIRONMENT = DMAKEPROG="../dmake"
14
TESTS_ENVIRONMENT = DMAKEPROG="../dmake"
15
15
(-)dmake/tests/Makefile.in (-1 / +1 lines)
Lines 147-153 Link Here
147
        misc-10 misc-11 misc-12 misc-13 misc-14 \
147
        misc-10 misc-11 misc-12 misc-13 misc-14 \
148
        targets-1 targets-2 targets-3 targets-4 targets-5 targets-6 \
148
        targets-1 targets-2 targets-3 targets-4 targets-5 targets-6 \
149
        targets-7 targets-8 targets-9 targets-10 targets-11 targets-12 \
149
        targets-7 targets-8 targets-9 targets-10 targets-11 targets-12 \
150
        targets-13 targets-14 targets-15 targets-16
150
        targets-13 targets-14 targets-15 targets-16 targets-17
151
151
152
TESTS_ENVIRONMENT = DMAKEPROG="../dmake"
152
TESTS_ENVIRONMENT = DMAKEPROG="../dmake"
153
EXTRA_DIST = $(TESTS)
153
EXTRA_DIST = $(TESTS)
(-)dmake/tests/targets-17 (+38 lines)
Added Link Here
1
#!/bin/sh
2
3
# 08.10.2006 Volker Quetschke
4
# Check that empty dynamic prerequisites are handled correctly.
5
# (issue 70210)
6
7
: ${DMAKEPROG:=dmake}
8
file1="mfile1.mk"
9
tmpfiles="$file1"
10
11
trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
12
13
# Remove files from prior failed run
14
rm -rf $tmpfiles
15
16
# Remember to quote variables in generated makefiles( $ -> \$ ).
17
cat > $file1 <<EOT
18
SHELL*:=/bin/sh
19
SHELLFLAGS*:=-ce
20
21
EMPTYPRQ=
22
23
all : \$\$(EMPTYPRQ)
24
	echo all
25
EOT
26
27
output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
28
result1=$?
29
30
31
if test $result1 -eq 0 ; then
32
  echo "Success - Cleaning up"
33
  rm -rf $tmpfiles
34
else
35
  echo "Failure! dmake reported:"
36
  echo "$output1"
37
fi
38
exit $result

Return to issue 70210