summaryrefslogtreecommitdiffstats
path: root/debian/patches/javadoc-optional.diff
blob: 33deb9388b7d3e44a907ddae30f73aa2fe96a8c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Gemeinsame Unterverzeichnisse: odk-old/config und odk/config.
Gemeinsame Unterverzeichnisse: odk-old/docs und odk/docs.
Gemeinsame Unterverzeichnisse: odk-old/examples und odk/examples.
diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk
index 693885322115..5fcb39306a0b 100644
--- a/odk/Module_odk.mk
+++ b/odk/Module_odk.mk
@@ -42,8 +42,10 @@ endif
 ifneq ($(ENABLE_JAVA),)
 $(eval $(call gb_Module_add_targets,odk,\
 	CustomTarget_classes \
-	CustomTarget_javadoc \
-	GeneratedPackage_odk_javadoc \
+	$(if $(JAVADOC),\
+		CustomTarget_javadoc \
+		GeneratedPackage_odk_javadoc \
+	) \
 	GeneratedPackage_uno_loader_classes \
 ))
 endif

Gemeinsame Unterverzeichnisse: odk-old/pack und odk/pack.
Gemeinsame Unterverzeichnisse: odk-old/qa und odk/qa.
Gemeinsame Unterverzeichnisse: odk-old/settings und odk/settings.
Gemeinsame Unterverzeichnisse: odk-old/source und odk/source.
Gemeinsame Unterverzeichnisse: odk-old/util und odk/util.
--- a/configure.ac-old	2013-05-27 18:32:42.187305241 +0200
+++ b/configure.ac	2013-05-27 18:44:29.131286710 +0200
@@ -2057,6 +2057,18 @@ AC_ARG_WITH(doxygen,
          documentation. Not relevant in the --disable-odk case.]),
 ,with_doxygen=yes)
 
+AC_ARG_WITH(
+    [javadoc],
+    AS_HELP_STRING(
+        [--with-javadoc],
+        [Specifies the javadoc executable to use when generating ODK Java
+         documentation. --without-javadoc disables generation of ODK Java
+         documentation. Not relevant in the --disable-odk case.])
+    [
+                          Usage:     --with-javadoc=<absolute path to doxygen executable>
+    ],,
+    [with_javadoc=yes])
+
 AC_ARG_WITH(visual-studio,
     AS_HELP_STRING([--with-visual-studio=<2019/2022>],
         [Specify which Visual Studio version to use in case several are
@@ -7872,34 +7872,43 @@ fi
 dnl ===================================================================
 dnl Checks for javadoc
 dnl ===================================================================
-if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+if test "$ENABLE_JAVA" != "" -a "$enable_odk" != no -a "$cross_compiling" != "yes"; then
     if test -z "$with_jdk_home"; then
         AC_PATH_PROG(JAVADOC, javadoc)
     else
-        _javadoc_path="$with_jdk_home/bin/javadoc"
-        dnl Check if there is a javadoc at all.
-        if test -x "$_javadoc_path"; then
-            JAVADOC=$_javadoc_path
-        else
-            AC_PATH_PROG(JAVADOC, javadoc)
-        fi
-    fi
-    if test -z "$JAVADOC"; then
-        AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
-    fi
-    if test "$build_os" = "cygwin"; then
-        if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
-            JAVADOC="${JAVADOC}.exe"
-        fi
-        JAVADOC=`win_short_path_for_make "$JAVADOC"`
-    fi
+	if test "$with_javadoc" = "yes"; then
+            _javadoc_path="$with_jdk_home/bin/javadoc"
+            dnl Check if there is a javadoc at all.
+            if test -x "$_javadoc_path"; then
+                JAVADOC=$_javadoc_path
+            else
+                AC_PATH_PROG(JAVADOC, javadoc)
+            fi
+            if test -z "$JAVADOC"; then
+                AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
+            fi
+            if test "$build_os" = "cygwin"; then
+                if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
+                    JAVADOC="${JAVADOC}.exe"
+                fi
+                JAVADOC=`win_short_path_for_make "$JAVADOC"`
+            fi
 
-    if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
-    JAVADOCISGJDOC="yes"
+            if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
+            JAVADOCISGJDOC="yes"
+            fi
+	 else
+		 unset JAVADOC
+	 fi
     fi
+else
+    unset JAVADOC
 fi
-AC_SUBST(JAVADOC)
 AC_SUBST(JAVADOCISGJDOC)
+if test "$JAVADOCISGJDOC" = "yes"; then
+       unset JAVADOC
+fi
+AC_SUBST(JAVADOC)
 
 if test "$ENABLE_JAVA" != "" -a \( "$cross_compiling" != "yes" -o -n "$with_jdk_home" \); then
     # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
diff --git a/odk/CustomTarget_check.mk b/odk/CustomTarget_check.mk
index 74331955be9b..3415b0193cf9 100644
--- a/odk/CustomTarget_check.mk
+++ b/odk/CustomTarget_check.mk
@@ -36,7 +36,7 @@ $(call gb_CustomTarget_get_workdir,odk/check)/checkbin : \
 		$(if $(filter WNT,$(OS)),$(call gb_Package_get_target,odk_config_win)) \
 		$(call gb_Package_get_target,odk_docs) \
 		$(call gb_Package_get_target,odk_html) \
-		$(if $(ENABLE_JAVA),$(call gb_GeneratedPackage_get_target,odk_javadoc)) \
+		$(if $(JAVADOC),$(call gb_GeneratedPackage_get_target,odk_javadoc)) \
 		$(call gb_Package_get_target,odk_settings) \
 		$(call gb_Package_get_target,odk_settings_generated)
 ifneq ($(gb_SUPPRESS_TESTS),)
diff --git a/odk/util/check.pl b/odk/util/check.pl
index 899b42c..2c7a780 100644
--- a/odk/util/check.pl
+++ b/odk/util/check.pl
@@ -188,7 +188,7 @@ if (-d "$SdkDir") {
     # improvement required
     my $solar_java = $ENV{"ENABLE_JAVA"};
     my $JDK = $ENV{"JDK"};
-    if (defined($solar_java) && $solar_java ne "" && (!defined($JDK) || $JDK ne "gcj")) {
+    if (defined($solar_java) && $solar_java ne "" && $ENV{"JAVADOC"} ne "") {
     print "check java docu: ";
     if (check_dir("docs/java/ref")) {
         if (!check_file("docs/java/ref/index.html")) {
diff --git a/Repository.mk b/Repository.mk
index 5f2654b..471210f 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -834,7 +841,7 @@ $(eval $(call gb_Helper_register_packages_for_install,sdk,\
 	offapi_idl \
 	udkapi_idl \
 	$(if $(ENABLE_JAVA), \
-		odk_javadoc \
+		$(if $(JAVADOC),odk_javadoc) \
 		odk_uno_loader_classes \
 	) \
 ))