xref: /trunk/main/l10ntools/scripts/makefile.mk (revision 91144cd0085a7583d2099b982122deb2184ab956)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24# Copy *.py files into output tree and call a script once to
25# force python to create the *.pyc files.
26
27PRJ=..
28TARGET = l10ntools_dummy_pyc
29
30.INCLUDE: settings.mk
31
32.IF "$(SYSTEM_PYTHON)"!="YES"
33PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/python
34.ELSE                   # "$(SYSTEM_PYTHON)"!="YES"
35# PYTHON_BIN is the interpreter configure located and checked against the
36# 3.11 floor; fall back to PATH only if the environment does not carry it.
37.IF "$(PYTHON_BIN)"==""
38PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) python3
39.ELSE                   # "$(PYTHON_BIN)"==""
40PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(PYTHON_BIN)
41.ENDIF                  # "$(PYTHON_BIN)"==""
42.ENDIF                  # "$(SYSTEM_PYTHON)"!="YES"
43
44PYFILES = $(BIN)$/const.py \
45          $(BIN)$/l10ntool.py \
46          $(BIN)$/pseudo.py \
47          $(BIN)$/sdf.py \
48          $(BIN)$/xhtex.py \
49          $(BIN)$/xtxex.py
50
51.INCLUDE: target.mk
52
53.IGNORE : create_pyc
54ALLTAR : create_pyc
55create_pyc : $(PYFILES)
56.IF "$(GUI)"=="OS2"
57    @$(PYTHON) $(BIN)/xtxex.py > /dev/null
58.ELSE
59    @$(PYTHON) $(BIN)/xtxex.py >& /dev/null
60.ENDIF
61
62$(BIN)$/%.py : tool/%.py
63    @$(COPY) $< $@
64