1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4; coding: utf-8 -*- */
4 * Copyright (C) 2010 Sébastien Granjoux
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
27 #include "am-properties.h"
29 #include "am-project-private.h"
31 #include "ac-scanner.h"
32 #include "am-scanner.h"
33 #include "ac-writer.h"
35 #include <glib/gi18n.h>
40 *---------------------------------------------------------------------------*/
43 *---------------------------------------------------------------------------*/
45 static AmpPropertyInfo AmpProjectProperties
[] =
50 ANJUTA_PROJECT_PROPERTY_STRING
,
51 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
52 N_("Project name, it can contain spaces by example 'GNU Autoconf'")},
53 AC_TOKEN_AC_INIT
, 0, "AC_INIT(",
54 AM_PROPERTY_IN_CONFIGURE
59 ANJUTA_PROJECT_PROPERTY_STRING
,
60 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
61 N_("Project version, typically a few numbers separated by dot by example '1.0.0'")},
62 AC_TOKEN_AC_INIT
, 1, "AC_INIT(",
63 AM_PROPERTY_IN_CONFIGURE
67 N_("Bug report URL:"),
68 ANJUTA_PROJECT_PROPERTY_STRING
,
69 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
70 N_("An email address or a link to a web page where the user can report bug. It is optional.")},
71 AC_TOKEN_AC_INIT
, 2, "AC_INIT(",
72 AM_PROPERTY_IN_CONFIGURE
77 ANJUTA_PROJECT_PROPERTY_STRING
,
78 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
79 N_("Package name, it can contains only alphanumerics and underscore characters."
80 "It is generated from the project name if not provided.")},
81 AC_TOKEN_AC_INIT
, 3, "AC_INIT(",
82 AM_PROPERTY_IN_CONFIGURE
87 ANJUTA_PROJECT_PROPERTY_STRING
,
88 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
89 N_("An link to the project web page if provided.")},
90 AC_TOKEN_AC_INIT
, 4, "AC_INIT(",
91 AM_PROPERTY_IN_CONFIGURE
95 N_("Libtool support:"),
96 ANJUTA_PROJECT_PROPERTY_LIST
,
97 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
| ANJUTA_PROJECT_PROPERTY_HIDDEN
,
98 N_("Add support to compile shared and static libraries with Libtool.")},
99 AC_TOKEN_LT_INIT
, -1, "LT_INIT(",
100 AM_PROPERTY_IN_CONFIGURE
105 ANJUTA_PROJECT_PROPERTY_LIST
,
106 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
107 N_("Common additional linker flags for all targets in this group.")},
108 AM_TOKEN__LDFLAGS
, 0, "AM_LDFLAGS",
109 AM_PROPERTY_IN_MAKEFILE
113 N_("C preprocessor flags:"),
114 ANJUTA_PROJECT_PROPERTY_LIST
,
115 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
116 N_("Common additional C preprocessor flags for all targets in this group.")},
117 AM_TOKEN__CPPFLAGS
, 0, "AM_CPPFLAGS",
118 AM_PROPERTY_IN_MAKEFILE
122 N_("C compiler flags:"),
123 ANJUTA_PROJECT_PROPERTY_LIST
,
124 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
125 N_("Common additional C compiler flags for all targets in this group.")},
126 AM_TOKEN__CFLAGS
, 0, "AM_CFLAGS",
127 AM_PROPERTY_IN_MAKEFILE
131 N_("C++ compiler flags:"),
132 ANJUTA_PROJECT_PROPERTY_LIST
,
133 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
134 N_("Common additional C++ compiler flags for all targets in this group.")},
135 AM_TOKEN__CXXFLAGS
, 0, "AM_CXXFLAGS",
136 AM_PROPERTY_IN_MAKEFILE
140 N_("Java compiler flags:"),
141 ANJUTA_PROJECT_PROPERTY_LIST
,
142 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
143 N_("Common additional Java compiler flags for all targets in this group.")},
144 AM_TOKEN__JAVACFLAGS
, 0, "AM_JAVAFLAGS",
145 AM_PROPERTY_IN_MAKEFILE
149 N_("Vala compiler flags:"),
150 ANJUTA_PROJECT_PROPERTY_LIST
,
151 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
152 N_("Common additional Vala compiler flags for all targets in this group.")},
153 AM_TOKEN__VALAFLAGS
, 0, "AM_VALAFLAGS",
154 AM_PROPERTY_IN_MAKEFILE
158 N_("Fortran compiler flags:"),
159 ANJUTA_PROJECT_PROPERTY_LIST
,
160 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
161 N_("Common additional Fortran compiler flags for all targets in this group.")},
162 AM_TOKEN__FCFLAGS
, 0, "AM_FCFLAGS",
163 AM_PROPERTY_IN_MAKEFILE
167 N_("Objective C compiler flags:"),
168 ANJUTA_PROJECT_PROPERTY_LIST
,
169 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
170 N_("Common additional Objective C compiler flags for all targets in this group.")},
171 AM_TOKEN__OBJCFLAGS
, 0, "AM_OBJCFLAGS",
172 AM_PROPERTY_IN_MAKEFILE
176 N_("Lex/Flex flags:"),
177 ANJUTA_PROJECT_PROPERTY_LIST
,
178 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
179 N_("Common additional Lex or Flex lexical analyser generator flags for all targets in this group.")},
180 AM_TOKEN__LFLAGS
, 0, "AM_LFLAGS",
181 AM_PROPERTY_IN_MAKEFILE
185 N_("Yacc/Bison flags:"),
186 ANJUTA_PROJECT_PROPERTY_LIST
,
187 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
188 N_("Common additional Yacc or Bison parser generator flags for all targets in this group.")},
189 AM_TOKEN__YFLAGS
, 0, "AM_YFLAGS",
190 AM_PROPERTY_IN_MAKEFILE
194 N_("Installation directories:"),
195 ANJUTA_PROJECT_PROPERTY_MAP
,
196 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
197 N_("List of custom installation directories used by targets in this group.")},
198 AM_TOKEN_DIR
, 0, NULL
,
199 AM_PROPERTY_IN_MAKEFILE
204 static GList
* AmpProjectPropertyList
= NULL
;
207 static AmpPropertyInfo AmpGroupNodeProperties
[] =
212 ANJUTA_PROJECT_PROPERTY_LIST
,
213 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
214 N_("Common additional linker flags for all targets in this group.")},
215 AM_TOKEN__LDFLAGS
, 0, "AM_LDFLAGS",
216 AM_PROPERTY_IN_MAKEFILE
220 N_("C preprocessor flags:"),
221 ANJUTA_PROJECT_PROPERTY_LIST
,
222 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
223 N_("Common additional C preprocessor flags for all targets in this group.")},
224 AM_TOKEN__CPPFLAGS
, 0, "AM_CPPFLAGS",
225 AM_PROPERTY_IN_MAKEFILE
229 N_("C compiler flags:"),
230 ANJUTA_PROJECT_PROPERTY_LIST
,
231 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
232 N_("Common additional C compiler flags for all targets in this group.")},
233 AM_TOKEN__CFLAGS
, 0, "AM_CFLAGS",
234 AM_PROPERTY_IN_MAKEFILE
238 N_("C++ compiler flags:"),
239 ANJUTA_PROJECT_PROPERTY_LIST
,
240 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
241 N_("Common additional C++ compiler flags for all targets in this group.")},
242 AM_TOKEN__CXXFLAGS
, 0, "AM_CXXFLAGS",
243 AM_PROPERTY_IN_MAKEFILE
247 N_("Java compiler flags:"),
248 ANJUTA_PROJECT_PROPERTY_LIST
,
249 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
250 N_("Common additional Java compiler flags for all targets in this group.")},
251 AM_TOKEN__JAVACFLAGS
, 0, "AM_JAVAFLAGS",
252 AM_PROPERTY_IN_MAKEFILE
256 N_("Vala compiler flags:"),
257 ANJUTA_PROJECT_PROPERTY_LIST
,
258 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
259 N_("Common additional Vala compiler flags for all targets in this group.")},
260 AM_TOKEN__VALAFLAGS
, 0, "AM_VALAFLAGS",
261 AM_PROPERTY_IN_MAKEFILE
265 N_("Fortran compiler flags:"),
266 ANJUTA_PROJECT_PROPERTY_LIST
,
267 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
268 N_("Common additional Fortran compiler flags for all targets in this group.")},
269 AM_TOKEN__FCFLAGS
, 0, "AM_FCFLAGS",
270 AM_PROPERTY_IN_MAKEFILE
274 N_("Objective C compiler flags:"),
275 ANJUTA_PROJECT_PROPERTY_LIST
,
276 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
277 N_("Common additional Objective C compiler flags for all targets in this group.")},
278 AM_TOKEN__OBJCFLAGS
, 0, "AM_OBJCFLAGS",
279 AM_PROPERTY_IN_MAKEFILE
283 N_("Lex/Flex flags:"),
284 ANJUTA_PROJECT_PROPERTY_LIST
,
285 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
286 N_("Common additional Lex or Flex lexical analyser generator flags for all targets in this group.")},
287 AM_TOKEN__LFLAGS
, 0, "AM_LFLAGS",
288 AM_PROPERTY_IN_MAKEFILE
292 N_("Yacc/Bison flags:"),
293 ANJUTA_PROJECT_PROPERTY_LIST
,
294 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
295 N_("Common additional Yacc or Bison parser generator flags for all targets in this group.")},
296 AM_TOKEN__YFLAGS
, 0, "AM_YFLAGS",
297 AM_PROPERTY_IN_MAKEFILE
301 N_("Installation directories:"),
302 ANJUTA_PROJECT_PROPERTY_MAP
,
303 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
304 N_("List of custom installation directories used by targets in this group.")},
305 AM_TOKEN_DIR
, 0, NULL
,
306 AM_PROPERTY_IN_MAKEFILE
311 static GList
* AmpGroupNodePropertyList
= NULL
;
314 static AmpPropertyInfo AmpTargetNodeProperties
[] = {
317 N_("Do not install:"),
318 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
319 ANJUTA_PROJECT_PROPERTY_READ_ONLY
| ANJUTA_PROJECT_PROPERTY_STATIC
,
320 N_("Build but do not install the target.")},
321 AM_TOKEN__PROGRAMS
, 3, NULL
,
322 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DISABLE_FOLLOWING
,
327 N_("Installation directory:"),
328 ANJUTA_PROJECT_PROPERTY_STRING
,
329 ANJUTA_PROJECT_PROPERTY_READ_ONLY
| ANJUTA_PROJECT_PROPERTY_STATIC
,
330 N_("It has to be a standard directory or a custom one defined in group properties.")},
331 AM_TOKEN__PROGRAMS
, 6, "bin",
332 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DIRECTORY
337 ANJUTA_PROJECT_PROPERTY_LIST
,
338 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
339 N_("Additional linker flags for this target.")},
340 AM_TOKEN_TARGET_LDFLAGS
, 0, "_LDFLAGS",
341 AM_PROPERTY_IN_MAKEFILE
345 N_("Additional libraries:"),
346 ANJUTA_PROJECT_PROPERTY_LIST
,
347 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
348 N_("Additional libraries for this target.")},
349 AM_TOKEN_TARGET_LIBADD
, 0, "_LIBADD",
350 AM_PROPERTY_IN_MAKEFILE
354 N_("Additional objects:"),
355 ANJUTA_PROJECT_PROPERTY_LIST
,
356 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
357 N_("Additional object files for this target.")},
358 AM_TOKEN_TARGET_LDADD
, 0, "_LDADD",
359 AM_PROPERTY_IN_MAKEFILE
363 N_("C preprocessor flags:"),
364 ANJUTA_PROJECT_PROPERTY_LIST
,
365 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
366 N_("Additional C preprocessor flags for this target.")},
367 AM_TOKEN_TARGET_CPPFLAGS
, 0, "_CPPFLAGS",
368 AM_PROPERTY_IN_MAKEFILE
372 N_("C compiler flags:"),
373 ANJUTA_PROJECT_PROPERTY_LIST
,
374 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
375 N_("Additional C compiler flags for this target.")},
376 AM_TOKEN_TARGET_CFLAGS
, 0, "_CFLAGS",
377 AM_PROPERTY_IN_MAKEFILE
381 N_("C++ compiler flags:"),
382 ANJUTA_PROJECT_PROPERTY_LIST
,
383 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
384 N_("Additional C++ compiler flags for this target.")},
385 AM_TOKEN_TARGET_CXXFLAGS
, 0, "_CXXFLAGS",
386 AM_PROPERTY_IN_MAKEFILE
390 N_("Java compiler flags:"),
391 ANJUTA_PROJECT_PROPERTY_LIST
,
392 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
393 N_("Additional Java compiler flags for this target.")},
394 AM_TOKEN_TARGET_JAVACFLAGS
, 0, "_JAVACFLAGS",
395 AM_PROPERTY_IN_MAKEFILE
399 N_("Vala compiler flags:"),
400 ANJUTA_PROJECT_PROPERTY_LIST
,
401 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
402 N_("Additional Vala compiler flags for this target.")},
403 AM_TOKEN_TARGET_VALAFLAGS
,0, "_VALAFLAGS",
404 AM_PROPERTY_IN_MAKEFILE
408 N_("Fortran compiler flags:"),
409 ANJUTA_PROJECT_PROPERTY_LIST
,
410 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
411 N_("Additional Fortran compiler flags for this target.")},
412 AM_TOKEN_TARGET_FCFLAGS
, 0, "_FCFLAGS",
413 AM_PROPERTY_IN_MAKEFILE
417 N_("Objective C compiler flags:"),
418 ANJUTA_PROJECT_PROPERTY_LIST
,
419 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
420 N_("Additional Objective C compiler flags for this target.")},
421 AM_TOKEN_TARGET_OBJCFLAGS
, 0, "_OBJCFLAGS",
422 AM_PROPERTY_IN_MAKEFILE
426 N_("Lex/Flex flags:"),
427 ANJUTA_PROJECT_PROPERTY_LIST
,
428 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
429 N_("Additional Lex or Flex lexical analyser generator flags for this target.")},
430 AM_TOKEN_TARGET_LFLAGS
, 0, "_LFLAGS",
431 AM_PROPERTY_IN_MAKEFILE
435 N_("Yacc/Bison flags:"),
436 ANJUTA_PROJECT_PROPERTY_LIST
,
437 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
438 N_("Additional Yacc or Bison parser generator flags for this target.")},
439 AM_TOKEN_TARGET_YFLAGS
, 0, "_YFLAGS",
440 AM_PROPERTY_IN_MAKEFILE
444 N_("Additional dependencies:"),
445 ANJUTA_PROJECT_PROPERTY_LIST
,
446 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
447 N_("Additional dependencies for this target.")},
448 AM_TOKEN_TARGET_DEPENDENCIES
, 0, "EXTRA_DIST",
449 AM_PROPERTY_IN_MAKEFILE
453 N_("Include in distribution:"),
454 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
455 ANJUTA_PROJECT_PROPERTY_READ_ONLY
| ANJUTA_PROJECT_PROPERTY_STATIC
,
456 N_("Include this target in the distributed package.")},
457 AM_TOKEN__PROGRAMS
, 2, NULL
,
458 AM_PROPERTY_IN_MAKEFILE
,
463 N_("Build for check only:"),
464 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
465 ANJUTA_PROJECT_PROPERTY_READ_ONLY
| ANJUTA_PROJECT_PROPERTY_STATIC
,
466 N_("Build this target only when running automatic tests.")},
467 AM_TOKEN__PROGRAMS
, 4, NULL
,
468 AM_PROPERTY_IN_MAKEFILE
,
473 N_("Do not use prefix:"),
474 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
475 ANJUTA_PROJECT_PROPERTY_READ_ONLY
| ANJUTA_PROJECT_PROPERTY_STATIC
,
476 N_("Do not rename the target with an optional prefix, used to avoid overwriting system program. ")},
477 AM_TOKEN__PROGRAMS
, 1, NULL
,
478 AM_PROPERTY_IN_MAKEFILE
,
483 N_("Keep target path:"),
484 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
485 ANJUTA_PROJECT_PROPERTY_READ_ONLY
| ANJUTA_PROJECT_PROPERTY_STATIC
,
486 N_("Keep relative target path for installing it. "
487 "By example if you have a program subdir/app installed in bin directory it will be installed in bin/subdir/app not in bin/app.")},
488 AM_TOKEN__PROGRAMS
, 0, NULL
,
489 AM_PROPERTY_IN_MAKEFILE
,
495 static GList
* AmpTargetNodePropertyList
= NULL
;
498 static AmpPropertyInfo AmpProgramTargetProperties
[] = {
501 N_("Do not install:"),
502 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
503 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
504 N_("Build but do not install the target.")},
505 AM_TOKEN__PROGRAMS
, 3, "noinst_",
506 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DISABLE_FOLLOWING
,
511 N_("Installation directory:"),
512 ANJUTA_PROJECT_PROPERTY_STRING
,
513 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
514 N_("It has to be a standard directory or a custom one defined in group properties.")},
515 AM_TOKEN__PROGRAMS
, 6, "bin",
516 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DIRECTORY
521 ANJUTA_PROJECT_PROPERTY_LIST
,
522 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
523 N_("Additional linker flags for this target.")},
524 AM_TOKEN_TARGET_LDFLAGS
, 0, "_LDFLAGS",
525 AM_PROPERTY_IN_MAKEFILE
530 ANJUTA_PROJECT_PROPERTY_LIST
,
531 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
532 N_("Additional libraries for this target.")},
533 AM_TOKEN_TARGET_LDADD
, 0, "_LDADD",
534 AM_PROPERTY_IN_MAKEFILE
538 N_("C preprocessor flags:"),
539 ANJUTA_PROJECT_PROPERTY_LIST
,
540 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
541 N_("Additional C preprocessor flags for this target.")},
542 AM_TOKEN_TARGET_CPPFLAGS
, 0, "_CPPFLAGS",
543 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
547 N_("C compiler flags:"),
548 ANJUTA_PROJECT_PROPERTY_LIST
,
549 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
550 N_("Additional C compiler flags for this target.")},
551 AM_TOKEN_TARGET_CFLAGS
, 0, "_CFLAGS",
552 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
556 N_("C++ compiler flags:"),
557 ANJUTA_PROJECT_PROPERTY_LIST
,
558 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
559 N_("Additional C++ compiler flags for this target.")},
560 AM_TOKEN_TARGET_CXXFLAGS
, 0, "_CXXFLAGS",
561 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
565 N_("Java compiler flags:"),
566 ANJUTA_PROJECT_PROPERTY_LIST
,
567 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
568 N_("Additional Java compiler flags for this target.")},
569 AM_TOKEN_TARGET_JAVACFLAGS
, 0, "_JAVACFLAGS",
570 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
574 N_("Vala compiler flags:"),
575 ANJUTA_PROJECT_PROPERTY_LIST
,
576 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
577 N_("Additional Vala compiler flags for this target.")},
578 AM_TOKEN_TARGET_VALAFLAGS
,0, "_VALAFLAGS",
579 AM_PROPERTY_IN_MAKEFILE
583 N_("Fortran compiler flags:"),
584 ANJUTA_PROJECT_PROPERTY_LIST
,
585 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
586 N_("Additional Fortran compiler flags for this target.")},
587 AM_TOKEN_TARGET_FCFLAGS
, 0, "_FCFLAGS",
588 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
592 N_("Objective C compiler flags:"),
593 ANJUTA_PROJECT_PROPERTY_LIST
,
594 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
595 N_("Additional Objective C compiler flags for this target.")},
596 AM_TOKEN_TARGET_OBJCFLAGS
, 0, "_OBJCFLAGS",
597 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
601 N_("Lex/Flex flags:"),
602 ANJUTA_PROJECT_PROPERTY_LIST
,
603 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
604 N_("Additional Lex or Flex lexical analyser generator flags for this target.")},
605 AM_TOKEN_TARGET_LFLAGS
, 0, "_LFLAGS",
606 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
610 N_("Yacc/Bison flags:"),
611 ANJUTA_PROJECT_PROPERTY_LIST
,
612 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
613 N_("Additional Yacc or Bison parser generator flags for this target.")},
614 AM_TOKEN_TARGET_YFLAGS
, 0, "_YFLAGS",
615 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
619 N_("Additional dependencies:"),
620 ANJUTA_PROJECT_PROPERTY_LIST
,
621 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
622 N_("Additional dependencies for this target.")},
623 AM_TOKEN_TARGET_DEPENDENCIES
, 0, "EXTRA_DIST",
624 AM_PROPERTY_IN_MAKEFILE
628 N_("Include in distribution:"),
629 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
630 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
631 N_("Include this target in the distributed package.")},
632 AM_TOKEN__PROGRAMS
, 2, "nodist_",
633 AM_PROPERTY_IN_MAKEFILE
,
638 N_("Build for check only:"),
639 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
640 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
641 N_("Build this target only when running automatic tests.")},
642 AM_TOKEN__PROGRAMS
, 4, "check_",
643 AM_PROPERTY_IN_MAKEFILE
,
648 N_("Do not use prefix:"),
649 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
650 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
651 N_("Do not rename the target with an optional prefix, used to avoid overwriting system program. ")},
652 AM_TOKEN__PROGRAMS
, 1, "notrans_",
653 AM_PROPERTY_IN_MAKEFILE
,
658 N_("Keep target path:"),
659 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
660 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
661 N_("Keep relative target path for installing it. "
662 "By example if you have a program subdir/app installed in bin directory it will be installed in bin/subdir/app not in bin/app.")},
663 AM_TOKEN__PROGRAMS
, 0, "nobase_",
664 AM_PROPERTY_IN_MAKEFILE
,
670 static GList
* AmpProgramTargetPropertyList
= NULL
;
673 static AmpPropertyInfo AmpLibraryTargetProperties
[] = {
676 N_("Do not install:"),
677 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
678 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
679 N_("Build but do not install the target.")},
680 AM_TOKEN__PROGRAMS
, 3, "noinst_",
681 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DISABLE_FOLLOWING
,
686 N_("Installation directory:"),
687 ANJUTA_PROJECT_PROPERTY_STRING
,
688 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
689 N_("It has to be a standard directory or a custom one defined in group properties.")},
690 AM_TOKEN__PROGRAMS
, 6, "lib",
691 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DIRECTORY
696 ANJUTA_PROJECT_PROPERTY_LIST
,
697 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
698 N_("Additional linker flags for this target.")},
699 AM_TOKEN_TARGET_LDFLAGS
, 0, "_LDFLAGS",
700 AM_PROPERTY_IN_MAKEFILE
705 ANJUTA_PROJECT_PROPERTY_LIST
,
706 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
707 N_("Additional libraries for this target.")},
708 AM_TOKEN_TARGET_LIBADD
, 0, "_LIBADD",
709 AM_PROPERTY_IN_MAKEFILE
713 N_("C preprocessor flags:"),
714 ANJUTA_PROJECT_PROPERTY_LIST
,
715 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
716 N_("Additional C preprocessor flags for this target.")},
717 AM_TOKEN_TARGET_CPPFLAGS
, 0, "_CPPFLAGS",
718 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
722 N_("C compiler flags:"),
723 ANJUTA_PROJECT_PROPERTY_LIST
,
724 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
725 N_("Additional C compiler flags for this target.")},
726 AM_TOKEN_TARGET_CFLAGS
, 0, "_CFLAGS",
727 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
731 N_("C++ compiler flags:"),
732 ANJUTA_PROJECT_PROPERTY_LIST
,
733 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
734 N_("Additional C++ compiler flags for this target.")},
735 AM_TOKEN_TARGET_CXXFLAGS
, 0, "_CXXFLAGS",
736 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
740 N_("Java compiler flags:"),
741 ANJUTA_PROJECT_PROPERTY_LIST
,
742 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
743 N_("Additional Java compiler flags for this target.")},
744 AM_TOKEN_TARGET_JAVACFLAGS
, 0, "_JAVACFLAGS",
745 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
749 N_("Vala compiler flags:"),
750 ANJUTA_PROJECT_PROPERTY_LIST
,
751 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
752 N_("Additional Vala compiler flags for this target.")},
753 AM_TOKEN_TARGET_VALAFLAGS
,0, "_VALAFLAGS",
754 AM_PROPERTY_IN_MAKEFILE
758 N_("Fortran compiler flags:"),
759 ANJUTA_PROJECT_PROPERTY_LIST
,
760 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
761 N_("Additional Fortran compiler flags for this target.")},
762 AM_TOKEN_TARGET_FCFLAGS
, 0, "_FCFLAGS",
763 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
767 N_("Objective C compiler flags:"),
768 ANJUTA_PROJECT_PROPERTY_LIST
,
769 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
770 N_("Additional Objective C compiler flags for this target.")},
771 AM_TOKEN_TARGET_OBJCFLAGS
, 0, "_OBJCFLAGS",
772 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
776 N_("Lex/Flex flags:"),
777 ANJUTA_PROJECT_PROPERTY_LIST
,
778 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
779 N_("Additional Lex or Flex lexical analyser generator flags for this target.")},
780 AM_TOKEN_TARGET_LFLAGS
, 0, "_LFLAGS",
781 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
785 N_("Yacc/Bison flags:"),
786 ANJUTA_PROJECT_PROPERTY_LIST
,
787 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
788 N_("Additional Yacc or Bison parser generator flags for this target.")},
789 AM_TOKEN_TARGET_YFLAGS
, 0, "_YFLAGS",
790 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
794 N_("Additional dependencies:"),
795 ANJUTA_PROJECT_PROPERTY_LIST
,
796 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
797 N_("Additional dependencies for this target.")},
798 AM_TOKEN_TARGET_DEPENDENCIES
, 0, "EXTRA_DIST",
799 AM_PROPERTY_IN_MAKEFILE
803 N_("Include in distribution:"),
804 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
805 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
806 N_("Include this target in the distributed package.")},
807 AM_TOKEN__PROGRAMS
, 2, "nodist_",
808 AM_PROPERTY_IN_MAKEFILE
,
813 N_("Build for check only:"),
814 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
815 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
816 N_("Build this target only when running automatic tests.")},
817 AM_TOKEN__PROGRAMS
, 4, "check_",
818 AM_PROPERTY_IN_MAKEFILE
,
823 N_("Do not use prefix:"),
824 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
825 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
826 N_("Do not rename the target with an optional prefix, used to avoid overwriting system program. ")},
827 AM_TOKEN__PROGRAMS
, 1, "notrans_",
828 AM_PROPERTY_IN_MAKEFILE
,
833 N_("Keep target path:"),
834 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
835 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
836 N_("Keep relative target path for installing it. "
837 "By example if you have a program subdir/app installed in bin directory it will be installed in bin/subdir/app not in bin/app.")},
838 AM_TOKEN__PROGRAMS
, 0, "nobase_",
839 AM_PROPERTY_IN_MAKEFILE
,
846 static GList
* AmpModuleTargetPropertyList
= NULL
;
848 static AmpPropertyInfo AmpModuleTargetProperties
[] = {
851 N_("Do not install:"),
852 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
853 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
854 N_("Build but do not install the target.")},
855 AM_TOKEN__PROGRAMS
, 3, "noinst_",
856 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DISABLE_FOLLOWING
,
861 N_("Installation directory:"),
862 ANJUTA_PROJECT_PROPERTY_STRING
,
863 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
864 N_("It has to be a standard directory or a custom one defined in group properties.")},
865 AM_TOKEN__PROGRAMS
, 6, "lib",
866 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DIRECTORY
871 ANJUTA_PROJECT_PROPERTY_LIST
,
872 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
873 N_("Additional linker flags for this target.")},
874 AM_TOKEN_TARGET_LDFLAGS
, 0, "_LDFLAGS",
875 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_MANDATORY_VALUE
,
876 "-module -avoid-version"
881 ANJUTA_PROJECT_PROPERTY_LIST
,
882 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
883 N_("Additional libraries for this target.")},
884 AM_TOKEN_TARGET_LIBADD
, 0, "_LIBADD",
885 AM_PROPERTY_IN_MAKEFILE
889 N_("C preprocessor flags:"),
890 ANJUTA_PROJECT_PROPERTY_LIST
,
891 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
892 N_("Additional C preprocessor flags for this target.")},
893 AM_TOKEN_TARGET_CPPFLAGS
, 0, "_CPPFLAGS",
894 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
898 N_("C compiler flags:"),
899 ANJUTA_PROJECT_PROPERTY_LIST
,
900 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
901 N_("Additional C compiler flags for this target.")},
902 AM_TOKEN_TARGET_CFLAGS
, 0, "_CFLAGS",
903 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
907 N_("C++ compiler flags:"),
908 ANJUTA_PROJECT_PROPERTY_LIST
,
909 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
910 N_("Additional C++ compiler flags for this target.")},
911 AM_TOKEN_TARGET_CXXFLAGS
, 0, "_CXXFLAGS",
912 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
916 N_("Java compiler flags:"),
917 ANJUTA_PROJECT_PROPERTY_LIST
,
918 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
919 N_("Additional Java compiler flags for this target.")},
920 AM_TOKEN_TARGET_JAVACFLAGS
, 0, "_JAVACFLAGS",
921 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
925 N_("Vala compiler flags:"),
926 ANJUTA_PROJECT_PROPERTY_LIST
,
927 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
928 N_("Additional Vala compiler flags for this target.")},
929 AM_TOKEN_TARGET_VALAFLAGS
,0, "_VALAFLAGS",
930 AM_PROPERTY_IN_MAKEFILE
934 N_("Fortran compiler flags:"),
935 ANJUTA_PROJECT_PROPERTY_LIST
,
936 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
937 N_("Additional Fortran compiler flags for this target.")},
938 AM_TOKEN_TARGET_FCFLAGS
, 0, "_FCFLAGS",
939 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
943 N_("Objective C compiler flags:"),
944 ANJUTA_PROJECT_PROPERTY_LIST
,
945 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
946 N_("Additional Objective C compiler flags for this target.")},
947 AM_TOKEN_TARGET_OBJCFLAGS
, 0, "_OBJCFLAGS",
948 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
952 N_("Lex/Flex flags:"),
953 ANJUTA_PROJECT_PROPERTY_LIST
,
954 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
955 N_("Additional Lex or Flex lexical analyser generator flags for this target.")},
956 AM_TOKEN_TARGET_LFLAGS
, 0, "_LFLAGS",
957 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
961 N_("Yacc/Bison flags:"),
962 ANJUTA_PROJECT_PROPERTY_LIST
,
963 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
964 N_("Additional Yacc or Bison parser generator flags for this target.")},
965 AM_TOKEN_TARGET_YFLAGS
, 0, "_YFLAGS",
966 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_PREFIX_OBJECT
970 N_("Additional dependencies:"),
971 ANJUTA_PROJECT_PROPERTY_LIST
,
972 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
973 N_("Additional dependencies for this target.")},
974 AM_TOKEN_TARGET_DEPENDENCIES
, 0, "EXTRA_DIST",
975 AM_PROPERTY_IN_MAKEFILE
979 N_("Include in distribution:"),
980 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
981 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
982 N_("Include this target in the distributed package.")},
983 AM_TOKEN__PROGRAMS
, 2, "nodist_",
984 AM_PROPERTY_IN_MAKEFILE
,
989 N_("Build for check only:"),
990 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
991 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
992 N_("Build this target only when running automatic tests.")},
993 AM_TOKEN__PROGRAMS
, 4, "check_",
994 AM_PROPERTY_IN_MAKEFILE
,
999 N_("Do not use prefix:"),
1000 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1001 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1002 N_("Do not rename the target with an optional prefix, used to avoid overwriting system program. ")},
1003 AM_TOKEN__PROGRAMS
, 1, "notrans_",
1004 AM_PROPERTY_IN_MAKEFILE
,
1009 N_("Keep target path:"),
1010 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1011 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1012 N_("Keep relative target path for installing it. "
1013 "By example if you have a program subdir/app installed in bin directory it will be installed in bin/subdir/app not in bin/app.")},
1014 AM_TOKEN__PROGRAMS
, 0, "nobase_",
1015 AM_PROPERTY_IN_MAKEFILE
,
1021 static GList
* AmpLibraryTargetPropertyList
= NULL
;
1024 static AmpPropertyInfo AmpManTargetProperties
[] = {
1027 N_("Additional dependencies:"),
1028 ANJUTA_PROJECT_PROPERTY_LIST
,
1029 ANJUTA_PROJECT_PROPERTY_READ_ONLY
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1030 N_("Additional dependencies for this target.")},
1032 AM_PROPERTY_IN_MAKEFILE
1036 N_("Do not use prefix:"),
1037 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1038 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1039 N_("Do not rename the target with an optional prefix, used to avoid overwriting system program. ")},
1040 AM_TOKEN__PROGRAMS
, 1, "notrans_",
1041 AM_PROPERTY_IN_MAKEFILE
,
1046 N_("Manual section:"),
1047 ANJUTA_PROJECT_PROPERTY_STRING
,
1048 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1049 N_("Section where are installed the man pages. Valid section names are the digits ‘0’ through ‘9’, and the letters ‘l’ and ‘n’. ")},
1050 AM_TOKEN__PROGRAMS
, 5, "man_",
1051 AM_PROPERTY_IN_MAKEFILE
1056 static GList
* AmpManTargetPropertyList
= NULL
;
1059 static AmpPropertyInfo AmpDataTargetProperties
[] = {
1062 N_("Do not install:"),
1063 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1064 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1065 N_("Build but do not install the target.")},
1066 AM_TOKEN__PROGRAMS
, 3, "noinst_",
1067 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DISABLE_FOLLOWING
,
1072 N_("Installation directory:"),
1073 ANJUTA_PROJECT_PROPERTY_STRING
,
1074 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1075 N_("It has to be a standard directory or a custom one defined in group properties.")},
1076 AM_TOKEN__PROGRAMS
, 6, "data",
1077 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DIRECTORY
1081 N_("Additional dependencies:"),
1082 ANJUTA_PROJECT_PROPERTY_LIST
,
1083 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1084 N_("Additional dependencies for this target.")},
1085 AM_TOKEN_TARGET_DEPENDENCIES
, 0, "EXTRA_DIST",
1086 AM_PROPERTY_IN_MAKEFILE
1090 N_("Include in distribution:"),
1091 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1092 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1093 N_("Include this target in the distributed package.")},
1094 AM_TOKEN__PROGRAMS
, 2, "dist_",
1095 AM_PROPERTY_IN_MAKEFILE
,
1100 N_("Build for check only:"),
1101 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1102 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1103 N_("Build this target only when running automatic tests.")},
1104 AM_TOKEN__PROGRAMS
, 4, "check_",
1105 AM_PROPERTY_IN_MAKEFILE
,
1110 N_("Do not use prefix:"),
1111 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1112 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1113 N_("Do not rename the target with an optional prefix, used to avoid overwriting system program. ")},
1114 AM_TOKEN__PROGRAMS
, 1, "notrans_",
1115 AM_PROPERTY_IN_MAKEFILE
,
1120 N_("Keep target path:"),
1121 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1122 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1123 N_("Keep relative target path for installing it. "
1124 "By example if you have a program subdir/app installed in bin directory it will be installed in bin/subdir/app not in bin/app.")},
1125 AM_TOKEN__PROGRAMS
, 0, "nobase_",
1126 AM_PROPERTY_IN_MAKEFILE
,
1132 static GList
* AmpDataTargetPropertyList
= NULL
;
1135 static AmpPropertyInfo AmpScriptTargetProperties
[] = {
1138 N_("Do not install:"),
1139 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1140 ANJUTA_PROJECT_PROPERTY_READ_ONLY
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1141 N_("Build but do not install the target.")},
1142 AM_TOKEN__PROGRAMS
, 3, "noinst_",
1143 AM_PROPERTY_IN_MAKEFILE
| AM_PROPERTY_DISABLE_FOLLOWING
1147 N_("Installation directory:"),
1148 ANJUTA_PROJECT_PROPERTY_STRING
,
1149 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1150 N_("It has to be a standard directory or a custom one defined in group properties.")},
1151 AM_TOKEN__PROGRAMS
, 6, "bin",
1152 AM_PROPERTY_IN_MAKEFILE
1156 N_("Additional dependencies:"),
1157 ANJUTA_PROJECT_PROPERTY_LIST
,
1158 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1159 N_("Additional dependencies for this target.")},
1160 AM_TOKEN_TARGET_DEPENDENCIES
, 0, "EXTRA_DIST",
1161 AM_PROPERTY_IN_MAKEFILE
1165 N_("Include in distribution:"),
1166 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1167 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1168 N_("Include this target in the distributed package.")},
1169 AM_TOKEN__PROGRAMS
, 2, "nodist_",
1170 AM_PROPERTY_IN_MAKEFILE
1174 N_("Build for check only:"),
1175 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1176 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1177 N_("Build this target only when running automatic tests.")},
1178 AM_TOKEN__PROGRAMS
, 4, "check_",
1179 AM_PROPERTY_IN_MAKEFILE
1183 N_("Do not use prefix:"),
1184 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1185 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1186 N_("Do not rename the target with an optional prefix, used to avoid overwriting system program. ")},
1187 AM_TOKEN__PROGRAMS
, 1, "notrans_",
1188 AM_PROPERTY_IN_MAKEFILE
1192 N_("Keep target path:"),
1193 ANJUTA_PROJECT_PROPERTY_BOOLEAN
,
1194 ANJUTA_PROJECT_PROPERTY_READ_WRITE
| ANJUTA_PROJECT_PROPERTY_STATIC
,
1195 N_("Keep relative target path for installing it. "
1196 "By example if you have a program subdir/app installed in bin directory it will be installed in bin/subdir/app not in bin/app.")},
1197 AM_TOKEN__PROGRAMS
, 0, "nobase_",
1198 AM_PROPERTY_IN_MAKEFILE
1203 static GList
* AmpScriptTargetPropertyList
= NULL
;
1207 *---------------------------------------------------------------------------*/
1209 /* Private functions
1210 *---------------------------------------------------------------------------*/
1213 amp_create_property_list (GList
**list
, AmpPropertyInfo
*properties
)
1217 AmpPropertyInfo
*info
;
1218 AnjutaProjectPropertyInfo
*link
= NULL
;
1220 for (info
= properties
; info
->base
.name
!= NULL
; info
++)
1223 *list
= g_list_prepend (*list
, info
);
1224 link
= info
->flags
& AM_PROPERTY_DISABLE_FOLLOWING
? (AnjutaProjectPropertyInfo
*)info
: NULL
;
1225 info
->base
.default_value
= amp_property_new (NULL
, 0, 0, info
->value
, NULL
);
1226 info
->base
.default_value
->info
= (AnjutaProjectPropertyInfo
*)info
;
1228 *list
= g_list_reverse (*list
);
1235 *---------------------------------------------------------------------------*/
1237 /* Properties info objects
1238 *---------------------------------------------------------------------------*/
1240 AnjutaProjectPropertyInfo
*
1241 amp_property_info_new (AnjutaTokenType type
, gint position
)
1243 AmpPropertyInfo
* info
;
1245 info
= g_slice_new0(AmpPropertyInfo
);
1246 info
->token_type
= type
;
1247 info
->position
= position
;
1249 return (AnjutaProjectPropertyInfo
*)info
;
1253 amp_property_info_free (AnjutaProjectPropertyInfo
*info
)
1255 if (!(info
->flags
& ANJUTA_PROJECT_PROPERTY_STATIC
))
1257 g_slice_free (AmpPropertyInfo
, (AmpPropertyInfo
*)info
);
1262 /* Properties objects
1263 *---------------------------------------------------------------------------*/
1265 AnjutaProjectProperty
*
1266 amp_property_new (const gchar
*name
, AnjutaTokenType type
, gint position
, const gchar
*value
, AnjutaToken
*token
)
1270 prop
= g_slice_new0(AmpProperty
);
1271 prop
->base
.name
= g_strdup (name
);
1272 prop
->base
.value
= g_strdup (value
);
1273 prop
->token
= token
;
1274 if ((type
!= 0) || (position
!= 0))
1276 /* Add a dummy properties info to keep track of type and position */
1277 prop
->base
.info
= amp_property_info_new (type
, position
);
1280 return (AnjutaProjectProperty
*)prop
;
1284 amp_property_free (AnjutaProjectProperty
*prop
)
1286 amp_property_info_free (prop
->info
);
1287 g_free (prop
->name
);
1288 g_free (prop
->value
);
1289 g_slice_free (AmpProperty
, (AmpProperty
*)prop
);
1292 /* Set property list
1293 *---------------------------------------------------------------------------*/
1296 amp_node_property_load (AnjutaProjectNode
*node
, gint token_type
, gint position
, const gchar
*value
, AnjutaToken
*token
)
1299 gboolean set
= FALSE
;
1301 for (item
= anjuta_project_node_get_properties_info (node
); item
!= NULL
; item
= g_list_next (item
))
1303 AmpPropertyInfo
*info
= (AmpPropertyInfo
*)item
->data
;
1305 if ((info
->token_type
== token_type
) && (info
->position
== position
))
1307 AnjutaProjectProperty
*new_prop
;
1309 new_prop
= anjuta_project_node_get_property (node
, info
->base
.id
);
1310 if ((new_prop
== NULL
) || (new_prop
== new_prop
->info
->default_value
))
1312 new_prop
= anjuta_project_node_insert_property (node
, (AnjutaProjectPropertyInfo
*)info
, amp_property_new (NULL
, 0, 0, NULL
, token
));
1315 g_free (new_prop
->value
);
1316 new_prop
->value
= g_strdup (value
);
1325 amp_node_property_add (AnjutaProjectNode
*node
, AnjutaProjectProperty
*new_prop
)
1328 gboolean set
= FALSE
;
1330 for (item
= anjuta_project_node_get_properties_info (node
); item
!= NULL
; item
= g_list_next (item
))
1332 AmpPropertyInfo
*info
= (AmpPropertyInfo
*)item
->data
;
1336 if ((info
->token_type
== ((AmpPropertyInfo
*)new_prop
->info
)->token_type
) && (info
->position
== ((AmpPropertyInfo
*)new_prop
->info
)->position
))
1338 AnjutaToken
*parent
;
1340 if (info
->base
.type
!= ANJUTA_PROJECT_PROPERTY_MAP
)
1342 /* Replace property */
1343 AnjutaProjectProperty
*old_prop
;
1345 old_prop
= anjuta_project_node_get_property (node
, info
->base
.id
);
1346 if ((old_prop
!= NULL
) && (old_prop
->info
->default_value
!= old_prop
))
1348 anjuta_project_node_remove_property (node
, old_prop
);
1349 amp_property_free (old_prop
);
1352 switch (info
->base
.type
)
1354 case ANJUTA_PROJECT_PROPERTY_LIST
:
1355 /* Re-evaluate token to remove useless space between item */
1356 if (((AmpProperty
*)new_prop
)->token
!= NULL
)
1358 list
= g_string_new (new_prop
->value
);
1359 parent
= anjuta_token_parent (((AmpProperty
*)new_prop
)->token
);
1360 g_string_assign (list
, "");
1361 for (arg
= anjuta_token_first_word (((AmpProperty
*)new_prop
)->token
); arg
!= NULL
; arg
= anjuta_token_next_word (arg
))
1363 gchar
*value
= anjuta_token_evaluate_name (arg
);
1365 if ((value
!= NULL
) && (anjuta_token_parent (arg
) == parent
))
1367 if (list
->len
!= 0) g_string_append_c (list
, ' ');
1368 g_string_append (list
, value
);
1371 g_free (new_prop
->value
);
1372 new_prop
->value
= g_string_free (list
, FALSE
);
1375 case ANJUTA_PROJECT_PROPERTY_MAP
:
1376 case ANJUTA_PROJECT_PROPERTY_STRING
:
1377 /* Strip leading and trailing space */
1378 if (new_prop
->value
!= NULL
) new_prop
->value
= g_strstrip (new_prop
->value
);
1384 if (g_strcmp0 (new_prop
->value
, info
->base
.default_value
->value
) != 0)
1386 amp_property_info_free (new_prop
->info
);
1387 anjuta_project_node_insert_property (node
, (AnjutaProjectPropertyInfo
*)info
, new_prop
);
1394 if (!set
) amp_property_free (new_prop
);
1399 AnjutaProjectProperty
*
1400 amp_node_property_set (AnjutaProjectNode
*node
, const gchar
*id
, const gchar
* value
)
1402 AnjutaProjectPropertyInfo
*info
;
1404 AnjutaProjectProperty
*prop
;
1406 info
= anjuta_project_node_get_property_info (node
, id
);
1407 if ((value
!= NULL
) && (info
->type
== ANJUTA_PROJECT_PROPERTY_MAP
))
1409 name
= strchr (value
, '=');
1412 gsize len
= name
- value
;
1414 name
= g_strndup (value
, len
);
1423 prop
= amp_node_map_property_set (node
, id
, name
, value
);
1429 AnjutaProjectProperty
*
1430 amp_node_map_property_set (AnjutaProjectNode
*node
, const gchar
*id
, const gchar
*name
, const gchar
* value
)
1432 AnjutaProjectProperty
*new_prop
;
1434 new_prop
= anjuta_project_node_get_map_property (node
, id
, name
);
1435 if ((new_prop
!= NULL
) && (new_prop
->info
->default_value
!= new_prop
))
1437 /* Property already exist, replace value */
1438 g_free (new_prop
->value
);
1439 new_prop
->value
= g_strdup (value
);
1443 /* Add new property */
1444 AnjutaProjectPropertyInfo
*info
;
1446 info
= anjuta_project_node_get_property_info (node
, id
);
1447 new_prop
= amp_property_new (name
, 0, 0, value
, NULL
);
1448 anjuta_project_node_insert_property (node
, info
, new_prop
);
1455 AnjutaProjectPropertyInfo
*
1456 amp_node_get_property_info_from_token (AnjutaProjectNode
*node
, gint token
, gint pos
)
1460 for (item
= anjuta_project_node_get_properties_info (node
); item
!= NULL
; item
= g_list_next (item
))
1462 AmpPropertyInfo
*info
= (AmpPropertyInfo
*)item
->data
;
1464 if ((info
->token_type
== token
) && (info
->position
== pos
))
1466 return (AnjutaProjectPropertyInfo
*)info
;
1473 AnjutaProjectProperty
*
1474 amp_node_get_property_from_token (AnjutaProjectNode
*node
, gint token
, gint pos
)
1478 for (item
= anjuta_project_node_get_properties_info (node
); item
!= NULL
; item
= g_list_next (item
))
1480 AmpPropertyInfo
*info
= (AmpPropertyInfo
*)item
->data
;
1482 if ((info
->token_type
== token
) && (info
->position
== pos
))
1484 return anjuta_project_node_get_property (node
, info
->base
.id
);
1493 /* Modify flags value
1494 *---------------------------------------------------------------------------*/
1496 static const gchar
*
1497 am_node_property_find_flags (AnjutaProjectProperty
*prop
, const gchar
*value
, gsize len
)
1501 g_return_val_if_fail (prop
!= NULL
, NULL
);
1503 for (found
= prop
->value
; found
!= NULL
;)
1505 found
= strstr (found
, value
);
1508 /* Check that flags is alone */
1509 if (((found
== prop
->value
) || isspace (*(found
- 1))) &&
1510 ((*(found
+ len
) == '\0') || isspace (*(found
+ len
))))
1522 amp_node_property_has_flags (AnjutaProjectNode
*node
, const gchar
*id
, const gchar
*value
)
1524 AnjutaProjectProperty
*prop
;
1526 prop
= anjuta_project_node_get_property (node
, id
);
1529 return am_node_property_find_flags (prop
, value
, strlen (value
)) != NULL
? TRUE
: FALSE
;
1537 AnjutaProjectProperty
*
1538 amp_node_property_remove_flags (AnjutaProjectNode
*node
, const gchar
*id
, const gchar
*value
)
1540 AnjutaProjectProperty
*prop
;
1541 const gchar
*found
= NULL
;
1542 gsize len
= strlen (value
);
1544 prop
= anjuta_project_node_get_property (node
, id
);
1547 found
= am_node_property_find_flags (prop
, value
, len
);
1554 if (found
== prop
->value
)
1556 while (isspace (*(found
+ len
))) len
++;
1558 else if (*(found
+ len
) == '\0')
1560 while ((found
!= prop
->value
) && isspace(*(found
- 1)))
1568 while (isspace (*(found
+ len
))) len
++;
1571 new_len
= strlen (prop
->value
) - len
;
1575 prop
= amp_node_property_set (node
, id
, NULL
);
1581 new_value
= g_new(gchar
, new_len
+ 1);
1583 if (found
!= prop
->value
) memcpy (new_value
, prop
->value
, found
- prop
->value
);
1584 memcpy (new_value
+ (found
- prop
->value
), found
+ len
, new_len
+ 1 - (found
- prop
->value
));
1585 prop
= amp_node_property_set (node
, id
, new_value
);
1593 AnjutaProjectProperty
*
1594 amp_node_property_add_flags (AnjutaProjectNode
*node
, const gchar
*id
, const gchar
*value
)
1596 AnjutaProjectProperty
*prop
;
1598 prop
= anjuta_project_node_get_property (node
, id
);
1601 prop
= amp_node_property_set (node
, id
, value
);
1607 new_value
= prop
->value
== NULL
? g_strdup (value
) : g_strconcat (prop
->value
, " ", value
, NULL
);
1608 prop
= amp_node_property_set (node
, id
, new_value
);
1615 /* Add mandatory properties to a new node */
1617 amp_node_property_add_mandatory (AnjutaProjectNode
*node
)
1620 gboolean added
= FALSE
;
1622 for (item
= anjuta_project_node_get_properties_info (node
); item
!= NULL
; item
= g_list_next (item
))
1624 AmpPropertyInfo
*info
= (AmpPropertyInfo
*)item
->data
;
1626 /* FIXME: Does not support map property */
1627 if ((info
->flags
& AM_PROPERTY_MANDATORY_VALUE
) && (info
->value
!= NULL
) && (info
->base
.type
!= ANJUTA_PROJECT_PROPERTY_MAP
))
1629 AnjutaProjectProperty
*new_prop
;
1631 new_prop
= amp_property_new (NULL
, 0, 0, info
->value
, NULL
);
1632 anjuta_project_node_insert_property (node
, (AnjutaProjectPropertyInfo
*)info
, new_prop
);
1641 /* Get property list
1642 *---------------------------------------------------------------------------*/
1645 amp_get_project_property_list (void)
1647 return amp_create_property_list (&AmpProjectPropertyList
, AmpProjectProperties
);
1651 amp_get_group_property_list (void)
1653 return amp_create_property_list (&AmpGroupNodePropertyList
, AmpGroupNodeProperties
);
1657 amp_get_target_property_list (AnjutaProjectNodeType type
)
1659 switch (type
& ANJUTA_PROJECT_ID_MASK
)
1661 case ANJUTA_PROJECT_PROGRAM
:
1662 return amp_create_property_list (&AmpProgramTargetPropertyList
, AmpProgramTargetProperties
);
1663 case ANJUTA_PROJECT_SHAREDLIB
:
1664 case ANJUTA_PROJECT_STATICLIB
:
1665 return amp_create_property_list (&AmpLibraryTargetPropertyList
, AmpLibraryTargetProperties
);
1666 case ANJUTA_PROJECT_LT_MODULE
:
1667 return amp_create_property_list (&AmpModuleTargetPropertyList
, AmpModuleTargetProperties
);
1668 case ANJUTA_PROJECT_MAN
:
1669 return amp_create_property_list (&AmpManTargetPropertyList
, AmpManTargetProperties
);
1670 case ANJUTA_PROJECT_DATA
:
1671 return amp_create_property_list (&AmpDataTargetPropertyList
, AmpDataTargetProperties
);
1672 case ANJUTA_PROJECT_SCRIPT
:
1673 return amp_create_property_list (&AmpScriptTargetPropertyList
, AmpScriptTargetProperties
);
1675 return amp_create_property_list (&AmpTargetNodePropertyList
, AmpTargetNodeProperties
);
1680 amp_get_source_property_list (void)
1686 amp_get_module_property_list (void)
1692 amp_get_package_property_list (void)