~ubuntu-branches/ubuntu/precise/pmake/precise

« back to all changes in this revision

Viewing changes to main.c

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2011-06-25 18:55:30 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110625185530-zrij3ijiphh4zup1
Tags: 1.111-3.1
* Non-maintainer upload.
* Fix missing -Wl for linker arguments
  Patch by Guillem Jover
  Closes: 628677

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
#define DEFMAXLOCAL DEFMAXJOBS
147
147
#endif  /* DEFMAXLOCAL */
148
148
 
 
149
#ifdef TARGET_MACHINE
 
150
#undef MAKE_MACHINE
 
151
#define MAKE_MACHINE TARGET_MACHINE
 
152
#endif
 
153
#ifdef TARGET_MACHINE_ARCH
 
154
#undef MAKE_MACHINE_ARCH
 
155
#define MAKE_MACHINE_ARCH TARGET_MACHINE_ARCH
 
156
#endif
 
157
#ifdef TARGET_MACHINE_MULTIARCH
 
158
#undef MAKE_MACHINE_MULTIARCH
 
159
#define MAKE_MACHINE_MULTIARCH TARGET_MACHINE_MULTIARCH
 
160
#endif
 
161
 
149
162
Lst                     create;         /* Targets to be made */
150
163
time_t                  now;            /* Time at start of make */
151
164
GNode                   *DEFAULT;       /* .DEFAULT node */
628
641
        char mdpath[MAXPATHLEN];
629
642
        char *machine = getenv("MACHINE");
630
643
        const char *machine_arch = getenv("MACHINE_ARCH");
 
644
        const char *machine_multiarch = getenv("MACHINE_MULTIARCH");
631
645
        char *syspath = getenv("MAKESYSPATH");
632
646
        Lst sysMkPath;                  /* Path of sys.mk */
633
647
        char *cp = NULL, *start;
711
725
         * so we can share an executable for similar machines.
712
726
         * (i.e. m68k: amiga hp300, mac68k, sun3, ...)
713
727
         *
714
 
         * Note that both MACHINE and MACHINE_ARCH are decided at
715
 
         * run-time.
 
728
         * Note that all of MACHINE, MACHINE_ARCH and MACHINE_MULTIARCH
 
729
         * are decided at run-time.
716
730
         */
717
731
        if (!machine) {
718
732
#ifdef MAKE_NATIVE
745
759
#endif
746
760
        }
747
761
 
 
762
        if (!machine_multiarch) {
 
763
#ifndef MACHINE_MULTIARCH
 
764
#ifdef MAKE_MACHINE_MULTIARCH
 
765
            machine_multiarch = MAKE_MACHINE_MULTIARCH;
 
766
#else
 
767
            machine_multiarch = "unknown-unknown-unknown";
 
768
#endif
 
769
#else
 
770
            machine_multiarch = MACHINE_MULTIARCH;
 
771
#endif
 
772
        }
 
773
 
748
774
        /*
749
775
         * Just in case MAKEOBJDIR wants us to do something tricky.
750
776
         */
753
779
        Var_Set(".CURDIR", curdir, VAR_GLOBAL, 0);
754
780
        Var_Set("MACHINE", machine, VAR_GLOBAL, 0);
755
781
        Var_Set("MACHINE_ARCH", machine_arch, VAR_GLOBAL, 0);
 
782
        Var_Set("MACHINE_MULTIARCH", machine_multiarch, VAR_GLOBAL, 0);
756
783
#ifdef MAKE_VERSION
757
784
        Var_Set("MAKE_VERSION", MAKE_VERSION, VAR_GLOBAL, 0);
758
785
#endif